direction | "forward" | "reverse" | Travel direction, relative to the reel’s own axis. - 'forward'. the strip travels the way this reel normally spins. On a vertical/forward reel that is downward, with new symbols entering from the top. - 'reverse'. the strip travels the other way, with new symbols entering from the opposite edge. Which screen edge feeds the reel is derived from the axis polarity, so a reel built with direction('reverse') nudges upward on 'forward' without the caller re-deriving anything. | core/Reel.ts:71 |
distance | number | Number of full symbol positions to shift. Must be a positive integer strictly less than the reel’s total strip capacity (bufferStart + visibleCells + bufferEnd). incoming.length must equal this exactly. | core/Reel.ts:57 |
duration? | number | Total animation duration in ms. Defaults to 200 * distance. | core/Reel.ts:92 |
ease? | string | GSAP easing function name. Defaults to 'power2.out'. a smooth deceleration with NO overshoot. If you pass an overshooting ease (back.out(N), elastic.out(...)), the engine clamps the displacement so wraps never fire past the landing position; the eased value is computed but the strip’s travel is bounded. | core/Reel.ts:100 |
incoming | string[] | Symbol ids in start-to-end order of their final on-strip position (top-down for vertical, left-to-right for horizontal), including any overflow into the off-screen buffer. Length must equal distance exactly. - incoming[0] ends up at the start-most new position. When the reel feeds from its start edge this is the new first visible cell (or, if distance > bufferStart + visibleCells, spills into bufferEnd tail-first via the trailing entries). When it feeds from the end edge and distance > visibleCells, incoming[0] lands in bufferStart (still start-most). - incoming[distance-1] ends up at the end-most new position. Mirror of the above. For the common case of distance <= visibleCells, every entry is a visible cell in strip order and you can ignore the overflow rules. | core/Reel.ts:90 |
signal? | AbortSignal | Abort the nudge mid-flight. If signalled before the tween starts, the call rejects with an AbortError and no strip mutation happens. If signalled during the tween, the tween is killed, the strip is snapped to its post-nudge position (deterministic landing. the contract is “incoming lands at these positions”), and the promise rejects with an AbortError. nudge:cancelled fires on the reel-set bus. | core/Reel.ts:127 |
startDelay? | number | Optional delay (ms) before the tween begins. Validation throws fire immediately on the call, but the actual reel mutation + tween are deferred by this much. Useful with Promise.all([...]) to stagger parallel nudges: await Promise.all( reels.map((reel, i) => reelSet.nudge(reel, { ..., startDelay: i * 80 }), ), ); ReelSet.nudge(reel, options, { stagger }) is sugar for the common uniform-stagger case. | core/Reel.ts:118 |