Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GizmoManager

Helps setup gizmo's in the scene to rotate/scale/position nodes

Hierarchy

  • GizmoManager

Implements

Index

Constructors

constructor

  • Instatiates a gizmo manager

    Parameters

    • scene: Scene

      the scene to overlay the gizmos on top of

    • Optional thickness: number

      display gizmo axis thickness

    • Optional utilityLayer: UtilityLayerRenderer

      the layer where gizmos are rendered

    • Optional keepDepthUtilityLayer: UtilityLayerRenderer

      the layer where occluded gizmos are rendered

    Returns GizmoManager

Properties

attachableMeshesSearch playground for attachableMeshes

attachableMeshes: Nullable<Array<AbstractMesh>>

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

attachableNodesSearch playground for attachableNodes

attachableNodes: Nullable<Array<Node>>

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

boundingBoxDragBehaviorSearch playground for boundingBoxDragBehavior

boundingBoxDragBehavior: SixDofDragBehavior

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

clearGizmoOnEmptyPointerEventSearch playground for clearGizmoOnEmptyPointerEvent

clearGizmoOnEmptyPointerEvent: boolean

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

gizmosSearch playground for gizmos

gizmos: { boundingBoxGizmo: Nullable<BoundingBoxGizmo>; positionGizmo: Nullable<PositionGizmo>; rotationGizmo: Nullable<RotationGizmo>; scaleGizmo: Nullable<ScaleGizmo> }

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

Type declaration

onAttachedToMeshObservableSearch playground for onAttachedToMeshObservable

onAttachedToMeshObservable: Observable<Nullable<AbstractMesh>>

Fires an event when the manager is attached to a mesh

onAttachedToNodeObservableSearch playground for onAttachedToNodeObservable

onAttachedToNodeObservable: Observable<Nullable<Node>>

Fires an event when the manager is attached to a node

usePointerToAttachGizmosSearch playground for usePointerToAttachGizmos

usePointerToAttachGizmos: boolean

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

Accessors

boundingBoxGizmoEnabled

  • get boundingBoxGizmoEnabled(): boolean
  • set boundingBoxGizmoEnabled(value: boolean): any
  • If the boundingBox gizmo is enabled

    Returns boolean

  • If the boundingBox gizmo is enabled

    Parameters

    • value: boolean

    Returns any

isHovered

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

    Returns boolean

keepDepthUtilityLayer

  • Utility layer that the bounding box gizmo belongs to

    Returns UtilityLayerRenderer

positionGizmoEnabled

  • get positionGizmoEnabled(): boolean
  • set positionGizmoEnabled(value: boolean): any
  • If the position gizmo is enabled

    Returns boolean

  • If the position gizmo is enabled

    Parameters

    • value: boolean

    Returns any

rotationGizmoEnabled

  • get rotationGizmoEnabled(): boolean
  • set rotationGizmoEnabled(value: boolean): any
  • If the rotation gizmo is enabled

    Returns boolean

  • If the rotation gizmo is enabled

    Parameters

    • value: boolean

    Returns any

scaleGizmoEnabled

  • get scaleGizmoEnabled(): boolean
  • set scaleGizmoEnabled(value: boolean): any
  • If the scale gizmo is enabled

    Returns boolean

  • If the scale gizmo is enabled

    Parameters

    • value: boolean

    Returns any

utilityLayer

  • Utility layer that all gizmos besides bounding box belong to

    Returns UtilityLayerRenderer

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

    • gizmoAxisCache: Map<Mesh, GizmoAxisCache>

      Gizmo axis definition used for reactive gizmo UI

    Returns void

attachToMeshSearch playground for attachToMesh

  • Attaches a set of gizmos to the specified mesh

    Parameters

    Returns void

attachToNodeSearch playground for attachToNode

  • Attaches a set of gizmos to the specified node

    Parameters

    • node: Nullable<Node>

      The node the gizmo's should be attached to

    Returns void

disposeSearch playground for dispose

  • dispose(): void
  • Disposes of the gizmo manager

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Static method