File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -468,13 +468,19 @@ Object.assign( AnimationAction.prototype, {
468468 _updateTime : function ( deltaTime ) {
469469
470470 var time = this . time + deltaTime ;
471+ var duration = this . _clip . duration ;
472+ var loop = this . loop ;
473+ var loopCount = this . _loopCount ;
471474
472- if ( deltaTime === 0 ) return time ;
475+ var pingPong = ( loop === LoopPingPong ) ;
473476
474- var duration = this . _clip . duration ,
477+ if ( deltaTime === 0 ) {
475478
476- loop = this . loop ,
477- loopCount = this . _loopCount ;
479+ if ( loopCount === - 1 ) return time ;
480+
481+ return ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time ;
482+
483+ }
478484
479485 if ( loop === LoopOnce ) {
480486
@@ -511,8 +517,6 @@ Object.assign( AnimationAction.prototype, {
511517
512518 } else { // repetitive Repeat or PingPong
513519
514- var pingPong = ( loop === LoopPingPong ) ;
515-
516520 if ( loopCount === - 1 ) {
517521
518522 // just started
You can’t perform that action at this time.
0 commit comments