Browse Source

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

Add Mesh.copy() to fix this.
aardgoose 9 years ago
parent
commit
52d172db06
1 changed files with 10 additions and 0 deletions
  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 () {
 	updateMorphTargets: function () {
 
 
 		if ( this.geometry.morphTargets !== undefined && this.geometry.morphTargets.length > 0 ) {
 		if ( this.geometry.morphTargets !== undefined && this.geometry.morphTargets.length > 0 ) {