index
pixi-reels / index
index
Classes
| Class | Description |
|---|---|
| AnimatedSpriteSymbol | Symbol implementation using PixiJS AnimatedSprite. Swaps frame arrays on activate. Win animation plays the full sequence. |
| CascadeMode | Cascade/tumble spinning mode. Symbols fall from above with gravity-like acceleration, used for tumble/avalanche mechanics. |
| EventEmitter | Lightweight typed event emitter with zero dependencies. |
| FrameBuilder | Builds symbol frames using a middleware pipeline. |
| ImmediateMode | Immediate placement mode for super-turbo skip. Symbols snap to position instantly. no actual spinning animation. |
| ObjectPool | Generic object pool for reusing expensive-to-create objects. |
| PhaseFactory | Factory for creating reel phase instances. |
| RectMaskStrategy | v1 default: a per-reel rectangular mask. Each reel is clipped to its own (offsetY, reelHeight) box so pyramid shapes clip cleanly without buffer-row peek above or below short reels. |
| Reel | One vertical column of a slot board. |
| ReelPhase | Abstract base for reel spin phases. |
| ReelSet | The whole slot board as one object. |
| ReelSetBuilder | The configurator you call before every reel set. |
| ReelSymbol | One visible cell on a reel. the thing that actually draws. |
| ReelViewport | The clipping window + layering tricks for a reel set. |
| SharedRectMaskStrategy | Single bounding-box mask covering every reel’s tallest extent. Use this when symbols need to overlap across reel boundaries. typical for slots with big symbols that span multiple columns (a 2×2 bonus, a 3×3 giant) AND a non-zero symbolGap.x. Per-reel rects would clip those symbols at the column gaps; a single shared rect keeps them visible. |
| SpeedManager | The tempo of your reels, as named presets. |
| SpineSymbol | Symbol implementation using Spine 2D skeletal animation. |
| SpriteSymbol | Symbol implementation using a simple PixiJS Sprite. Swaps texture on activate. Win animation is a scale pulse via GSAP. |
| StandardMode | Standard top-to-bottom reel spinning. Symbols scroll downward at constant speed, wrapping around. |
| SymbolRegistry | Registry that maps symbolIds to their constructors and options. |
| SymbolSpotlight | The “we just won” visual primitive. |
| TickerRef | Safe wrapper around PixiJS Ticker subscriptions. |
| WinPresenter | Highlights winning cells on a reel set. One job: animate the symbols. |
Interfaces
| Interface | Description |
|---|---|
| AdjustPhaseConfig | - |
| AnimatedSpriteSymbolOptions | - |
| AnticipationPhaseConfig | - |
| CascadeDropInPhaseConfig | - |
| CascadeFallPhaseConfig | - |
| CascadePlacePhaseConfig | - |
| Cell | A cell coordinate on the reel set. reel is column, row is visible row. |
| CellBounds | Axis-aligned bounding box of a single grid cell in ReelSet-local coordinates. Returned by reelSet.getCellBounds(col, row). |
| CellCoord | A grid coordinate. |
| CellPin | - |
| CellPinOptions | Options accepted by reelSet.pin(). |
| ColumnTarget | Per-reel target shape for ReelSet.setResult and ReelSetBuilder.initialFrame. One object per reel. |
| CycleOptions | - |
| DebugReelSnapshot | - |
| DebugSnapshot | Debug snapshot. plain JSON representation of the entire reel state. |
| DestroySymbolsOptions | Options for ReelSet.destroySymbols. Every field is optional; the defaults produce the canonical “winners poof” look (no stagger, no viewport dim, zIndex bumped to 1000 so destroy effects render above neighbouring cells). |
| Disposable | Contract for objects that allocate resources and need cleanup. Every class that subscribes to tickers, creates display objects, or holds references must implement this to prevent memory leaks. |
| DropOffset | - |
| FrameAPI | The runtime-mutable frame-builder pipeline exposed on reelSet.frame. Matches FrameBuilder.use/remove. the internal machinery that already exists; this is the ergonomic surface. |
| FrameContext | Context passed through the middleware pipeline. |
| FrameMiddleware | Middleware that participates in frame building. |
| MaskConfig | Mask configuration for the reel viewport. |
| MaskStrategy | Strategy for building the viewport’s clip mask. Public. pass a custom implementation to ReelSetBuilder.maskStrategy(...) to clip the reels with any shape PixiJS Graphics can express (rounded frames, hex grids, etc.). v1 ships two strategies: |
| MovePinOptions | Options for reelSet.movePin(). flight animation tuning + lifecycle hooks. |
| MultiWaysConfig | MultiWays configuration knobs. Set via builder.multiways({ ... }). mutually exclusive with big-symbol registration. |
| NoOffsetConfig | No offset configuration. |
| NudgeOptions | Options for Reel.nudge() / ReelSet.nudge(). a post-stop reposition that shifts the reel by distance symbol positions and reveals new caller-supplied symbols. |
| Position | Simple 2D position. |
| RecordedFrame | One captured frame from startRecording(). a DebugSnapshot plus the tag the recording was started with and the spin event that triggered the capture. |
| ReelConfig | - |
| ReelEvents | Events emitted by an individual Reel. |
| ReelExtraSymbols | Extra symbols above/below config per reel. |
| ReelGridConfig | Configuration for the reel grid layout. |
| ReelMaskRect | Bounding rectangle for one reel. what MaskStrategy builds the clip geometry from. Local to ReelViewport (origin = viewport top-left). |
| ReelSetEvents | Events emitted by a ReelSet. |
| RefillOptions | Options for ReelSet.refill. The two required fields encode what just happened (winners) and what the next visible state should be (grid). Everything else is timing / cancellation / animation flavor with sensible defaults. |
| RefillResult | Summary returned by ReelSet.refill. Symmetric with RunCascadeResult. same vocabulary, narrower scope (one stage vs. the full chain). |
| RunCascadeOptions | Options for ReelSet.runCascade. The two required callbacks (detectWinners, nextGrid) encode game rules; everything else is timing / cancellation / forwarded-to-destroy plumbing with sensible defaults. |
| SpeedProfile | Timing and animation profile for a speed mode. |
| SpineSymbolOptions | - |
| SpinningMode | Strategy interface for different reel spinning behaviors. |
| SpinOptions | Options accepted by reelSet.spin(options?). All fields are optional. passing nothing reproduces the legacy “every reel spins” behaviour. |
| SpinPhaseConfig | - |
| SpinResult | Result returned when a spin completes. |
| SpotlightOptions | - |
| SpriteSymbolOptions | - |
| StartPhaseConfig | - |
| StartRecordingOptions | Options for startRecording. |
| StopPhaseConfig | - |
| SymbolData | Per-symbol configuration data. |
| SymbolPosition | A cell on the visible grid. reelIndex is the column; rowIndex is the row from the top. |
| TrapezoidConfig | Trapezoid perspective configuration. |
| TumbleConfig | - |
| TumbleDropInConfig | - |
| TumbleFallConfig | Configuration for tumble cascade phases. Passed to ReelSetBuilder.tumble(config) and baked into the three phase classes at build time. Pure animation values. every callback you want is an event (reelSet.events.on('cascade:...', ...)), never a config field. |
| Win | One “win” as the presenter sees it: an ordered set of cells to highlight. |
| WinLine | - |
| WinPresenterOptions | - |
Type Aliases
| Type Alias | Description |
|---|---|
| Matrix | 2D matrix type (reel × row). |
| OffsetConfig | - |
| OffsetXMode | Offset modes for X-axis symbol positioning. |
| PinExpireReason | Reason a pin expired. Fired with pin:expired. - 'turns' — its turn counter reached zero. - 'explicit' — removed via unpin(). - 'eval' — an eval callback returned false. - 'collision' — a reshape clamped it onto a cell another pin already holds, so it was dropped deterministically. |
| PinMigration | How a pin behaves when a MultiWays reshape changes the row count of its reel. Non-MultiWays slots never reshape, so this value is irrelevant there. |
| ReelAnchor | How to vertically align reels of differing pixel heights. |
| RunCascadeResult | Summary returned by ReelSet.runCascade. Re-exported from the canonical definition in events/ReelEvents.ts so the events module stays the single source of truth for shared shapes. |
| WinSymbolAnim | What to play on each cell being highlighted. |
Variables
| Variable | Description |
|---|---|
| DEFAULTS | Default values applied when not explicitly set by the builder. |
| SpeedPresets | Built-in speed profiles covering common slot game needs. |
Functions
| Function | Description |
|---|---|
| clearFrames | Empty the global recording log. |
| computeDropOffsets | Compute per-row drop offsets for one reel given its winner set. |
| debugGrid | Pretty-print the grid as an ASCII table. |
| debugSnapshot | Take a plain-JSON snapshot of the entire reel set state. |
| driveGsapWithTicker | Drive GSAP from a PixiJS ticker instead of its own requestAnimationFrame loop, and return a disposer that restores GSAP’s default loop. |
| enableDebug | Enable debug mode: attaches debug utilities to window.__PIXI_REELS_DEBUG. |
| getFrames | All recorded frames in capture order. When tag is provided, only frames tagged with it are returned. Frames are not cleared between recording sessions. call clearFrames to reset. |
| pinKey | Map key used internally and exposed by reelSet.pins. |
| sortByValueDesc | Return a new array sorted by value descending (non-mutating). Missing values sort as 0. |
| startRecording | Start recording the reel-set’s frame state at every key spin event (spin:start, spin:reelLanded, spin:allLanded, spin:complete). Each event captures a DebugSnapshot and pushes it onto a process- wide rolling log readable via getFrames. |
| stopRecording | Detach the recorder previously installed by startRecording. No-op if none. |
| whenSpineReady | Resolves once the optional @esotericsoftware/spine-pixi-v8 import has settled (whether or not it was installed). Await this before constructing SpineSymbols if you build the reel set immediately on app start, so a cold load can’t throw the misleading “not installed” error. |