提交 2ac5aeea 编写于 作者: L looeee

Added copy and clone to Layers

上级 12a70b86
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册