|
@@ -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;
|
|
|
|
|
|
}
|
|
|
|