Explorar o código

Fixed MorphAnimation mesh reference.

Mr.doob %!s(int64=12) %!d(string=hai) anos
pai
achega
dcc9353317
Modificáronse 1 ficheiros con 5 adicións e 5 borrados
  1. 5 5
      src/extras/animation/MorphAnimation.js

+ 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 ];
 
 		}
 

粤ICP备19079148号