瀏覽代碼

Clean up.

Mr.doob 10 年之前
父節點
當前提交
f2491f3dc0
共有 1 個文件被更改,包括 8 次插入4 次删除
  1. 8 4
      src/extras/objects/MorphBlendMesh.js

+ 8 - 4
src/extras/objects/MorphBlendMesh.js

@@ -299,11 +299,15 @@ THREE.MorphBlendMesh.prototype.update = function ( delta ) {
 
 		if ( animation.directionBackwards ) mix = 1 - mix;
 
-		if (animation.currentFrame !== animation.lastFrame) {
-			this.morphTargetInfluences[animation.currentFrame] = mix * weight;
-			this.morphTargetInfluences[animation.lastFrame] = ( 1 - mix ) * weight;
+		if ( animation.currentFrame !== animation.lastFrame ) {
+
+			this.morphTargetInfluences[ animation.currentFrame ] = mix * weight;
+			this.morphTargetInfluences[ animation.lastFrame ] = ( 1 - mix ) * weight;
+
 		} else {
-			this.morphTargetInfluences[animation.currentFrame] = weight;
+
+			this.morphTargetInfluences[ animation.currentFrame ] = weight;
+
 		}
 
 	}