瀏覽代碼

Mesh .updateMorphTargets(): Ensure strings in morph target names

Mugen87 8 年之前
父節點
當前提交
94cd2389c9
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/objects/Mesh.js

+ 2 - 2
src/objects/Mesh.js

@@ -75,7 +75,7 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 					for ( m = 0, ml = morphAttribute.length; m < ml; m ++ ) {
 
-						name = morphAttribute[ m ].name || m;
+						name = morphAttribute[ m ].name || String( m );
 
 						this.morphTargetInfluences.push( 0 );
 						this.morphTargetDictionary[ name ] = m;
@@ -97,7 +97,7 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 				for ( m = 0, ml = morphTargets.length; m < ml; m ++ ) {
 
-					name = morphTargets[ m ].name || m;
+					name = morphTargets[ m ].name || String( m );
 
 					this.morphTargetInfluences.push( 0 );
 					this.morphTargetDictionary[ name ] = m;