Architecture
A tour, in pictures.
How pixi-reels works, told the way you would explain it to a new teammate: what the player sees, what the engine does about it, and then the names in the code. 18 pages, each with its own hand-drawn diagrams. Start with the overview, or jump to the question you came with.
Structure
What you get back from build(), who owns what, and where things draw.
Overview
The main parts of pixi-reels and how they are wired together.
ReadThe builder
What build() validates and constructs, in order.
ReadClasses
The ownership tree. Who owns what, who destroys what.
ReadViewport and masks
The five layers under and above the mask, and the strategies that draw the mask.
ReadSymbols and pooling
The ReelSymbol lifecycle, and how the registry, factory and pool supply symbols to a reel.
ReadMotion
How a column of symbols moves, wraps around, lands, and bends into a drum.
A spin
What happens during one spin, phase by phase, and how long each part takes.
Spin lifecycle
What happens to one reel between spin() and its landing, phase by phase.
ReadA spin in milliseconds
One ordinary spin, replayed with a stopwatch, from the button press to spin:complete.
ReadSkipping
What a press does to reels that are still spinning, and how tease protection and reel groups limit it.
ReadAnticipation
How a teasing reel slows, holds and creeps onto its symbols before it lands.
ReadSpeed profiles
The object that holds a spin's timing, such as stagger, speed and bounce, and how to tune it.
ReadEvents
What fires when, in what order, on which bus.
ReadMechanics
The thinking behind cascades, sticky cells and boards.
Tooling
How to see inside a canvas, and how to test a spin without one.