diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2022-11-09 23:44:26 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2022-11-09 23:44:26 +0000 |
| commit | f7957d3aa080dcdfc4c6450ff2590c101b71d94b (patch) | |
| tree | b32b3858da73d0533ed968681a518f9ae7ecf8be /emcclib.js | |
| parent | 7982002a644328164bf0f77bf489876ad012e90d (diff) | |
| download | puzzles-f7957d3aa080dcdfc4c6450ff2590c101b71d94b.zip puzzles-f7957d3aa080dcdfc4c6450ff2590c101b71d94b.tar.gz puzzles-f7957d3aa080dcdfc4c6450ff2590c101b71d94b.tar.bz2 puzzles-f7957d3aa080dcdfc4c6450ff2590c101b71d94b.tar.xz | |
js: Reinstate a missing variable declaration
... and then decide there was no excuse for renaming the variable, so
now it has the same name it had before I started using
Window.requestAnimationFrame().
Diffstat (limited to 'emcclib.js')
| -rw-r--r-- | emcclib.js | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -200,16 +200,16 @@ mergeInto(LibraryManager.library, { if (!timer_active) { timer_reference = performance.now(); var frame = function(now) { - current_timer = null; + timer = null; timer_callback((now - timer_reference) / 1000.0); /* The callback may have deactivated the timer. */ if (timer_active) { timer_reference = now; - current_timer = window.requestAnimationFrame(frame); + timer = window.requestAnimationFrame(frame); } } timer_active = true; - current_timer = window.requestAnimationFrame(frame); + timer = window.requestAnimationFrame(frame); } }, @@ -221,9 +221,9 @@ mergeInto(LibraryManager.library, { js_deactivate_timer: function() { if (timer_active) { timer_active = false; - if (current_timer !== null) { - window.cancelAnimationFrame(current_timer); - current_timer = null; + if (timer !== null) { + window.cancelAnimationFrame(timer); + timer = null; } } }, |