From 0bbe48ad7968667478ec6c264a0fd918fdef60b5 Mon Sep 17 00:00:00 2001 From: Karyon Trotters <71095068+RoundingExplorer@users.noreply.github.com> Date: Tue, 2 Nov 2021 17:55:30 +0530 Subject: [PATCH] Update animframe_polyfill.js --- examples/2048/js/game/animframe_polyfill.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/2048/js/game/animframe_polyfill.js b/examples/2048/js/game/animframe_polyfill.js index c524a994..f19735d9 100644 --- a/examples/2048/js/game/animframe_polyfill.js +++ b/examples/2048/js/game/animframe_polyfill.js @@ -9,13 +9,13 @@ if (!window.requestAnimationFrame) { window.requestAnimationFrame = function (callback) { - var currTime = new Date().getTime(); + var currentTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window.setTimeout(function () { - callback(currTime + timeToCall); + callback(currentTime + timeToCall); }, timeToCall); - lastTime = currTime + timeToCall; + lastTime = currentTime + timeToCall; return id; }; }