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 :boolean

Tell Phaser to use setTimeOut even if raf is available.

Source - system/RequestAnimationFrame.js, line 33

game :Phaser.Game

The currently running game.

Source - system/RequestAnimationFrame.js, line 22

isRunning :boolean

true if RequestAnimationFrame is running, otherwise false.

Source - system/RequestAnimationFrame.js, line 28

Methods

isRAF() → {boolean}

Is the browser using requestAnimationFrame?

Returns:
boolean -
Source - system/RequestAnimationFrame.js, line 157

isSetTimeOut() → {boolean}

Is the browser using setTimeout?

Returns:
boolean -
Source - system/RequestAnimationFrame.js, line 148

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 129

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 117
Phaser Copyright © 2012-2015 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.2 on Thu Feb 18 2016 14:41:06 GMT+0000 (GMT Standard Time) using the DocStrap template.

快捷菜单

注意:只有登录才能全文翻译,每个新用户赠送300会员币。
赚取方法:文章评论+1000,分享网站截图给站长+3000,另充10元+100万会员币
支持一下记得截图给站长!

VIP限时免费阅读!登录可得1万币尽情中文阅读!


记得CTRL+D收藏!
站长微信:
支持自学php网
如有问题,记得强刷一下.

  • forceSetTimeOut :boolean - 属性
  • game :Phaser.Game - 属性
  • isRunning :boolean - 属性
  • isRAF() → {boolean} - 方法
  • isSetTimeOut() → {boolean} - 方法
  • start() - 方法
  • stop() - 方法
  • updateRAF() - 方法
  • updateSetTimeout() - 方法