Class: RequestAnimationFrame

Phaser. RequestAnimationFrame

Phaser.RequestAnimationFrame

new RequestAnimationFrame(game)

Abstracts away the use of RAF or setTimeOut for the core game update loop.

Parameters:
Name Type Description
game Phaser.Game

A reference to the currently running game.

Source:

Members

game

Properties:
Name Type Description
game Phaser.Game

The currently running game.

Source:

isRunning

Properties:
Name Type Description
isRunning boolean

true if RequestAnimationFrame is running, otherwise false.

Default Value:
  • false
Source:

Methods

isRAF() → {boolean}

Is the browser using requestAnimationFrame?

Source:
Returns:
Type
boolean

isSetTimeOut() → {boolean}

Is the browser using setTimeout?

Source:
Returns:
Type
boolean

start()

Starts the requestAnimationFrame running or setTimeout if unavailable in browser

Source:

stop()

Stops the requestAnimationFrame from running.

Source:

updateRAF(time)

The update method for the requestAnimationFrame

Parameters:
Name Type Description
time number

A timestamp, either from RAF or setTimeOut

Source:

updateSetTimeout()

The update method for the setTimeout.

Source:
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Tue Feb 18 2014 03:01:25 GMT-0000 (GMT) using the DocStrap template.