Static
enabledAllow creating gizmos
If disabled then no gizmos will be added to the scene anymore
Static
DrawDraw an arrow gizmo in the scene
the start point of the arrow in world space
the end point of the arrow in world space
the color of the arrow
the duration in seconds the arrow will be rendered. If 0 it will be rendered for one frame
if true the arrow will be rendered with depth test
if true the arrow will be rendered as wireframe
Static
DrawDraw a 2D circle gizmo in the scene
the center of the circle in world space
the normal of the circle in world space
the radius of the circle in world space
the color of the circle
the duration in seconds the circle will be rendered. If 0 it will be rendered for one frame
if true the circle will be rendered with depth test
Static
DrawDraw a line gizmo in the scene
the color of the line
the duration in seconds the line will be rendered. If 0 it will be rendered for one frame
if true the line will be rendered with depth test
the length of the line. Default is 1
Static
DrawDraw a label in the scene or attached to an object (if a parent is provided)
the position of the label in world space
the text of the label
the size of the label in world space
the duration in seconds the label will be rendered. If 0 it will be rendered for one frame
Optional
color: ColorRepresentationthe color of the label
Optional
backgroundColor: ColorRepresentation | ColorWithAlphathe background color of the label
Optional
parent: Object3D<Object3DEventMap>the parent object to attach the label to. If no parent is provided the label will be attached to the scene
a handle to the label that can be used to update the text
Static
DrawDraw a line gizmo in the scene
the start point of the line in world space
the end point of the line in world space
the color of the line
the duration in seconds the line will be rendered. If 0 it will be rendered for one frame
if true the line will be rendered with depth test
Static
DrawDraw a ray gizmo in the scene
the origin of the ray in world space
the direction of the ray in world space
the color of the ray
the duration in seconds the ray will be rendered. If 0 it will be rendered for one frame
if true the ray will be rendered with depth test
Static
DrawDraw a 3D sphere gizmo in the scene
the center of the sphere in world space
the radius of the sphere in world space
the color of the sphere
the duration in seconds the sphere will be rendered. If 0 it will be rendered for one frame
if true the sphere will be rendered with depth test
Static
DrawDraw a 3D wiremesh box gizmo in the scene
the center of the box in world space
the size of the box in world space
the color of the box
the duration in seconds the box will be rendered. If 0 it will be rendered for one frame
if true the box will be rendered with depth test
Static
DrawDraw a 3D wiremesh box gizmo in the scene
the box in world space
the color of the box
the duration in seconds the box will be rendered. If 0 it will be rendered for one frame
if true the box will be rendered with depth test
Static
DrawRender a wireframe mesh in the scene. The mesh will be removed after the given duration (if duration is 0 it will be rendered for one frame).
If a mesh object is provided then the mesh's matrixWorld and geometry will be used. Otherwise, the provided matrix and geometry will be used.
the options for the wire mesh
Optional
color?: ColorRepresentation | undefinedthe color of the wire mesh
Optional
depthTest?: booleanif true the wire mesh will be rendered with depth test
Optional
duration?: numberthe duration in seconds the mesh will be rendered. If 0 it will be rendered for one frame
the mesh object to render (if it is provided the matrix and geometry will be used)
the geometry of the mesh to render
the matrix of the mesh to render
Static
DrawDraw a 3D wiremesh sphere gizmo in the scene
the center of the sphere in world space
the radius of the sphere in world space
the color of the sphere
the duration in seconds the sphere will be rendered. If 0 it will be rendered for one frame
if true the sphere will be rendered with depth test
Static
isStatic
setSet visibility of all currently rendered gizmos
Gizmos are temporary objects that are drawn in the scene for debugging or visualization purposes
They are automatically removed after a given duration and cached internally to reduce overhead.
Use the static methods of this class to draw gizmos in the scene.