Production art comes first, then what you can do to a symbol after it lands. Placeholder classes and symbols for sideways sets are at the end. Art that overflows its cell is on Layers. The blurred copies a reel shows while it spins are on Spinning art.
Production art#
Sprites from an atlas#
Sprite symbols loaded from one TexturePacker atlas, so every frame comes from one file and one texture upload. Each id is registered with BlurSpriteSymbol from @pixi-reels/kit, which shows the atlas’s blur frame while the reel spins.
Loading recipe…
Spine skins#
Each symbol tier is one Spine skeleton, and each id in the tier is a skin of it. The board is a gapless 3-4-4-4-4-3 grid. The skeletons are wrapped in StaticSpinSymbol, so the reels spin on blurred snapshots and no skeleton runs mid-spin.
Loading recipe…
After the reels land#
Your own win animation#
WinPresenter takes a symbolAnim callback that runs instead of playWin(). It gets the symbol, its cell and the win, so the animation can differ per win.id. Here the top line bounces harder than the other two.
Loading recipe…
Transform a symbol#
A low symbol turns into a higher one after the reels stop. reelSet.setSymbolAt(reel, cell, id) swaps the one cell and leaves the rest of the reel alone. Call it after spin:complete or spin:reelLanded: it throws while the reel is spinning and on a big symbol’s anchor.
Loading recipe…
Blank cells#
EmptySymbol takes a slot on the strip and draws nothing. Register it under an id such as 'empty' and weight it heavily, and most cells land blank. Hold & Win boards use it for the empty cells between coins.
Loading recipe…
Prototype symbols#
Cards without art#
CardSymbol draws a coloured card with a label using Graphics, so it needs no assets and stays sharp at any cell size. The package exports it with a ready deck: import { CardSymbol, CARD_DECK, WILD_CARD } from 'pixi-reels'. Use it for prototypes and tests, and ship SpriteSymbol, AnimatedSpriteSymbol or SpineSymbol in the game.
Loading recipe…
Phase colours#
PhaseCardSymbol is a CardSymbol that is grey at rest and takes the colour of the phase its reel is in: sky for start, blue for spin, amber for anticipation, violet for stop, and green for a moment after landing. Use it to check phase timing by eye.
Register it like any symbol, then call PhaseCardSymbol.watch(reelSet.reels). The watcher colours every card from the reels’ phase:enter, landed and symbol:created events, custom phases included, and returns a function that stops it. A card does not know its reel, so without the watcher it stays grey. setPhase() is public if something else knows the phase. colors overrides or extends PHASE_CARD_COLORS, and a phase with no entry uses other.
Loading recipe…
Sideways sets#
Writing a symbol class#
A hand-written ReelSymbol on a horizontal set with wide cells. The class has no orientation code. resize(width, height) is in screen pixels whichever way the strip travels, so the plate’s marker and glyph stay upright while the strip scrolls along x. The engine never rotates a symbol container, so third-party symbol classes work unchanged.
A symbol can read this.mainAxis ('y' vertical, 'x' horizontal) for effects that follow travel, such as motion blur. Do not use it for layout.
Loading recipe…
One registration for both axes#
Four reels of three cells, built once vertical and once horizontal, landing the same grid. Both sets use the same symbol registration. The builds differ only in symbolSize, whose two numbers swap, because a horizontal board is the vertical one transposed.
Loading recipe…