浏览代码

Mesh copy and clone methods do not copy the drawMode property. (#9023)

Add Mesh.copy() to fix this.
aardgoose 9 年之前
父节点
当前提交
52d172db06
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      src/objects/Mesh.js

+ 10 - 0
src/objects/Mesh.js

@@ -30,6 +30,16 @@ THREE.Mesh.prototype = Object.assign( Object.create( THREE.Object3D.prototype ),
 
 	},
 
+	copy: function ( source ) {
+
+		THREE.Object3D.prototype.copy.call( this, source );
+
+		this.drawMode = source.drawMode;
+
+		return this;
+
+	},
+
 	updateMorphTargets: function () {
 
 		if ( this.geometry.morphTargets !== undefined && this.geometry.morphTargets.length > 0 ) {