The base spin lands, and then the board grows. reelSet.expand({ columns }) adds the reels the server’s result has beyond the base board, a step at a time, and spins only the new reels while the earlier ones hold. addReels() and removeReels() are the calls underneath it, and the next round shrinks the board back with removeReels(). The infinity reels guide has the short version: what the server sends, the calls, and the events.
The first demo is the plain mechanic. The next ones change the board’s shape during the expansion, and the last covers skipping.
Add one reel per step#
While the win still reaches the last reel, the server adds another reel to its result. Each step pans the camera to the new reel in onStepAdded, spins and lands it, then counts the ways and draws them with WinLines in onStepLanded.
The steps count as one round for skipping. The first press slams the step in flight and switches the rest to turbo, the same boost skipSpin() gives the rest of any round. In cascade mode the later steps land at once instead, the way one press ends a cascade. The second press aborts the expansion’s signal, which lands every reel still to come in one step.
Loading recipe…
Board shape#
Add rows#
A wild on a new reel unlocks a row. addRows(1, { cells }) in onStepLanded makes every reel one cell taller, with the server’s cells for the new row, and the reels after it arrive at the new height. The camera zooms out to fit, reading the board’s size from viewport.maskWidth and maskHeight. The next round goes back with removeReels() and removeRows().
Rows change only between steps. Inside onStepAdded the step’s reels are about to spin on columns sized for the board’s old height, so addRows() throws there. A fast-forward, which aborts the signal, lands every remaining reel in one step at the board’s height at that moment. That is why this demo’s skip slams one step at a time instead.
Loading recipe…
MultiWays#
The length of each column’s visible array is that reel’s cell count, applied with setShape() for its step, so every reel the expansion adds multiplies the ways. Eight reels of seven cells give 5,764,801 ways, and ten give 282,475,249. Each step here adds two reels (step: 2).
Loading recipe…
Big symbols#
The steps add one reel each, but a 2x2 wild arrives in one of the columns. A step of one reel cannot land half a block, so that step adds two reels and the block lands whole. The step plan is read from the symbolData sizes, and every block is validated before the first reel is added.
A block has to end on a reel the expansion adds. A block that would run past the last of them, or past the bottom of a strip, throws before any reel is added.
Loading recipe…
Split stacked symbols#
Q lands either one cell tall or stacked two to four cells tall. When Q wins on every reel, each stack splits into more single Qs than it had cells, and its reel grows past the frame in both directions. reelSet.splitSymbol(reel, cell, ids) places the server’s split: the stack covering (reel, cell) becomes ids, one per cell, the cells above and below keep their symbols, and the board re-centres around the taller reel. While the win reaches the last reel, expand() adds another reel and the multiplier goes up by one. The next round goes back with removeReels() and resetColumns(). The Split symbols page has a reel that keeps its height, splits on MultiWays and a playground where you tap to split.
Because the board re-centres around the taller reel, hold the other reels still on screen and let the camera ease out, or they jump. This demo moves its camera by the amount they shift.
Loading recipe…
Skipping steps#
Press as often as you like and read the log. The base board is grouped, shown by the dashed boxes, so a press lands one group. Each step’s reel teases “will the win continue?” with anticipation: { protect: 'once' }, so the first press during a tease is spent and the next one lands the reel. A press while the camera pans is queued for the next step. The button calls skipSpin() and nothing else.
Loading recipe…
Skip policies#
- Turbo for the rest, the default. The first
skipSpin()frees the step in flight and moves every later step to the fastest profile. The next round starts at normal speed again. - Slam each step. Every press frees the step in flight. Presses made during
onStepAddedoronStepLanded, for example while the camera pans or a win readout shows, are kept and free the next step as soon as it has its result. - Fast-forward. Abort the expansion’s
signaland every reel still to come lands in one step. A quick-spin or autoplay mode can pass a signal that is already aborted, so the whole expansion lands at once, with the same events and hooks. - Quicken. With
.skipMode('quicken'), orrequestSkip({ mode: 'quicken', speed: 'turbo' }), a press shortens the step’s spin but keeps its spin-out and bounce, so a long chain never looks cut. - One reel per press on wide steps. A step’s reels arrive as one group. Call
setReelGroups()inonStepAddedto split them so each press frees one, or useslamStop({ reels: [...] })to land part of a step and let the rest play. - Keep the deciding tease.
anticipation: (step) => stillWinning ? { protect: 'once', duration: 900 } : falsekeeps the “will it continue?” tease through the first press, only on the steps where it matters.
slamStop() between steps has nothing to land, and a press after the last step has no step left, so both do nothing. A named setDropOrder('ltr' | 'rtl' | 'all') follows the reels that spin, so it covers the added reels and orders a step by position. A sticky setStopDelays() array covers only the reels it was given, and reels past its end stop with no delay.
What carries across steps#
- Events. Each step fires the usual
spin:*events for its own reels, plusreels:added,expand:stepAddedandexpand:stepLanded, androws:addedwhen a hook adds rows. The chain opens withexpand:startand closes withexpand:completeand thenexpand:end, which carries'complete', or'failed'when the chain threw.reelSet.isExpandingistruein between, so aspin:startlistener can tell a step from a new round. - Stagger. Start and stop delays count a reel’s position in its step, not its index, so reel 40 does not wait forty delays.
- Pins. A sticky pin’s turns and an
'eval'pin belong to the round, so a step does not use them up. - Memory. Added reels are real reels while they are on the board.
removeReels()destroys them and shrinks the viewport, mask and symbol pool back.