2
0
Эх сурвалжийг харах

Fixed MorphAnimation mesh reference.

Mr.doob 11 жил өмнө
parent
commit
dcc9353317

+ 5 - 5
src/extras/animation/MorphAnimation.js

@@ -51,17 +51,17 @@ THREE.MorphAnimation.prototype = {
 
 			if ( frame != currentFrame ) {
 
-				mesh.morphTargetInfluences[ lastFrame ] = 0;
-				mesh.morphTargetInfluences[ currentFrame ] = 1;
-				mesh.morphTargetInfluences[ frame ] = 0;
+				this.mesh.morphTargetInfluences[ lastFrame ] = 0;
+				this.mesh.morphTargetInfluences[ currentFrame ] = 1;
+				this.mesh.morphTargetInfluences[ frame ] = 0;
 
 				lastFrame = currentFrame;
 				currentFrame = frame;
 
 			}
 
-			mesh.morphTargetInfluences[ frame ] = ( currentTime % interpolation ) / interpolation;
-			mesh.morphTargetInfluences[ lastFrame ] = 1 - mesh.morphTargetInfluences[ frame ];
+			this.mesh.morphTargetInfluences[ frame ] = ( currentTime % interpolation ) / interpolation;
+			this.mesh.morphTargetInfluences[ lastFrame ] = 1 - this.mesh.morphTargetInfluences[ frame ];
 
 		}