提交 c966c355 编写于 作者: O ostolop

fix MorphBlendMesh start animation playing

bugfix: When currentFrame == animation.lastFrame then first animation frame is rest pose.
上级 d6384d20
......@@ -299,8 +299,12 @@ THREE.MorphBlendMesh.prototype.update = function ( delta ) {
if ( animation.directionBackwards ) mix = 1 - mix;
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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册