Module hilo/util/Ticker
Requires
hilo/core/Class, hilo/util/browser
Source
Ticker.js
Ticker is a Timer. It can run the code at specified framerate.
| Method | Defined | |
|---|---|---|
|
Ticker(fps:Number)
Constructor
|
Ticker | |
|
addTick(tickObject:Object)
Add tickObject.
|
Ticker | |
|
Get the fps.
|
Ticker | |
|
interval(callback:Function, duration:Number):tickObj
指定的时间周期来调用函数, 类似setInterval
|
Ticker | |
|
nextTick(callback:Function):tickObj
下次tick时回调
|
Ticker | |
|
pause()
Pause the ticker.
|
Ticker | |
|
removeTick(tickObject:Object)
Remove the tickObject
|
Ticker | |
|
resume()
Resume the ticker.
|
Ticker | |
|
start(userRAF:Boolean)
Start the ticker.
|
Ticker | |
|
stop()
Stop the ticker.
|
Ticker | |
|
timeout(callback:Function, duration:Number):tickObj
延迟指定的时间后调用回调, 类似setTimeout
|
Ticker |