API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classDebugOverlay

@codexo/exojs/debug / debug / stable

Canvas-native debug overlay. Instantiate AFTER Application is constructed: import { DebugOverlay } from '@codexo/exojs/debug'; const debug = new DebugOverlay(app); debug.layers.performance.visible = true; // or press F1 The overlay subscribes to `app.onFrame` and renders its visible layers. World-space layers render first (under text panels) in the scene view; screen-space layers then render in the overlay's pixel-space view. Keybindings (while canvas has focus): F1 - toggle Performance layer F2 - toggle BoundingBoxes layer F3 - toggle HitTest layer F4 - toggle PointerStack layer F6 - toggle RenderPassInspector layer F7 - toggle AssetCache layer NOTE: F-keys only fire while the canvas has focus (engine convention). F5 is deliberately left unbound: browsers reload the page on it, which would tear down the very session being inspected. Each key is claimed through a real InputBinding rather than the `onKeyDown` signal, so the overlay's shortcuts also suppress the browser's own default for those keys while it exists - F1 opening a help window and F3 opening the find bar are otherwise triggered right alongside the panel they were meant to toggle. Binding registration is what marks a key consumed; a signal subscription runs a frame too late to prevent anything. The master `visible` switch suppresses all layer rendering when false without changing individual layer visibility flags.

2
props
1
methods
0
events
Import
import { DebugOverlay } from '@codexo/exojs/debug'

Canvas-native debug overlay. Instantiate AFTER Application is constructed:

import { DebugOverlay } from '@codexo/exojs/debug'; const debug = new DebugOverlay(app); debug.layers.performance.visible = true; // or press F1

The overlay subscribes to `app.onFrame` and renders its visible layers. World-space layers render first (under text panels) in the scene view; screen-space layers then render in the overlay's pixel-space view.

Keybindings (while canvas has focus): F1 - toggle Performance layer F2 - toggle BoundingBoxes layer F3 - toggle HitTest layer F4 - toggle PointerStack layer F6 - toggle RenderPassInspector layer F7 - toggle AssetCache layer

NOTE: F-keys only fire while the canvas has focus (engine convention). F5 is deliberately left unbound: browsers reload the page on it, which would tear down the very session being inspected.

Each key is claimed through a real InputBinding rather than the `onKeyDown` signal, so the overlay's shortcuts also suppress the browser's own default for those keys while it exists - F1 opening a help window and F3 opening the find bar are otherwise triggered right alongside the panel they were meant to toggle. Binding registration is what marks a key consumed; a signal subscription runs a frame too late to prevent anything.

The master `visible` switch suppresses all layer rendering when false without changing individual layer visibility flags.

Constructors1
Methods1
destroy(): void
Unsubscribe from all application events, destroy every layer, and release the overlay's internal View. Call this when you no longer need the overlay to avoid memory leaks.
Properties2
layers: DebugLayers
The built-in diagnostic layers. Toggle each layer's visible flag or use the F1-F4/F6/F7 keybindings.
visible: boolean
Master visibility switch. When false, no layers render regardless of their individual flags.
Source