API reference
ExpandOptions
pixi-reels / index / ExpandOptions
Defined in: core/expand.ts:76
Options for ReelSet.expand.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
anticipation? | | boolean | AnticipationOptions | ((step: ExpandStep) => boolean | AnticipationOptions) | Tease a step’s reels before they land, with setAnticipation() on every reel the step adds. true teases with the defaults (the speed profile’s anticipationDelay is the hold); an AnticipationOptions object is passed through, so a step’s tease can be staggered, curved or protected from the first skip press ({ protect: 'once' }); a function decides per step. The fast-forward step never teases. | core/expand.ts:116 |
columns | readonly ColumnTarget[] | The result of every reel to add, in order, one ColumnTarget per reel. Its length is how many reels the board grows by; the server decides it. Each column’s visible.length is that reel’s cell count, so a MultiWays set takes its per-reel shape from here and a jagged set its height. A column may be taller than the board if an addRows() in an earlier step’s onStepLanded makes room for it; its height is checked when its step starts. Big symbols anchor in these columns like they do in setResult(), and a block has to end on a reel this expansion adds. | core/expand.ts:88 |
mode? | "standard" | "cascade" | Spin mode of every step. Defaults to the set’s default, as in spin(). | core/expand.ts:121 |
onStepAdded? | (step: ExpandStep) => void | Promise<void> | Called once a step’s reels are on the board and before they spin, and awaited: pan the camera to them here so the player sees them arrive. Return the pan’s promise to spin after it, or nothing to spin during it. reelSet.viewport.maskWidth is the board’s new width. | core/expand.ts:102 |
onStepLanded? | (step: ExpandStepLanded) => void | Promise<void> | Called once a step’s reels land, and awaited before the next step adds any: count the ways, draw the win, decide what the next step shows. | core/expand.ts:107 |
signal? | AbortSignal | Fast-forward, not cancel: the columns are the server’s result, so every one of them still lands. Aborting slams the step in flight, then adds every reel still to come in one last step that lands in the same tick, and expand() resolves with wasSkipped: true. onStepAdded / onStepLanded still run for that step, with fastForward: true. Pass AbortSignal.abort() to land a whole expansion at once (quick spin, autoplay, tests). | core/expand.ts:131 |
step? | | number | ((info: { from: number; index: number; remaining: number; }) => number) | Reels added and spun per step. A number (default 1), or a function of the step for a pattern such as “two, then one at a time”. A step is widened, never split, when a big symbol anchored in it reaches past its last reel: a 2-reel block in a 1-reel step makes that step add two. | core/expand.ts:95 |