Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RotationGizmo

Gizmo that enables rotating a mesh along 3 axis

Hierarchy

Implements

Index

Constructors

constructor

  • 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

    Returns RotationGizmo

Properties

_rootMeshSearch playground for _rootMesh

_rootMesh: Mesh

The root mesh of the gizmo

gizmoLayerSearch playground for gizmoLayer

The utility layer the gizmo will be added to

onDragEndObservableSearch playground for onDragEndObservable

onDragEndObservable: Observable<unknown>

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

onDragStartObservableSearch playground for onDragStartObservable

onDragStartObservable: Observable<unknown>

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

updateGizmoPositionToMatchAttachedMeshSearch playground for updateGizmoPositionToMatchAttachedMesh

updateGizmoPositionToMatchAttachedMesh: boolean

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

updateScaleSearch playground for updateScale

updateScale: boolean

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

xGizmoSearch playground for xGizmo

Internal gizmo used for interactions on the x axis

yGizmoSearch playground for yGizmo

Internal gizmo used for interactions on the y axis

zGizmoSearch playground for zGizmo

Internal gizmo used for interactions on the z axis

Accessors

attachedMesh

attachedNode

isHovered

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

    Returns boolean

scaleRatio

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

    Returns number

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

    Parameters

    • value: number

    Returns any

snapDistance

  • get snapDistance(): number
  • set snapDistance(value: number): any
  • 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 any

updateGizmoRotationToMatchAttachedMesh

  • get updateGizmoRotationToMatchAttachedMesh(): boolean
  • set updateGizmoRotationToMatchAttachedMesh(value: boolean): any

Methods

addToAxisCacheSearch playground for addToAxisCache

  • 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

disposeSearch playground for dispose

  • dispose(): void

setCustomMeshSearch playground for setCustomMesh

  • setCustomMesh(mesh: Mesh): void
  • CustomMeshes are not supported by this gizmo

    Parameters

    • mesh: Mesh

      The mesh to replace the default mesh of the gizmo

    Returns void

Static GizmoAxisPointerObserverSearch playground for GizmoAxisPointerObserver

Legend

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