AxisScaleGizmo

Single axis scale gizmo

Hierarchy

Implements

Index

Constructors

constructor

Find examples in Playground

Properties

attachedMesh

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

dragBehavior

Find examples in Playground
dragBehavior: PointerDragBehavior

Drag behavior responsible for the gizmos dragging interactions

gizmoLayer

Find examples in Playground

The utility layer the gizmo will be added to

onSnapObservable

Find examples in Playground
onSnapObservable: Observable<object>

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

  • snapDistance is the the change in distance

scaleRatio

Find examples in Playground
scaleRatio: number

Ratio for the scale of the gizmo (Default: 1)

snapDistance

Find examples in Playground
snapDistance: number

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

uniformScaling

Find examples in Playground
uniformScaling: boolean

If the scaling operation should be done on all axis (default: false)

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)

updateGizmoRotationToMatchAttachedMesh

Find examples in Playground
updateGizmoRotationToMatchAttachedMesh: boolean

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

Methods

dispose

Find examples in Playground
  • dispose(): void

setCustomMesh

Find examples in Playground
  • setCustomMesh(mesh: Mesh, useGizmoMaterial?: boolean): 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

    • Optional useGizmoMaterial: boolean

      If the gizmo's default material should be used (default: false)

    Returns void

Generated using TypeDoc