createManualTicker
Creates a stopped PixiJS ticker with step-based frame advancement methods.
type ManualTicker = { ticker: Ticker; fastForwardFrames(frames: number, deltaTime?: number): void; fastForwardTime(totalTimeMS: number, stepSizeMS?: number): void;};fastForwardFrames()
Section titled “fastForwardFrames()”Advance a specific number of frames, each with an optional delta time (defaults to 16ms).
const manual = createManualTicker();let calls = 0;manual.ticker.add(() => { calls++; });
manual.fastForwardFrames(10); // 10 frames at 16ms eachmanual.fastForwardFrames(5, 33); // 5 frames at 33ms each (~30fps)expect(calls).toBe(15);fastForwardTime()
Section titled “fastForwardTime()”Advance frames to simulate a total elapsed time, splitting it into steps of a given size (defaults to ~16ms).
manual.fastForwardTime(1000); // 1 second in ~16ms stepsmanual.fastForwardTime(500, 50); // 500ms in 50ms stepsRelated
Section titled “Related”createTestContext— creates mock context that includes aManualTicker