aboutsummaryrefslogtreecommitdiff
path: root/html/samegame.html
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-11-13 00:15:00 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-11-13 00:15:00 +0000
commit5a225bf585ba302dbae1eca567b2070c67ea2981 (patch)
tree6daa8edb2575e78006d2254634ef52d0d205d7ad /html/samegame.html
parent5a90dd9312ed2568d1d7f4b2f728614c29ee0f85 (diff)
downloadpuzzles-5a225bf585ba302dbae1eca567b2070c67ea2981.zip
puzzles-5a225bf585ba302dbae1eca567b2070c67ea2981.tar.gz
puzzles-5a225bf585ba302dbae1eca567b2070c67ea2981.tar.bz2
puzzles-5a225bf585ba302dbae1eca567b2070c67ea2981.tar.xz
js: Substantially simplify timer code
The C code in the Emscripten front-end already keeps a timer_active variable to ensure that the timer can be activated only when it's inactive, and deactivated only when it's active. Adjusting the JavaScript side to rely on this makes the code much simpler. The only oddity is that it now requests a new animation frame before calling the callback so that it's ready to be cancelled if the callback decides to deactivate the timer.
Diffstat (limited to 'html/samegame.html')
0 files changed, 0 insertions, 0 deletions