Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Global objectClient APIGenerated

Gizmos

const Gizmos: object

Defined in: client/api.d.ts:2558

Resource-owned native debug geometry visible only on this client, without opening World Builder. Scene depth testing is on by default; depthTest: false opts out. Stop/error, disconnect and moving to another level clear drawings; reloading a save of the same level keeps them. No replication or input capture.

clear(): void

Removes all drawings owned by this resource. Other resources are unaffected. Throws if the caller’s resource cannot be identified.

void

remove(id): boolean

Removes this resource’s named drawing. Throws for an invalid ID or unknown resource.

string

boolean

True if removed; false if this resource has no drawing with that ID.

set(id, primitive, style?): void

Creates or replaces a named primitive owned by this resource. Finite input coordinates within +/-16384 metres. IDs are 1 to 128 UTF-8 bytes. Limit: 128 IDs per resource, 16384 geometry units across resources (one per line, three per triangle). Throws on invalid input or budget overflow and preserves the previous drawing. Copies geometry and reapplies style defaults; use setTransform to move it.

string

GizmoArea | GizmoLine | GizmoArrow | GizmoRoundVolume | GizmoCircle | GizmoGrid | GizmoAxes | GizmoPolyline | GizmoMesh

GizmoStyle

void

setTransform(id, position, rotation?): boolean

Moves this resource’s named drawing without rebuilding it: every authored point p is drawn at position + rotation * p. Author the geometry around the origin to move it as a whole. The rotation is normalized and defaults to identity. set() resets the transform to identity.

string

GizmoPoint

number

number

number

number

boolean

True if the drawing exists; false if this resource has no drawing with that ID.