Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ScaleGizmo

Gizmo that enables scaling a mesh along 3 axis

Hierarchy

Implements

Index

Constructors

constructor

  • 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

_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

uniformScaleGizmoSearch playground for uniformScaleGizmo

uniformScaleGizmo: AxisScaleGizmo

Internal gizmo used to scale all axis equally

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

Static PreserveScalingSearch playground for PreserveScaling

PreserveScaling: boolean

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

Accessors

attachedMesh

attachedNode

customRotationQuaternion

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

sensitivity

  • get sensitivity(): number
  • set sensitivity(value: number): any
  • Sensitivity factor for dragging (Default: 1)

    Returns number

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

Static GizmoAxisPointerObserverSearch playground for GizmoAxisPointerObserver

Legend

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