PR pixi-reels
All recipes

Skip an in-flight nudge

Fast-forward a running nudge tween to its landed state with `reelSet.skipNudge(col)`. The original `nudge()` promise resolves normally. the consumer's success path still runs.

Loading recipe…

Skip lands a nudge immediately, success path. The nudge() promise resolves with the new visible column on the next microtask. exactly as if the tween had run to completion. Use this for player-driven turbo buttons or accessibility shortcuts where the post-nudge UI (win re-detect, spotlight, HUD update) should still fire.

The one-liner

const p = reelSet.nudge(2, {
  distance: 1, direction: 'down', incoming: ['wild'], duration: 1500,
});
skipButton.onclick = () => reelSet.skipNudge(2);
const { symbols } = await p; // success path

Call skipNudge(col) to skip a single reel, or skipNudge() (no argument) to skip every in-flight nudge across all reels. A skip on a reel that isn’t nudging is a no-op. safe to call defensively.

Skip vs abort

skipNudge(col)signal.abort()
nudge() promiseResolves normallyRejects with AbortError
Strip landsYes (deterministic)Yes (deterministic)
Eventnudge:complete firesnudge:cancelled fires
Use whenPlayer wants it NOWTear-down / cancel-the-whole-feature

See Abort a nudge for the rejection path.

How the RecipeRunner handles it

The canvas button in this site’s recipe runner intercepts the player’s mid-action tap. Its priority order:

  1. If the recipe declared a custom onSkip callback in its return object, that wins.
  2. Else if any reel isNudging, call reelSet.skipNudge().
  3. Else call the spin pipeline’s skip() / requestSkip().

So this recipe needs no custom handler. the default behaviour does the right thing.