mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 06:02:07 +03:00
Base: Use requestAnimationFrame in Game of Life WASM demo
Since OOPWV now supports RAF, we can use it in the GOL WASM demo :^)
This commit is contained in:
parent
d4a0ecac31
commit
ca060d8566
Notes:
sideshowbarker
2024-07-18 02:57:02 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/ca060d85669 Pull-request: https://github.com/SerenityOS/serenity/pull/10391
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user