Options
All
  • Public
  • Public/Protected
  • All
Menu

Single axis drag gizmo

Hierarchy

Implements

Index

Constructors

  • Creates an AxisDragGizmo

    Parameters

    • dragAxis: Vector3

      The axis which the gizmo will be able to drag on

    • Optional color: Color3

      The color of the gizmo

    • Optional gizmoLayer: UtilityLayerRenderer

      The utility layer the gizmo will be added to

    • Optional parent: Nullable<PositionGizmo>
    • Optional thickness: number

      display gizmo axis thickness

    Returns AxisDragGizmo

Properties

_rootMesh: Mesh

The root mesh of the gizmo

dragBehavior: PointerDragBehavior

Drag behavior responsible for the gizmos dragging interactions

The utility layer the gizmo will be added to

onSnapObservable: Observable<{ snapDistance: number }>

Event that fires each time the gizmo snaps to a new location.

  • snapDistance is the the change in distance
snapDistance: number

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

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 isEnabled(): boolean
  • set isEnabled(value: boolean): void
  • If the gizmo is enabled

    Returns boolean

  • If the gizmo is enabled

    Parameters

    • value: boolean

    Returns void

  • get isHovered(): boolean
  • True when the mouse pointer is hovered 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 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)

    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

  • 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

  • dispose(): void
  • setCustomMesh(mesh: Mesh): void
  • Disposes and replaces the current meshes in the gizmo with the specified mesh

    Parameters

    • mesh: Mesh

      The mesh to replace the default mesh of the gizmo

    Returns void

Legend

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

Settings

Theme