# Class: RequestAnimationFrame

## Phaser. RequestAnimationFrame

Phaser.RequestAnimationFrame

#### new RequestAnimationFrame(game, forceSetTimeOut)

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

  ##### Parameters:

  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.

  Source:
    - system/RequestAnimationFrame.js, line 15

### Members

#### forceSetTimeOut

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `forceSetTimeOut` | boolean | Tell Phaser to use setTimeOut even if raf is available.

  Source:
    - system/RequestAnimationFrame.js, line 33

#### game

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `game` | Phaser.Game | The currently running game.

  Source:
    - system/RequestAnimationFrame.js, line 22

#### isRunning

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `isRunning` | boolean | true if RequestAnimationFrame is running, otherwise false.

  Default Value:
    - false
  Source:
    - system/RequestAnimationFrame.js, line 28

### Methods

#### isRAF() → {boolean}

  Is the browser using requestAnimationFrame?

  Source:
    - system/RequestAnimationFrame.js, line 155

  ##### Returns:

  Type
    boolean

#### isSetTimeOut() → {boolean}

  Is the browser using setTimeout?

  Source:
    - system/RequestAnimationFrame.js, line 146

  ##### Returns:

  Type
    boolean

#### start()

  Starts the requestAnimationFrame running or setTimeout if unavailable in browser

  Source:
    - system/RequestAnimationFrame.js, line 70

#### stop()

  Stops the requestAnimationFrame from running.

  Source:
    - system/RequestAnimationFrame.js, line 127

#### updateRAF()

  The update method for the requestAnimationFrame

  Source:
    - system/RequestAnimationFrame.js, line 103

#### updateSetTimeout()

  The update method for the setTimeout.

  Source:
    - system/RequestAnimationFrame.js, line 115