Interface: IDebugDrawer
Optional debug-draw overlay in world space (shares the active camera's view transform). The only in-framework consumer is DebugDrawSystem, which is gated by import.meta.env.DEV — production strips both the system and any capability lookups.
Methods
ClearDebug()
ts
ClearDebug(): void;Returns
void
DrawDebugCircle()
ts
DrawDebugCircle(
x,
y,
radius,
color,
alpha?,
lineWidth?
): void;Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
radius | number |
color | number |
alpha? | number |
lineWidth? | number |
Returns
void
DrawDebugLine()
ts
DrawDebugLine(
x1,
y1,
x2,
y2,
color,
alpha?,
lineWidth?
): void;Parameters
| Parameter | Type |
|---|---|
x1 | number |
y1 | number |
x2 | number |
y2 | number |
color | number |
alpha? | number |
lineWidth? | number |
Returns
void
DrawDebugPoint()
ts
DrawDebugPoint(
x,
y,
color,
radius?,
alpha?
): void;Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
color | number |
radius? | number |
alpha? | number |
Returns
void
DrawDebugPolygon()?
ts
optional DrawDebugPolygon(
points,
color,
alpha?
): void;Filled polygon from flat [x0, y0, x1, y1, ...] — arrowheads and handle boxes. Optional: callers fall back to outlines when a backend lacks it.
Parameters
| Parameter | Type |
|---|---|
points | readonly number[] |
color | number |
alpha? | number |
Returns
void
DrawDebugRect()
ts
DrawDebugRect(
x,
y,
width,
height,
color,
alpha?,
lineWidth?
): void;Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
width | number |
height | number |
color | number |
alpha? | number |
lineWidth? | number |
Returns
void
SetDebugLayer()?
ts
optional SetDebugLayer(layer): void;Following draws belong to render layer layer: drawn in the passes of cameras that render it, through their view — so they stay on content seen through a different camera than the overlay's. null (and ClearDebug) = the overlay again. Optional: backends without it draw everything as overlay.
Parameters
| Parameter | Type |
|---|---|
layer | number | null |
Returns
void