API reference

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

C

classPerformanceLayer

@codexo/exojs/debug / debug / stable

Debug layer that renders a compact screen-space HUD (top-left) showing rolling-average FPS, per-frame time in milliseconds, GPU frame time, draw-call count, scene-node count, and how many of the last 120 frames ran over frameBudget, alongside a 120-sample frame-time sparkline. The layer asks the backend for hardware GPU timing when it first becomes visible and turns it off again in destroy. Devices that expose no GPU timer report `GPU: n/a`; where one exists, the value is the last frame whose results have come back, which trails the frame on screen. Enable via DebugOverlay or by pressing F1 while the canvas has focus.

3
props
3
methods
0
events
Import
import { PerformanceLayer } from '@codexo/exojs/debug'

Debug layer that renders a compact screen-space HUD (top-left) showing rolling-average FPS, per-frame time in milliseconds, GPU frame time, draw-call count, scene-node count, and how many of the last 120 frames ran over frameBudget, alongside a 120-sample frame-time sparkline.

The layer asks the backend for hardware GPU timing when it first becomes visible and turns it off again in destroy. Devices that expose no GPU timer report `GPU: n/a`; where one exists, the value is the last frame whose results have come back, which trails the frame on screen.

Enable via DebugOverlay or by pressing F1 while the canvas has focus.

Constructors1
Methods3
destroy(): void
Destroy the panel's subtree, release all child references, and hand GPU timing back to the backend.
render(backend: RenderBackend): void
Submit the panel's Container subtree to the backend for drawing.
Sample the current frame time, recompute the rolling FPS average, update stat text nodes, and rebuild the sparkline geometry. Lazily initializes the panel scene graph on first call to avoid touching the glyph atlas until the layer is actually shown.
Properties3
Frame duration treated as the target budget. A frame longer than this turns the frame-time row red and is counted by the Over row, which reports the overruns among the 120 frames the sparkline plots. The sparkline's vertical range is twice the budget, so the guide line drawn across it always marks the budget and a reassigned budget rescales the plot with it. Defaults to one 60 Hz frame.
visible: boolean
Whether this layer renders in the scene's world-space view or in a screen-space (canvas-pixel) view. Defaults to 'screen'. Subclasses override to return 'world' when rendering at actual scene positions.
Source