diff options
author | Luke Wilde <lukew@serenityos.org> | 2021-10-07 17:58:06 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-07 19:13:34 +0200 |
commit | ca060d8566948f2dfbcd965fad053cebc17122f2 (patch) | |
tree | 840d9193468ba594bba9f4b40089d00e965a5669 /Base/res/html/misc | |
parent | d4a0ecac31db3697ca7fbc1dac4a22b5e495826a (diff) | |
download | serenity-ca060d8566948f2dfbcd965fad053cebc17122f2.zip |
Base: Use requestAnimationFrame in Game of Life WASM demo
Since OOPWV now supports RAF, we can use it in the GOL WASM demo :^)
Diffstat (limited to 'Base/res/html/misc')
-rw-r--r-- | Base/res/html/misc/gol-wasm.html | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Base/res/html/misc/gol-wasm.html b/Base/res/html/misc/gol-wasm.html index b3e67c556c..51b5d15a15 100644 --- a/Base/res/html/misc/gol-wasm.html +++ b/Base/res/html/misc/gol-wasm.html @@ -1560,14 +1560,12 @@ time = performance.now() - start; celltime.innerText = time; - // FIXME: Use RAF when OOPWV supports it. - // requestAnimationFrame(renderLoop); - setTimeout(renderLoop, 16); + requestAnimationFrame(renderLoop); }; drawGrid(); drawCells(); - setTimeout(renderLoop, 16); + requestAnimationFrame(renderLoop); }) .catch(err => console.log(err.message, err)); </script> |