Created
April 10, 2012 18:35
-
-
Save talentless/2353548 to your computer and use it in GitHub Desktop.
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
// something similar to this | |
var lt = Date.now(); | |
var step = function() { var nt = Date.now(); var dt = nt-lt; lt = nt; Crafty.trigger("Step", dt/1000); } | |
Crafty.bind("EnterFrame", step); | |
Crafty.bind("Step", function(dt) { /* Do Stuff Here */ }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment