pixi-reels

runStep()

pixi-reels


pixi-reels / index / runStep

Function: runStep()

function runStep<TCtx extends StepContext<any, any>>(
   run: (ctx: TCtx) => StepResult, 
   ctx: Omit<TCtx, "signal">, 
   controller?: AbortController
): RunningStep;

Defined in: spin/phases/steps.ts:155

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.

Type Parameters#

Type Parameter
TCtx extends StepContext<any, any>

Parameters#

ParameterType
run(ctx: TCtx) => StepResult
ctxOmit<TCtx, "signal">
controllerAbortController

Returns#

RunningStep