new PIXI.ticker.Ticker()
Members
-
minFPS
-
Sets the min fps.
Methods
-
add(fn, context){PIXI.ticker.Ticker}
-
Calls module:eventemitter3.EventEmitter#on internally for the
internal 'tick' event. It checks if the emitter has listeners,
and if so it requests a new animation frame at this point.Name Type Description fn
function The listener function to be added for updates
context
function optional The listener context
Returns:
Type Description PIXI.ticker.Ticker This instance of a ticker -
addOnce(fn, context){PIXI.ticker.Ticker}
-
Calls module:eventemitter3.EventEmitter#once internally for the
internal 'tick' event. It checks if the emitter has listeners,
and if so it requests a new animation frame at this point.Name Type Description fn
function The listener function to be added for one update
context
function optional The listener context
Returns:
Type Description PIXI.ticker.Ticker This instance of a ticker -
remove(fn, context){PIXI.ticker.Ticker}
-
Calls module:eventemitter3.EventEmitter#off internally for 'tick' event.
It checks if the emitter has listeners for 'tick' event.
If it does, then it cancels the animation frame.Name Type Description fn
function optional The listener function to be removed
context
function optional The listener context to be removed
Returns:
Type Description PIXI.ticker.Ticker This instance of a ticker -
start()
-
Starts the ticker. If the ticker has listeners
a new animation frame is requested at this point. -
stop()
-
Stops the ticker. If the ticker has requested
an animation frame it is canceled at this point. -
update(currentTime)
-
Triggers an update. An update entails setting the
current PIXI.ticker.Ticker#elapsedMS,
the current PIXI.ticker.Ticker#deltaTime,
invoking all listeners with current deltaTime,
and then finally setting PIXI.ticker.Ticker#lastTime
with the value of currentTime that was provided.
This method will be called automatically by animation
frame callbacks if the ticker instance has been started
and listeners are added.Name Type Default Description currentTime
number performance.now() optional the current time of execution