1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:07:45 +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:
Luke Wilde 2021-10-07 17:58:06 +01:00 committed by Andreas Kling
parent d4a0ecac31
commit ca060d8566

View file

@ -1560,14 +1560,12 @@
time = performance.now() - start; time = performance.now() - start;
celltime.innerText = time; celltime.innerText = time;
// FIXME: Use RAF when OOPWV supports it. requestAnimationFrame(renderLoop);
// requestAnimationFrame(renderLoop);
setTimeout(renderLoop, 16);
}; };
drawGrid(); drawGrid();
drawCells(); drawCells();
setTimeout(renderLoop, 16); requestAnimationFrame(renderLoop);
}) })
.catch(err => console.log(err.message, err)); .catch(err => console.log(err.message, err));
</script> </script>