|
@@ -468,13 +468,19 @@ Object.assign( AnimationAction.prototype, {
|
|
|
_updateTime: function ( deltaTime ) {
|
|
|
|
|
|
var time = this.time + deltaTime;
|
|
|
+ var duration = this._clip.duration;
|
|
|
+ var loop = this.loop;
|
|
|
+ var loopCount = this._loopCount;
|
|
|
|
|
|
- if ( deltaTime === 0 ) return time;
|
|
|
+ var pingPong = ( loop === LoopPingPong );
|
|
|
|
|
|
- var duration = this._clip.duration,
|
|
|
+ if ( deltaTime === 0 ) {
|
|
|
|
|
|
- loop = this.loop,
|
|
|
- loopCount = this._loopCount;
|
|
|
+ if ( loopCount === - 1 ) return time;
|
|
|
+
|
|
|
+ return ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
if ( loop === LoopOnce ) {
|
|
|
|
|
@@ -511,8 +517,6 @@ Object.assign( AnimationAction.prototype, {
|
|
|
|
|
|
} else { // repetitive Repeat or PingPong
|
|
|
|
|
|
- var pingPong = ( loop === LoopPingPong );
|
|
|
-
|
|
|
if ( loopCount === - 1 ) {
|
|
|
|
|
|
// just started
|