Options
All
  • Public
  • Public/Protected
  • All
Menu

Gizmo that enables rotating a mesh along 3 axis

Hierarchy

Implements

Index

Constructors

  • Creates a RotationGizmo

    Parameters

    • Optional gizmoLayer: UtilityLayerRenderer

      The utility layer the gizmo will be added to

    • Optional tessellation: number

      Amount of tessellation to be used when creating rotation circles

    • Optional useEulerRotation: boolean

      Use and update Euler angle instead of quaternion

    • Optional thickness: number

      display gizmo axis thickness

    • Optional gizmoManager: GizmoManager

      Gizmo manager

    • Optional options: RotationGizmoOptions

      More options

    Returns RotationGizmo

Properties

_rootMesh: Mesh

The root mesh of the gizmo

The utility layer the gizmo will be added to

onDragEndObservable: Observable<unknown>

Fires an event when any of it's sub gizmos are released from dragging

onDragStartObservable: Observable<unknown>

Fires an event when any of it's sub gizmos are dragged

updateGizmoPositionToMatchAttachedMesh: boolean

If set the gizmo's position will be updated to match the attached mesh each frame (Default: true)

updateScale: boolean

When set, the gizmo will always appear the same size no matter where the camera is (default: true)

Internal gizmo used for interactions on the x axis

Internal gizmo used for interactions on the y axis

Internal gizmo used for interactions on the z axis

PreserveScaling: boolean

When enabled, any gizmo operation will perserve scaling sign. Default is off. Only valid for TransformNode derived classes (Mesh, AbstractMesh, ...)

Accessors

  • Mesh that the gizmo will be attached to. (eg. on a drag gizmo the mesh that will be dragged)

    • When set, interactions will be enabled

    Returns Nullable<AbstractMesh>

  • Mesh that the gizmo will be attached to. (eg. on a drag gizmo the mesh that will be dragged)

    • When set, interactions will be enabled

    Parameters

    Returns void

  • Node that the gizmo will be attached to. (eg. on a drag gizmo the mesh, bone or NodeTransform that will be dragged)

    • When set, interactions will be enabled

    Returns Nullable<Node>

  • Node that the gizmo will be attached to. (eg. on a drag gizmo the mesh, bone or NodeTransform that will be dragged)

    • When set, interactions will be enabled

    Parameters

    Returns void

  • posture that the gizmo will be display When set null, default value will be used (Quaternion(0, 0, 0, 1))

    Returns Nullable<Quaternion>

  • posture that the gizmo will be display When set null, default value will be used (Quaternion(0, 0, 0, 1))

    Parameters

    Returns void

  • get isHovered(): boolean
  • True when the mouse pointer is hovering a gizmo mesh

    Returns boolean

  • get scaleRatio(): number
  • set scaleRatio(value: number): void
  • Ratio for the scale of the gizmo (Default: 1)

    Returns number

  • Ratio for the scale of the gizmo (Default: 1)

    Parameters

    • value: number

    Returns void

  • get snapDistance(): number
  • set snapDistance(value: number): void
  • Drag distance in babylon units that the gizmo will snap to when dragged (Default: 0)

    Returns number

  • Drag distance in babylon units that the gizmo will snap to when dragged (Default: 0)

    Parameters

    • value: number

    Returns void

  • get updateGizmoRotationToMatchAttachedMesh(): boolean
  • set updateGizmoRotationToMatchAttachedMesh(value: boolean): void
  • If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true)

    Returns boolean

  • If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true)

    Parameters

    • value: boolean

    Returns void

Methods

  • Builds Gizmo Axis Cache to enable features such as hover state preservation and graying out other axis during manipulation

    Parameters

    • mesh: Mesh

      Axis gizmo mesh

    • cache: GizmoAxisCache

      Gizmo axis definition used for reactive gizmo UI

    Returns void

  • dispose(): void
  • setCustomMesh(): void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Inherited constructor
  • Inherited property
  • Inherited accessor
  • Property
  • Method
  • Static method

Settings

Theme