mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00: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
1 changed files with 2 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue