Options
All
  • Public
  • Public/Protected
  • All
Menu

Gizmo that enables dragging a mesh along 3 axis

Hierarchy

Implements

Index

Constructors

  • Creates a PositionGizmo

    Parameters

    • Optional gizmoLayer: UtilityLayerRenderer

      The utility layer the gizmo will be added to

    • Optional thickness: number

      display gizmo axis thickness

    • Optional gizmoManager: GizmoManager

    Returns PositionGizmo

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

Internal gizmo used for interactions on the x axis

xPlaneGizmo: IPlaneDragGizmo

Internal gizmo used for interactions on the yz plane

Internal gizmo used for interactions on the y axis

yPlaneGizmo: IPlaneDragGizmo

Internal gizmo used for interactions on the xz plane

Internal gizmo used for interactions on the z axis

zPlaneGizmo: IPlaneDragGizmo

Internal gizmo used for interactions on the xy plane

PreserveScaling: boolean

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

Accessors

  • Defines where the gizmo will be positioned if updateGizmoPositionToMatchAttachedMesh is enabled. (Default: GizmoAnchorPoint.Origin)

    Returns GizmoAnchorPoint

  • Defines where the gizmo will be positioned if updateGizmoPositionToMatchAttachedMesh is enabled. (Default: GizmoAnchorPoint.Origin)

    Parameters

    Returns void

  • 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

  • Set the coordinate system to use. By default it's local. But it's possible for a user to tweak so its local for translation and world for rotation. In that case, setting the coordinate system will change updateGizmoRotationToMatchAttachedMesh and updateGizmoPositionToMatchAttachedMesh

    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 planarGizmoEnabled(): boolean
  • set planarGizmoEnabled(value: boolean): void
  • If the planar drag gizmo is enabled setting this will enable/disable XY, XZ and YZ planes regardless of individual gizmo settings.

    Returns boolean

  • If the planar drag gizmo is enabled setting this will enable/disable XY, XZ and YZ planes regardless of individual gizmo settings.

    Parameters

    • value: boolean

    Returns void

  • 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 updateGizmoPositionToMatchAttachedMesh(): boolean
  • set updateGizmoPositionToMatchAttachedMesh(value: boolean): void
  • If set the gizmo's position will be updated to match the attached mesh each frame (Default: true)

    Returns boolean

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

    Parameters

    • value: boolean

    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) NOTE: This is only possible for meshes with uniform scaling, as otherwise it's not possible to decompose the rotation

    Returns boolean

  • If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true) NOTE: This is only possible for meshes with uniform scaling, as otherwise it's not possible to decompose the rotation

    Parameters

    • value: boolean

    Returns void

  • get updateScale(): boolean
  • set updateScale(value: boolean): void
  • When set, the gizmo will always appear the same size no matter where the camera is (default: true)

    Returns boolean

  • When set, the gizmo will always appear the same size no matter where the camera is (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 method
  • Inherited accessor
  • Property
  • Method
  • Static method

Settings

Theme