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;
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>