pixi-reels

API reference

debug

pixi-reels


pixi-reels / debug

Classes#

ClassDescription
DebugPlaqueA small readable card: rows of monospace text on a smooth rounded plate, with optional swatches (legends) and meters (a speed, a progress). The building block of every readout in pixi-reels/debug, and the one the recipes on the docs site use for their own labels.
SpinMetricsRecords what each spin did, per reel, on a clock: when every phase started and ended, when the reel was asked to stop, landed and settled, the tease window, every skip press, and how many symbols were swapped into cells.
WinLinesWin lines drawn over a reel set with pixi-silk: a payline through one cell per reel, or a payway as every winning cell joined to every winning cell on the next reel.

Interfaces#

InterfaceDescription
DebugMetricsTotalsAggregates across every round the recorder still holds.
DebugOverlayHandleHandle returned by debugOverlay. Owns its display objects.
DebugOverlayOptions-
DebugOverlayReelInfoWhat the axis-family layers drew for one reel, as plain numbers.
DebugOverlaySnapshotSerializable summary of the overlay. the text half of a visual debugger.
DebugPhaseSpanOne phase a reel ran, in ms since its round opened.
DebugPlaqueOptions-
DebugPlaqueRowOne line of a DebugPlaque.
DebugReelRoundOne reel’s share of a round. Every time is ms since the round opened.
DebugRoundA round: everything from one spin:start to the next. A cascade refill() emits spin:start too, so each refill is its own round, the same way the engine’s own events count it. A nudge at rest before any spin opens a round of its own (spin: false).
DebugSkipMarkA skip press, as the round saw it.
SpinMetricsOptions-
SpinMetricsSnapshotPlain-JSON view of a SpinMetrics. Safe to JSON.stringify.
WinLinesOptionsOptions for a WinLines layer.
WinLineStyleHow one line is drawn. Every field is optional.

Type Aliases#

Type AliasDescription
DebugOverlayLayerA single visual debug layer.

Variables#

VariableDescription
DEBUG_FONTThe monospace stack every debug plaque draws with.
OVERLAY_LABELContainer / layer label prefix. Used by the Pixi devtools and by tests.

Functions#

FunctionDescription
debugOverlayA layered visual debug overlay for a ReelSet, drawn with pixi-silk: mask, cell, buffer, axis, symbol-bounds, big-symbol-block and pin geometry, a per-reel hud, and a metrics plaque and phase timeline for the current round. It lives in a Container added to the reel set itself. because ReelSet extends Container, that renders the overlay above the viewport, including the spotlight container.
roundRectPathAdd a rounded rectangle to g as one closed PATH instead of a shape, and return g so the stroke chains on.