pixi-reels

BoardGridOptions

pixi-reels


pixi-reels / index / BoardGridOptions

Interface: BoardGridOptions

Defined in: board/BoardGrid.ts:66

Properties#

PropertyTypeDescriptionDefined in
cellSize| number | { height: number; width: number; }Cell size in pixels: one number for square cells, or { width, height }.board/BoardGrid.ts:71
cellZIndex?BoardCellZIndexResolverDraw order of the cells’ lifted art - the unmask: true symbols the engine lifts above each cell’s mask at rest, which the grid renders in one shared layer above every cell. Without this the layer draws in attach order (column-major), so a lower cell’s overflowing art is covered by the next column’s. Provided, the layer sorts by the value returned for each cell, re-asked whenever any cell’s symbol changes (place, landing). ctx.attachOrder reproduces the default.board/BoardGrid.ts:137
chrome?(g: Graphics, width: number, height: number) => voidPer-cell background, drawn behind each reel, handed the cell’s width and height. A square-board callback that only reads the first size argument keeps working unchanged.board/BoardGrid.ts:95
colsnumberGrid dimensions.board/BoardGrid.ts:68
columnGap?numberHorizontal gap between columns. Falls back to gap.board/BoardGrid.ts:75
direction?Direction-board/BoardGrid.ts:114
emptyId?stringId a cell shows when blank - also placed in the off-window buffers. Default 'empty'.board/BoardGrid.ts:79
gap?numberGap between cells on both axes. Default 4.board/BoardGrid.ts:73
mask?(cell: BoardCell, info: BoardCellMaskInfo) => MaskStrategyMask for each cell, built once per cell (every cell is its own reel set and owns its mask). Default: a shared rect over the cell. Hand it () => new RoundedRectMaskStrategy({ radius }) for cells whose art and frame have rounded corners. The factory is told which cell it builds for and which board corners that cell sits on, so (_, { corners }) => new RoundedRectMaskStrategy({ radius, corners }) rounds only the board’s outer corners and keeps every other cell square.board/BoardGrid.ts:105
orientation?OrientationWhich way each cell’s own strip travels while it spins. Every cell is a 1x1 reel set, so this changes the direction a symbol scrolls in from, not the board layout - cols and rows stay board dimensions either way. Defaults to the engine default (vertical / forward), i.e. symbols drop in from above.board/BoardGrid.ts:113
profiles?Record<string, BoardProfile>Named speed profiles, each registered on every cell and selected by name via BoardGrid.setProfile. A value may be a flat profile or a per-cell function (for stagger waves). Defaults to a single 'default' profile, which is the active one until you setProfile otherwise.board/BoardGrid.ts:121
rng?() => numberInjected RNG for the spin strips (deterministic demos / tests).board/BoardGrid.ts:87
rowGap?numberVertical gap between rows. Falls back to gap.board/BoardGrid.ts:77
rowsnumber-board/BoardGrid.ts:69
symbolData?Record<string, Partial<SymbolData>>Per-symbol engine overrides, exactly like ReelSetBuilder.symbolData.board/BoardGrid.ts:85
symbols(registry: SymbolRegistry) => voidRegister symbol classes, exactly like ReelSetBuilder.symbols. Applied to every cell.board/BoardGrid.ts:81
symbolZIndex?SymbolZIndexResolverPer-symbol z-index resolver, exactly like ReelSetBuilder.symbolZIndex, applied to every cell’s reel set. Orders symbols INSIDE a cell; for the order between cells see cellZIndex.board/BoardGrid.ts:127
tickerTickerDrives every cell’s reel - required.board/BoardGrid.ts:89
weights?Record<string, number>Strip weights during the spin.board/BoardGrid.ts:83