Created
November 30, 2015 02:58
-
-
Save Joncom/e12b70cec53df547de59 to your computer and use it in GitHub Desktop.
Manually Set FPS in ImpactJS
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
// This is how to manually set the frames per second in ImpactJS. | |
setTimeout(function() { | |
var fps = 60; | |
ig.system.stopRunLoop(); | |
window.setInterval( ig.system.run.bind(ig.system), 1000/fps ); | |
}, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment