From 516e525e9cb64600c38e7c8657aeb86c63561d94 Mon Sep 17 00:00:00 2001 From: Arne Link Date: Sat, 26 Oct 2024 07:35:10 +0200 Subject: [PATCH] Fix loops when loopStart is undefined --- src/canvas-effects/canvas-effect.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/canvas-effects/canvas-effect.js b/src/canvas-effects/canvas-effect.js index 4288f01f..5078a00b 100644 --- a/src/canvas-effects/canvas-effect.js +++ b/src/canvas-effects/canvas-effect.js @@ -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++;