API

Class GizmoManager

Helps set up gizmos in the scene to rotate/scale/position nodes

Implements

Index
attachableMeshes: Nullable<AbstractMesh[]> = null

Array of meshes which will have the gizmo attached when a pointer selected them. If null, all meshes are attachable. (Default: null)

attachableNodes: Nullable<Node[]> = null

Array of nodes which will have the gizmo attached when a pointer selected them. If null, all nodes are attachable. (Default: null)

boundingBoxDragBehavior: SixDofDragBehavior = ...

When bounding box gizmo is enabled, this can be used to track drag/end events

clearGizmoOnEmptyPointerEvent: boolean = false

When true, the gizmo will be detached from the current object when a pointer down occurs with an empty picked mesh

enableAutoPicking: boolean = true

When true (default), picking to attach a new mesh is enabled. This works in sync with inspector autopicking.

gizmos: {
    boundingBoxGizmo: Nullable<IBoundingBoxGizmo>;
    positionGizmo: Nullable<IPositionGizmo>;
    rotationGizmo: Nullable<IRotationGizmo>;
    scaleGizmo: Nullable<IScaleGizmo>;
}

Gizmos created by the gizmo manager, gizmo will be null until gizmo has been enabled for the first time

onAttachedToMeshObservable: Observable<Nullable<AbstractMesh>> = ...

Fires an event when the manager is attached to a mesh

onAttachedToNodeObservable: Observable<Nullable<Node>> = ...

Fires an event when the manager is attached to a node

usePointerToAttachGizmos: boolean = true

If pointer events should perform attaching/detaching a gizmo, if false this can be done manually via attachToMesh/attachToNode. (Default: true)