game.js
// Main game loop, repeats 60 times per second, calls whichever state the game is in
Main game loop, repeats 60 times per second, calls whichever state the game is in
Main game loop repeats 60 times per second calls whichever state the game is in
function gameLoop() {
	requestAnimFrame( gameLoop );
	state();
	renderer.render(stage);
}
function gameLoop ( ) { requestAnimFrame ( gameLoop ) ; state ( ) ; renderer . render ( stage ) ; }
Main game loop, repeats 60 times per second, calls whichever state the game is in
Main game loop repeats 60 times per second calls whichever state the game is in
// render the stage   