What problem does it solve?
This Skill helps you implement reliable per-frame logic in PixiJS by using the Ticker’s timing and ordering correctly, avoiding common delta misunderstandings that cause animations to run too fast, too slow, or inconsistently.
Core Features & Use Cases
- Correct time-step handling: Use
deltaTime, deltaMS, and elapsedMS for the right kinds of calculations (frame-rate-independent multipliers vs real-time milliseconds vs raw profiling).
- Deterministic callback ordering: Schedule updates with
UPDATE_PRIORITY so physics, animation, and render-adjacent work happen in the intended sequence.
- Frame-rate control and stability: Apply
maxFPS and minFPS capping to prevent frame drops from producing huge simulation steps.
- Object-bound per-frame hooks: Use
sprite.onRender for per-display-object logic during scene traversal.
- Lifecycle and rendering control: Understand when to use
app.ticker, how app.start()/stop() affect the render loop, and how to manually drive updates via ticker.update() and app.render().
Quick Start
Add an update callback using the Ticker instance parameter to rotate and move a sprite using ticker.deltaTime and ticker.deltaMS, while capping the ticker with app.ticker.maxFPS and enabling a per-object onRender hook for render-adjacent effects.