Created
December 20, 2015 00:06
-
-
Save jonbro/8445504b3fc630c3d544 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| requestAnimFrameSystem = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { | |
| return window.setTimeout(callback, Game.INTERVAL / 2); | |
| }; | |
| requestAnimFrame = function(callback) { | |
| return requestAnimFrameSystem(function() { | |
| var e; | |
| try { | |
| return callback(); | |
| } catch (_error) { | |
| e = _error; | |
| return console.log(e); | |
| } | |
| }); | |
| }; | |
| var updateFrame = function(){ | |
| meter.tickStart(); | |
| try { | |
| L.execute("drawFrame()") | |
| } catch(e) { | |
| EditorConsole.appendErrorWithLineLink(e.toString(), 0,0); | |
| console.log(e); | |
| } | |
| meter.tick(); | |
| return requestAnimFrame(updateFrame); | |
| } | |
| requestAnimFrame(updateFrame) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment