pixi-reels

debugOverlay()

pixi-reels


pixi-reels / index / debugOverlay

Function: debugOverlay()

function debugOverlay(reelSet: ReelSet, options?: DebugOverlayOptions): DebugOverlayHandle;

Defined in: debug/debugOverlay.ts:184

A layered visual debug overlay for a ReelSet. Draws mask, cell, buffer, symbol-bounds, big-symbol-block, pin and hud layers into a Container added to the reel set itself. because ReelSet extends Container, that renders the overlay above the viewport (including the spotlight container), unlike the older showMask which drew inside the viewport and was covered by the spotlight.

Dev-only. It reads engine internals through the public accessors, is not semver-protected, and must not reach a production bundle.

const overlay = debugOverlay(reelSet, { layers: ['cells', 'bounds'], live: true });
overlay.setLayers(['cells', 'pins']);
overlay.redraw();
overlay.destroy();

Parameters#

ParameterType
reelSetReelSet
optionsDebugOverlayOptions

Returns#

DebugOverlayHandle