Loop de jogo JavaScript

function loop() {
  //Game logic here
  
  requestAnimationFrame(loop);
}
loop();
TC5550