Skip to content

Commit 045c3bd

Browse files
committed
Merge branch 'patch-1' of https://github.com/tormozok/three.js into dev
2 parents 8d331de + c966c35 commit 045c3bd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/extras/objects/MorphBlendMesh.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,12 @@ THREE.MorphBlendMesh.prototype.update = function ( delta ) {
299299

300300
if ( animation.directionBackwards ) mix = 1 - mix;
301301

302-
this.morphTargetInfluences[ animation.currentFrame ] = mix * weight;
303-
this.morphTargetInfluences[ animation.lastFrame ] = ( 1 - mix ) * weight;
302+
if (animation.currentFrame !== animation.lastFrame) {
303+
this.morphTargetInfluences[animation.currentFrame] = mix * weight;
304+
this.morphTargetInfluences[animation.lastFrame] = ( 1 - mix ) * weight;
305+
} else {
306+
this.morphTargetInfluences[animation.currentFrame] = weight;
307+
}
304308

305309
}
306310

0 commit comments

Comments
 (0)