Browse Source

Revert change of setting argument in Bone clone constructor

Use `copy` to set `skin` instead of passing in as argument to constructor
Daniel Hritzkiv 10 years ago
parent
commit
c95568e03b
1 changed files with 6 additions and 3 deletions
  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;
 
 };