Skip to content

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 ​

ParameterType
xnumber
ynumber
radiusnumber
colornumber
alpha?number
lineWidth?number

Returns ​

void


DrawDebugLine() ​

ts
DrawDebugLine(
   x1, 
   y1, 
   x2, 
   y2, 
   color, 
   alpha?, 
   lineWidth?
): void;

Parameters ​

ParameterType
x1number
y1number
x2number
y2number
colornumber
alpha?number
lineWidth?number

Returns ​

void


DrawDebugPoint() ​

ts
DrawDebugPoint(
   x, 
   y, 
   color, 
   radius?, 
   alpha?
): void;

Parameters ​

ParameterType
xnumber
ynumber
colornumber
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 ​

ParameterType
pointsreadonly number[]
colornumber
alpha?number

Returns ​

void


DrawDebugRect() ​

ts
DrawDebugRect(
   x, 
   y, 
   width, 
   height, 
   color, 
   alpha?, 
   lineWidth?
): void;

Parameters ​

ParameterType
xnumber
ynumber
widthnumber
heightnumber
colornumber
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 ​

ParameterType
layernumber | null

Returns ​

void

© 2026 PlayAdGentic