Skip to content

Commit

Permalink
Fix loops when loopStart is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Codas committed Oct 26, 2024
1 parent 09f74fd commit 516e525
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 516e525

Please sign in to comment.