// Example 3: Add custom update logic app.ticker.add((ticker) => { // Run every frame, delta is the time since last update sprite.rotation +=0.1* ticker.deltaTime; });
// Example 4: Control update priority import { UPDATE_PRIORITY } from'pixi.js';
app.ticker.add( (ticker) => { // Run before normal priority updates }, null, UPDATE_PRIORITY.HIGH );
// Example 5: One-time update app.ticker.addOnce(() => { console.log('Runs next frame only'); });
Middleware for Application's Ticker functionality. This plugin manages the animation loop and update cycle of your PixiJS application.
Adds the following features to Application:
ticker
: Access to the application's tickerstart
: Start the animation loopstop
: Stop the animation loopExample
See