提交 e02ff942 编写于 作者: M Mr.doob

Mesh: Simplified updateMorphTargets().

上级 210a970b
......@@ -56,15 +56,17 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
updateMorphTargets: function () {
if ( this.geometry.morphTargets !== undefined && this.geometry.morphTargets.length > 0 ) {
var morphTargets = this.geometry.morphTargets;
if ( morphTargets !== undefined && morphTargets.length > 0 ) {
this.morphTargetInfluences = [];
this.morphTargetDictionary = {};
for ( var m = 0, ml = this.geometry.morphTargets.length; m < ml; m ++ ) {
for ( var m = 0, ml = morphTargets.length; m < ml; m ++ ) {
this.morphTargetInfluences.push( 0 );
this.morphTargetDictionary[ this.geometry.morphTargets[ m ].name ] = m;
this.morphTargetDictionary[ morphTargets[ m ].name ] = m;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册