Created
December 10, 2019 09:21
-
-
Save CodeDraken/e7e274402303b74c92b8206a0b207ec5 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
| // the main piece of the loop | |
| // runs everything | |
| function update () { | |
| // queue the next update | |
| window.requestAnimationFrame(update) | |
| // logic goes here | |
| // draw after logic/calculations | |
| draw() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment