pixi-wheels

enableDebug()

pixi-wheels


pixi-wheels / index / enableDebug

Function: enableDebug()

function enableDebug(wheel: Wheel, key?: string): void;

Defined in: debug/debug.ts:160

Attach the debug handle to window.__PIXI_WHEELS_DEBUG.

__PIXI_WHEELS_DEBUG.log()        // arc + state
__PIXI_WHEELS_DEBUG.snapshot()   // full JSON
__PIXI_WHEELS_DEBUG.trace()      // log every event as it fires (ticks too with trace(true))
__PIXI_WHEELS_DEBUG.overlay()    // draw boundaries, pointers, target and a HUD
__PIXI_WHEELS_DEBUG.land('x8')   // setResult({ section }) on the current spin

Several wheels on one page: pass a distinct key; each is reachable at __PIXI_WHEELS_DEBUG_INSTANCES[key] and the bare global points at the most recently enabled one. Dev and QA builds only.

Parameters#

ParameterType
wheelWheel
key?string

Returns#

void