未验证 提交 bc844a70 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15062 from WestLangley/dev-line_clone_copy

Line: fix copy and clone methods
...@@ -244,9 +244,20 @@ Line.prototype = Object.assign( Object.create( Object3D.prototype ), { ...@@ -244,9 +244,20 @@ Line.prototype = Object.assign( Object.create( Object3D.prototype ), {
}() ), }() ),
copy: function ( source ) {
Object3D.prototype.copy.call( this, source );
this.geometry.copy( source.geometry );
this.material.copy( source.material );
return this;
},
clone: function () { clone: function () {
return new this.constructor( this.geometry, this.material ).copy( this ); return new this.constructor().copy( this );
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册