Back to Skills

pixijs-ticker

Use this skill when running per-frame logic or controlling the PixiJS v8 render loop. Covers Ticker.add/addOnce/remove, deltaTime vs deltaMS vs elapsedMS, UPDATE_PRIORITY ordering, maxFPS/minFPS capping, speed scaling, Ticker.shared vs new instances, per-object onRender hook, manual rendering. Triggers on: Ticker, UPDATE_PRIORITY, deltaTime, deltaMS, elapsedMS, onRender, app.ticker, maxFPS, minFPS, Ticker.shared.

255stars14forksUpdated 6/26/2026

Security Assessment

Safe(100/100)
Security Score100/100

About pixijs-ticker

Guidance for running per-frame logic and controlling the PixiJS v8 render loop through the Ticker. In v8, app.ticker registers callbacks that fire every frame and drives app.render() at UPDATE_PRIORITY.LOW. Each callback receives the Ticker instance itself, which exposes three distinct timing values: deltaTime, a dimensionless multiplier roughly equal to 1.0 at 60fps that is speed-scaled and minFPS-capped; deltaMS, real milliseconds for time-based calculations such as pixels per second; and elapsedMS, raw frame time with no scaling or cap, useful for profiling.

The skill covers the full registration API, including Ticker.add and addOnce, removal that must match both function and bound context, and priority ordering across INTERACTION (50), HIGH (25), NORMAL (0), LOW (-25), and UTILITY (-50). It explains frame-rate capping with maxFPS (which skips updates to enforce a ceiling) and minFPS (which caps the delta so large frame drops do not produce enormous values), plus speed scaling that affects deltaTime and deltaMS but not elapsedMS. It also distinguishes Ticker.shared (an autostarted, destroy-protected singleton), Ticker.system (used for engine background tasks), and a new Ticker() instance whose lifecycle you manage yourself.

Use it when building animation, physics, or game loops, when ordering systems by priority, or when you need manual control over rendering via app.start()/app.stop(), the autoStart: false option, and a custom frame driver calling ticker.update() and app.render(). The per-object onRender hook is presented as an alternative to a global callback for logic tied to a single display object. A prominent common-mistakes section warns that v8 passes the Ticker instance (not a delta number) to callbacks, so the v7 pattern of doing arithmetic on the argument yields NaN, and advises onRender over overriding updateTransform for per-frame work.

FAQ

What argument does a v8 ticker callback receive?

It receives the Ticker instance, not a delta number. You read ticker.deltaTime, ticker.deltaMS, or ticker.elapsedMS from it; doing arithmetic directly on the argument (the v7 pattern) produces NaN.

What is the difference between deltaTime, deltaMS, and elapsedMS?

deltaTime is a dimensionless multiplier (~1.0 at 60fps) for frame-rate-independent animation; deltaMS is real milliseconds for time-based math like pixels/sec; elapsedMS is raw milliseconds with no speed scaling and no minFPS cap, used for profiling.

How do I control the order in which callbacks run?

Pass an UPDATE_PRIORITY value as the third argument to ticker.add. The order is INTERACTION (50) > HIGH (25) > NORMAL (0) > LOW (-25) > UTILITY (-50), and app.render() is registered at LOW by the TickerPlugin.

How do I cap the frame rate?

Set ticker.maxFPS to skip update calls and enforce a ceiling, and ticker.minFPS to cap deltaTime/deltaMS so large frame drops do not create huge deltas (default minFPS is 10). If maxFPS is below minFPS the values are adjusted to match.

When should I drive the render loop manually instead of using the built-in one?

Initialize with autoStart: false and call ticker.update() plus app.render() yourself when you need to pause on tab blur, run a fixed-timestep loop, or render offscreen. app.start() and app.stop() (added by TickerPlugin) pause and resume the built-in loop.

Install pixijs-ticker

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill