Options
All
  • Public
  • Public/Protected
  • All
Menu

Gizmo that enables scaling a mesh along 3 axis

Hierarchy

Index

Constructors

  • Creates a ScaleGizmo

    Parameters

    • Optional gizmoLayer: UtilityLayerRenderer

      The utility layer the gizmo will be added to

    • Optional thickness: number

      display gizmo axis thickness

    • Optional gizmoManager: GizmoManager

    Returns ScaleGizmo

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

uniformScaleGizmo: AxisScaleGizmo

Internal gizmo used to scale all axis equally

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

  • Returns Nullable<AbstractMesh>

  • Parameters

    Returns void

  • Returns Nullable<Node>

  • 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 sensitivity(): number
  • set sensitivity(value: number): void
  • Sensitivity factor for dragging (Default: 1)

    Returns number

  • Sensitivity factor for dragging (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
  • Returns boolean

  • 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
  • Disposes of the gizmo

    Returns 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