pixi-wheels

AnticipationStyle

pixi-wheels


pixi-wheels / index / AnticipationStyle

Type Alias: AnticipationStyle

type AnticipationStyle = "creep" | "stutter" | "stall" | "auto";

Defined in: config/types.ts:202

The shape of a near-miss. The wheel decelerates once and comes to rest once, on the result: no style stops somewhere else and moves on. The pointer rests just inside the target, next to the divider it shares with the bait (rest), so the miss reads as “by a hair”.

  • 'creep': the wheel slows to a crawl exactly as the pointer enters the bait, keeps slowing across it, and barely crosses the line into the target. The bait must sit right before the target in the spin direction.
  • 'stutter': like 'creep', but the crawl all but stalls a hair short of the line (hesitateSpeed for dwellMs) before slipping over it. Same geometry as 'creep'.
  • 'stall': the pointer enters the target and crawls toward the bait’s line as if it will cross, and dies just short of it. The bait must sit right after the target. The “it was going to be the jackpot” miss.
  • 'auto' (default): 'creep' when the bait precedes the target, 'stall' when it follows, otherwise no anticipation and a warning.