未验证 提交 288aa090 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #16407 from Mugen87/dev30

AnimationAction: Update .time before firing events.
......@@ -503,11 +503,19 @@ Object.assign( AnimationAction.prototype, {
time = 0;
} else break handle_stop;
} else {
this.time = time;
break handle_stop;
}
if ( this.clampWhenFinished ) this.paused = true;
else this.enabled = false;
this.time = time;
this._mixer.dispatchEvent( {
type: 'finished', action: this,
direction: deltaTime < 0 ? - 1 : 1
......@@ -559,6 +567,8 @@ Object.assign( AnimationAction.prototype, {
time = deltaTime > 0 ? duration : 0;
this.time = time;
this._mixer.dispatchEvent( {
type: 'finished', action: this,
direction: deltaTime > 0 ? 1 : - 1
......@@ -583,26 +593,30 @@ Object.assign( AnimationAction.prototype, {
this._loopCount = loopCount;
this.time = time;
this._mixer.dispatchEvent( {
type: 'loop', action: this, loopDelta: loopDelta
} );
}
} else {
this.time = time;
}
if ( pingPong && ( loopCount & 1 ) === 1 ) {
// invert time for the "pong round"
this.time = time;
return duration - time;
}
}
this.time = time;
return time;
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册