Explorar el Código

Revert change of setting argument in Bone clone constructor

Use `copy` to set `skin` instead of passing in as argument to constructor
Daniel Hritzkiv hace 10 años
padre
commit
c95568e03b
Se han modificado 1 ficheros con 6 adiciones y 3 borrados
  1. 6 3
      src/objects/Bone.js

+ 6 - 3
src/objects/Bone.js

@@ -17,9 +17,12 @@ THREE.Bone = function ( skin ) {
 THREE.Bone.prototype = Object.create( THREE.Object3D.prototype );
 THREE.Bone.prototype.constructor = THREE.Bone;
 
-THREE.Bone.prototype.clone = function () {
+THREE.Bone.prototype.copy = function ( source ) {
 	
-	var bone = new this.constructor( this.skin );
-	return bone.copy( this );
+	THREE.Object3D.prototype.copy.call( this, source );
+	
+	this.skin = source.skin;
+	
+	return this;
 
 };

粤ICP备19079148号