Skip to content

Instantly share code, notes, and snippets.

@olygood
Created October 5, 2021 06:18
Show Gist options
  • Save olygood/0aea7e5da07693c6b39898c48bf6da5f to your computer and use it in GitHub Desktop.
Save olygood/0aea7e5da07693c6b39898c48bf6da5f to your computer and use it in GitHub Desktop.
project html5 game loop
// game loop setInterval sur 1000 => 1/60 ou 1000/60 conseillé
init()
let interval = setInterval(run,1000);
function run()
{
update();
draw();
}
function init()
{
console.log('hello je init');
}
function update()
{
console.log('game');
}
function draw()
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment