Namespace: ticker

ticker

Tickers provide periodic callbacks based on a clock. Your game update logic will generally be run in response to a tick once per frame. You can have multiple tickers in use at one time.

import { Ticker } from 'pixi.js';

const ticker = new Ticker();
ticker.add((ticker) => {
   // do something every frame
});
ticker.start();

// or use the shared ticker instance *
Ticker.shared.add((ticker) => {
  // do something every frame
});

Classes

Ticker

Enums

UPDATE_PRIORITYnumber

Represents the update priorities used by internal PIXI classes when registered with the Ticker object. Higher priority items are updated first and lower priority items, such as render, should go later.

Properties:
Name Default Description
HIGH 25

High priority updating, used by AnimatedSprite

INTERACTION 50

Highest priority used for interaction events in EventSystem

LOW -25

Low priority used for Application rendering.

NORMAL 0

Default priority for ticker events, see add.

UTILITY -50

Lowest priority used for BasePrepare utility.