Skip to content

Instantly share code, notes, and snippets.

@adamkdean
Created February 24, 2014 21:27
Show Gist options
  • Save adamkdean/9197523 to your computer and use it in GitHub Desktop.
Save adamkdean/9197523 to your computer and use it in GitHub Desktop.
requestAnimFrame
DisplayEngine.prototype.loop = function(instance) {
instance.update();
instance.draw();
this.requestAnimFrame.call(window, function() {
instance.loop(instance);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment