Class GizmoManager
Hierarchy
- GizmoManager
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Instantiates 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
attachable MeshesSearch playground for attachableMeshes
Array of meshes which will have the gizmo attached when a pointer selected them. If null, all meshes are attachable. (Default: null)
attachable NodesSearch playground for attachableNodes
Array of nodes which will have the gizmo attached when a pointer selected them. If null, all nodes are attachable. (Default: null)
bounding Box Drag BehaviorSearch playground for boundingBoxDragBehavior
When bounding box gizmo is enabled, this can be used to track drag/end events
clear Gizmo On Empty Pointer EventSearch playground for clearGizmoOnEmptyPointerEvent
When true, the gizmo will be detached from the current object when a pointer down occurs with an empty picked mesh
enable Auto PickingSearch playground for enableAutoPicking
When true (default), picking to attach a new mesh is enabled. This works in sync with inspector autopicking.
gizmosSearch playground for gizmos
Gizmo's created by the gizmo manager, gizmo will be null until gizmo has been enabled for the first time
Type declaration
bounding
Box Gizmo: Nullable<IBoundingBoxGizmo> position
Gizmo: Nullable<IPositionGizmo> rotation
Gizmo: Nullable<IRotationGizmo> scale
Gizmo: Nullable<IScaleGizmo>
on Attached To Mesh ObservableSearch playground for onAttachedToMeshObservable
Fires an event when the manager is attached to a mesh
on Attached To Node ObservableSearch playground for onAttachedToNodeObservable
Fires an event when the manager is attached to a node
use Pointer To Attach GizmosSearch playground for usePointerToAttachGizmos
If pointer events should perform attaching/detaching a gizmo, if false this can be done manually via attachToMesh/attachToNode. (Default: true)
Accessors
bounding Box Gizmo Enabled
If the boundingBox gizmo is enabled
Returns boolean
If the boundingBox gizmo is enabled
Parameters
value: boolean
Returns void
is Hovered
True when the mouse pointer is hovering a gizmo mesh
Returns boolean
keep Depth Utility Layer
Utility layer that the bounding box gizmo belongs to
Returns UtilityLayerRenderer
position Gizmo Enabled
If the position gizmo is enabled
Returns boolean
If the position gizmo is enabled
Parameters
value: boolean
Returns void
rotation Gizmo Enabled
If the rotation gizmo is enabled
Returns boolean
If the rotation gizmo is enabled
Parameters
value: boolean
Returns void
scale Gizmo Enabled
If the scale gizmo is enabled
Returns boolean
If the scale gizmo is enabled
Parameters
value: boolean
Returns void
scale Ratio
Ratio for the scale of the gizmo (Default: 1)
Returns number
Ratio for the scale of the gizmo (Default: 1)
Parameters
value: number
Returns void
utility Layer
Utility layer that all gizmos besides bounding box belong to
Returns UtilityLayerRenderer
Methods
add To Axis CacheSearch 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
attach To MeshSearch playground for attachToMesh
Attaches a set of gizmos to the specified mesh
Parameters
mesh: Nullable<AbstractMesh>
The mesh the gizmo's should be attached to
Returns void
attach To NodeSearch playground for attachToNode
disposeSearch playground for dispose
Disposes of the gizmo manager
Returns void
Helps setup gizmo's in the scene to rotate/scale/position nodes