NERDDISCO's picture
feat: added gameLoop that uses delta to draw
c976217
raw
history blame
307 Bytes
export const baseGame = {
default: `const canvas = document.querySelector('canvas');
canvas.style.backgroundColor = '#fff';
const ctx = canvas.getContext('2d');
function draw(delta) {
// TODO: Add drawing logic here
}
// NEVER stop the gameloop
requestAnimationFrame(createGameLoop(draw));
`.trim(),
};