Prechádzať zdrojové kódy

AnimationAction: Fix LoopRepeat

Mugen87 7 rokov pred
rodič
commit
8bea1dada9
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      src/animation/AnimationAction.js

+ 2 - 2
src/animation/AnimationAction.js

@@ -546,7 +546,7 @@ Object.assign( AnimationAction.prototype, {
 
 
 				var pending = this.repetitions - loopCount;
 				var pending = this.repetitions - loopCount;
 
 
-				if ( pending < 0 ) {
+				if ( pending <= 0 ) {
 
 
 					// have to stop (switch state, clamp time, fire event)
 					// have to stop (switch state, clamp time, fire event)
 
 
@@ -564,7 +564,7 @@ Object.assign( AnimationAction.prototype, {
 
 
 					// keep running
 					// keep running
 
 
-					if ( pending === 0 ) {
+					if ( pending === 1 ) {
 
 
 						// entering the last round
 						// entering the last round