ScaleGizmo

Gizmo that enables scaling a mesh along 3 axis

Hierarchy

Implements

Index

Constructors

constructor

Find examples in Playground

Properties

_rootMesh

Find examples in Playground
_rootMesh: Mesh

The root mesh of the gizmo

gizmoLayer

Find examples in Playground

The utility layer the gizmo will be added to

onDragEndObservable

Find examples in Playground
onDragEndObservable: Observable<unknown>

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

onDragStartObservable

Find examples in Playground
onDragStartObservable: Observable<unknown>

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

uniformScaleGizmo

Find examples in Playground
uniformScaleGizmo: AxisScaleGizmo

Internal gizmo used to scale all axis equally

updateGizmoPositionToMatchAttachedMesh

Find examples in Playground
updateGizmoPositionToMatchAttachedMesh: boolean

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

updateScale

Find examples in Playground
updateScale: boolean

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

xGizmo

Find examples in Playground

Internal gizmo used for interactions on the x axis

yGizmo

Find examples in Playground

Internal gizmo used for interactions on the y axis

zGizmo

Find examples in Playground

Internal gizmo used for interactions on the z axis

Accessors

attachedMesh

Find examples in Playground

attachedNode

Find examples in Playground

isHovered

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

    Returns boolean

scaleRatio

Find examples in Playground
  • 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

Find examples in Playground
  • 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

Find examples in Playground
  • 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

Find examples in Playground
  • get updateGizmoRotationToMatchAttachedMesh(): boolean
  • set updateGizmoRotationToMatchAttachedMesh(value: boolean): any

Methods

dispose

Find examples in Playground
  • dispose(): void

setCustomMesh

Find examples in Playground
  • 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

Generated using TypeDoc