Created
February 24, 2014 21:27
-
-
Save adamkdean/9197523 to your computer and use it in GitHub Desktop.
requestAnimFrame
This file contains 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
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