Gizmos
constGizmos: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.
Type Declaration
Section titled “Type Declaration”clear()
Section titled “clear()”clear():
void
Removes all drawings owned by this resource. Other resources are unaffected. Throws if the caller’s resource cannot be identified.
Returns
Section titled “Returns”void
remove()
Section titled “remove()”remove(
id):boolean
Removes this resource’s named drawing. Throws for an invalid ID or unknown resource.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”string
primitive
Section titled “primitive”GizmoArea | GizmoLine | GizmoArrow | GizmoRoundVolume | GizmoCircle | GizmoGrid | GizmoAxes | GizmoPolyline | GizmoMesh
style?
Section titled “style?”Returns
Section titled “Returns”void
setTransform()
Section titled “setTransform()”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.
Parameters
Section titled “Parameters”string
position
Section titled “position”rotation?
Section titled “rotation?”number
number
number
number
Returns
Section titled “Returns”boolean
True if the drawing exists; false if this resource has no drawing with that ID.