@@ -40,6 +40,20 @@ Layers.prototype = {
return ( this.mask & layers.mask ) !== 0;
+ },
+
+ clone: function ( ) {
+ return new Layers().copy( this );
+ copy: function ( source ) {
+ this.mask = source.mask;
+ return this;
}
};
@@ -702,6 +702,8 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
this.matrixAutoUpdate = source.matrixAutoUpdate;
this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;
+ this.layers.copy( source.layers );
this.visible = source.visible;
this.castShadow = source.castShadow;