Browse Source

Object3D: Simplified Layer copy. See #10245.

Mr.doob 8 years ago
parent
commit
bdb3c0ad26
2 changed files with 1 additions and 16 deletions
  1. 0 14
      src/core/Layers.js
  2. 1 2
      src/core/Object3D.js

+ 0 - 14
src/core/Layers.js

@@ -40,20 +40,6 @@ Layers.prototype = {
 
 		return ( this.mask & layers.mask ) !== 0;
 
-	},
-
-	clone: function ( ) {
-
-		return new Layers().copy( this );
-
-	},
-
-	copy: function ( source ) {
-
-		this.mask = source.mask;
-
-		return this;
-
 	}
 
 };

+ 1 - 2
src/core/Object3D.js

@@ -702,8 +702,7 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
 		this.matrixAutoUpdate = source.matrixAutoUpdate;
 		this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;
 
-		this.layers.copy( source.layers );
-
+		this.layers.mask = source.layers.mask;
 		this.visible = source.visible;
 
 		this.castShadow = source.castShadow;