浏览代码

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 年之前
父节点
当前提交
c95568e03b
共有 1 个文件被更改,包括 6 次插入3 次删除
  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;
 
 };