API reference
runStep
pixi-reels / index / runStep
function runStep<TCtx extends StepContext<any, any, StepTiming>>(
run: (ctx: TCtx) => StepResult,
ctx: Omit<TCtx, "step" | "signal" | "anticipated"> & Partial<Pick<StepContext<unknown, SpeedProfile, StepTiming>, "step" | "anticipated">>,
controller?: AbortController
): RunningStep;
Defined in: spin/phases/steps.ts:179
Run one step with the cancel semantics the built-in phases use: a returned
animation is killed on cancel, a cancellable is cancelled, a promise is
aborted through ctx.signal, and done settles either way. Public so a
custom phase can run a step of its own the same way. Pass controller
when ctx.wait / ctx.until must abort on the same signal.
step and anticipated may be left out: a caller that knows nothing
about the profile’s sections gets an empty step config and a reel that has
not teased, which is what a hand-rolled step saw before sections existed.
Type Parameters#
| Type Parameter |
|---|
TCtx extends StepContext<any, any, StepTiming> |
Parameters#
| Parameter | Type |
|---|---|
run | (ctx: TCtx) => StepResult |
ctx | Omit<TCtx, "step" | "signal" | "anticipated"> & Partial<Pick<StepContext<unknown, SpeedProfile, StepTiming>, "step" | "anticipated">> |
controller | AbortController |