Skip to content

Commit

Permalink
Merge pull request #349 from Codas/more-spritesheet-loop-fixes
Browse files Browse the repository at this point in the history
Fix loops when loopStart is undefined
  • Loading branch information
Haxxer authored Oct 26, 2024
2 parents 09f74fd + 516e525 commit cd586b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/canvas-effects/canvas-effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -3267,7 +3267,9 @@ export default class CanvasEffect extends PIXI.Container {
return;
}

const restartTime = this._startTime || this._animationTimes.loopStart;
const restartTime = this._startTime === 0 && this._animationTimes.loopStart
? this._animationTimes.loopStart
: this._startTime;
// no loop delay means just start again at the beginning!
if (!this.loopDelay) {
this._currentLoops++;
Expand Down

0 comments on commit cd586b0

Please sign in to comment.