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.

Properties

enabled: boolean = true

Allow creating gizmos
If disabled then no gizmos will be added to the scene anymore

Methods

  • Parameters

    • pt0: Vec3
    • pt1: Vec3
    • color: ColorRepresentation = defaultColor
    • duration: number = 0
    • depthTest: boolean = true
    • wireframe: boolean = false

    Returns void

  • Parameters

    • pt: Vec3
    • direction: Vec3 | Vec4
    • color: ColorRepresentation = defaultColor
    • duration: number = 0
    • depthTest: boolean = true
    • lengthFactor: number = 1

    Returns void

  • Draw a label in the scene or attached to an object (if a parent is provided)

    Parameters

    • position: Vec3
    • text: string
    • size: number = .05
    • duration: number = 0
    • Optional color: ColorRepresentation
    • Optional backgroundColor: any
    • Optional parent: Object3D

    Returns LabelHandle

    a handle to the label that can be used to change the text

  • Parameters

    • pt0: Vec3
    • pt1: Vec3
    • color: ColorRepresentation = defaultColor
    • duration: number = 0
    • depthTest: boolean = true

    Returns void

  • Parameters

    • origin: Vec3
    • dir: Vec3
    • color: ColorRepresentation = defaultColor
    • duration: number = 0
    • depthTest: boolean = true

    Returns void

  • Parameters

    • center: Vec3
    • radius: number
    • color: ColorRepresentation = defaultColor
    • duration: number = 0
    • depthTest: boolean = true

    Returns void

  • Parameters

    • center: Vec3
    • size: Vec3
    • color: ColorRepresentation = defaultColor
    • duration: number = 0
    • depthTest: boolean = true

    Returns void

  • Parameters

    • box: Box3
    • color: ColorRepresentation = defaultColor
    • duration: number = 0
    • depthTest: boolean = true

    Returns void

  • Parameters

    • center: Vec3
    • radius: number
    • color: ColorRepresentation = defaultColor
    • duration: number = 0
    • depthTest: boolean = true

    Returns void

  • Returns true if a given object is a gizmo

    Parameters

    Returns boolean

Generated using TypeDoc