Created
October 5, 2021 06:18
-
-
Save olygood/0aea7e5da07693c6b39898c48bf6da5f to your computer and use it in GitHub Desktop.
project html5 game loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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