diff --git a/src/App.vue b/src/App.vue index cc83e4a..20544ef 100644 --- a/src/App.vue +++ b/src/App.vue @@ -75,7 +75,10 @@ const move = (thisTick: number): void => { animationFrame = requestAnimationFrame(move) // do nothing when paused - if (paused.value) return + if (paused.value) { + lastTick = thisTick // reset tick, to avoid huge tickDelta + return + } const tickDelta = thisTick - lastTick lastTimeUpdate += tickDelta