From 02a436dc79f17f63abd0dfcc030abcc3b018bf0b Mon Sep 17 00:00:00 2001 From: David Walker Date: Sun, 12 Mar 2023 15:31:58 -0700 Subject: [PATCH] ENGINE: Use setTimeout() instead of requestAnimationFrame() (#421) --- src/engine.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine.tsx b/src/engine.tsx index 9fc9c308b..cc57a6a6a 100644 --- a/src/engine.tsx +++ b/src/engine.tsx @@ -407,7 +407,7 @@ const Engine: { Player.lastUpdate = _thisUpdate - offset; Engine.updateGame(diff); } - window.requestAnimationFrame(Engine.start); + window.setTimeout(Engine.start, CONSTANTS.MilliPerCycle - offset); }, };