Abstracts away the use of RAF or setTimeOut for the core game update loop.
Name | Type | Argument | Default | Description |
---|---|---|---|---|
game | Phaser.Game | A reference to the currently running game. | ||
forceSetTimeOut | boolean | <optional> | false | Tell Phaser to use setTimeOut even if raf is available. |
Tell Phaser to use setTimeOut even if raf is available.
The currently running game.
true if RequestAnimationFrame is running, otherwise false.
Is the browser using requestAnimationFrame?
Is the browser using setTimeout?
Starts the requestAnimationFrame running or setTimeout if unavailable in browser
Stops the requestAnimationFrame from running.
The update method for the requestAnimationFrame
The update method for the setTimeout.
© 2016 Richard Davey, Photon Storm Ltd.
Licensed under the MIT License.
http://phaser.io/docs/2.6.2/Phaser.RequestAnimationFrame.html