new Bling.Engine(obj)
bling/Engine.js, line 11
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
obj |
object |
|
Members
-
tickerBling.ticker.Ticker
-
Methods
-
staticBling.Engine.getInstance(fps)
bling/Engine.js, line 31 -
实例化的 Engine,全App具有唯一性,如
const engine = Bling.Engine.getInstance()
:- 启动:在 app.js 的
onLaunch
或onShow
中执行engine.start()
启动 - 暂停:在任意地方执行
engine.pause()
暂停 - 恢复:在任意地方执行
engine.resume()
恢复
Name Type Default Description fps
number 30 optional 帧频
- 启动:在 app.js 的
-
changeFPS(fps)
bling/Engine.js, line 43 -
更改帧率
Name Type Description fps
帧率
-
destroy()
bling/Engine.js, line 102 -
销毁
-
isPaused() ❯ {boolean}
bling/Engine.js, line 96 -
是否暂停中
Returns:
Type Description boolean -
pause()
bling/Engine.js, line 80 -
暂停
- 暂停
Bling.Engine.ticker
下的所有事件(含主调度) - 暂停
Bling.TWEEN
动画
- 暂停
-
resume()
bling/Engine.js, line 63 -
恢复
- 恢复暂停的
Bling.Engine.ticker
下的所有事件(含主调度) - 恢复暂停的
Bling.TWEEN
动画
- 恢复暂停的
-
start()
bling/Engine.js, line 49 -
开始