Class GizmoManager
Hierarchy
- GizmoManager
Implements
Index
Constructors
Properties
Accessors
Methods
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
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 OnEmpty 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
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<BoundingBoxGizmo> -
position
Gizmo: Nullable<PositionGizmo> -
rotation
Gizmo: Nullable<RotationGizmo> -
scale
Gizmo: Nullable<ScaleGizmo>
on Attached ToMesh ObservableSearch playground for onAttachedToMeshObservable
Fires an event when the manager is attached to a mesh
on Attached ToNode ObservableSearch playground for onAttachedToNodeObservable
Fires an event when the manager is attached to a node
use Pointer ToAttach 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 any
-
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 any
-
rotation Gizmo Enabled
-
If the rotation gizmo is enabled
Returns boolean
-
If the rotation gizmo is enabled
Parameters
-
value: boolean
Returns any
-
scale Gizmo Enabled
-
If the scale gizmo is enabled
Returns boolean
-
If the scale gizmo is enabled
Parameters
-
value: boolean
Returns any
-
utility Layer
-
Utility layer that all gizmos besides bounding box belong to
Returns UtilityLayerRenderer
Methods
add ToAxis 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 ToMeshSearch 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 ToNodeSearch 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