pixi-reels

CardSymbolOptions

pixi-reels


pixi-reels / index / CardSymbolOptions

Interface: CardSymbolOptions

Defined in: symbols/CardSymbol.ts:36

Debug / prototyping symbol - NOT for production.

CardSymbol is a flat-rectangle-plus-centered-text ReelSymbol drawn entirely with PIXI.Graphics. It exists to give recipes, demos, and mechanic tests a no-asset, no-loader, infinitely-resizable visual that always renders crisply at any cell size, showing how the engine treats cell space across MultiWays reshapes, big-symbol blocks, and pyramid layouts.

In a real game, ship one of:

  • SpriteSymbol - pre-rendered art at one resolution. Cheapest.
  • AnimatedSpriteSymbol - frame-by-frame win/idle animation.
  • SpineSymbol (via pixi-reels/spine) - vector skeletal animation that scales without quality loss. Best for MultiWays where cells resize across spins.
  • Or a custom ReelSymbol subclass for game-specific visuals.

Ships from the package so a prototype runs with no art at all. It is deliberately plain Graphics: swap it for real art before you ship.

import { CardSymbol, CARD_DECK } from 'pixi-reels';

builder.symbols((registry) => {
  for (const card of CARD_DECK) {
    registry.register(card.id, CardSymbol, { color: card.color, label: card.label });
  }
});

Properties#

PropertyTypeDescriptionDefined in
colornumberHex fill color (e.g. 0xc0392b).symbols/CardSymbol.ts:38
labelstringCentered label text (e.g. 'A', '10', 'WILD').symbols/CardSymbol.ts:40
textColor?numberText fill color. Defaults to white.symbols/CardSymbol.ts:42