PositionGizmo

Gizmo that enables dragging 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

attachedMesh

Find examples in Playground
attachedMesh: Nullable<AbstractMesh>

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

planarGizmoEnabled

Find examples in Playground
planarGizmoEnabled: boolean

If the planar drag gizmo is enabled setting this will enable/disable XY, XZ and YZ planes regardless of individual gizmo settings.

scaleRatio

Find examples in Playground
scaleRatio: number

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

snapDistance

Find examples in Playground
snapDistance: number

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

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

xGizmo

Find examples in Playground

Internal gizmo used for interactions on the x axis

xPlaneGizmo

Find examples in Playground
xPlaneGizmo: PlaneDragGizmo

Internal gizmo used for interactions on the yz plane

yGizmo

Find examples in Playground

Internal gizmo used for interactions on the y axis

yPlaneGizmo

Find examples in Playground
yPlaneGizmo: PlaneDragGizmo

Internal gizmo used for interactions on the xz plane

zGizmo

Find examples in Playground

Internal gizmo used for interactions on the z axis

zPlaneGizmo

Find examples in Playground
zPlaneGizmo: PlaneDragGizmo

Internal gizmo used for interactions on the xy plane

Methods

dispose

Find examples in Playground
  • dispose(): void

setCustomMesh

Find examples in Playground
  • setCustomMesh(mesh: Mesh): void
  • CustomMeshes are not supported by this gizmo

    Parameters

    • mesh: Mesh

      The mesh to replace the default mesh of the gizmo

    Returns void

Generated using TypeDoc