diff --git a/ch06/04-jump-fixed-speed/pop/Game.js b/ch06/04-jump-fixed-speed/pop/Game.js index 161983c..eb685d9 100644 --- a/ch06/04-jump-fixed-speed/pop/Game.js +++ b/ch06/04-jump-fixed-speed/pop/Game.js @@ -35,7 +35,11 @@ class Game { } this.renderer.render(this.scene); }; - requestAnimationFrame(loopy); + const init = ms => { + last = ms / 1000; + requestAnimationFrame(loopy); + }; + requestAnimationFrame(init); } }