Class RotationGizmo
Hierarchy
-
Gizmo
- RotationGizmo
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Creates a RotationGizmo
Parameters
-
Optional gizmoLayer: UtilityLayerRenderer
The utility layer the gizmo will be added to
-
Optional tessellation: number
Amount of tessellation to be used when creating rotation circles
-
Optional useEulerRotation: boolean
Use and update Euler angle instead of quaternion
-
Optional thickness: number
display gizmo axis thickness
-
Optional gizmoManager: GizmoManager
Returns RotationGizmo
-
Properties
_root MeshSearch playground for _rootMesh
The root mesh of the gizmo
gizmo LayerSearch playground for gizmoLayer
The utility layer the gizmo will be added to
on Drag End ObservableSearch playground for onDragEndObservable
Fires an event when any of it's sub gizmos are released from dragging
on Drag Start ObservableSearch playground for onDragStartObservable
Fires an event when any of it's sub gizmos are dragged
update Gizmo Position ToMatch Attached MeshSearch playground for updateGizmoPositionToMatchAttachedMesh
If set the gizmo's position will be updated to match the attached mesh each frame (Default: true)
update ScaleSearch playground for updateScale
When set, the gizmo will always appear the same size no matter where the camera is (default: true)
x GizmoSearch playground for xGizmo
Internal gizmo used for interactions on the x axis
y GizmoSearch playground for yGizmo
Internal gizmo used for interactions on the y axis
z GizmoSearch playground for zGizmo
Internal gizmo used for interactions on the z axis
Accessors
attached Mesh
-
Returns Nullable<AbstractMesh>
-
Parameters
-
mesh: Nullable<AbstractMesh>
Returns any
-
attached Node
is Hovered
-
True when the mouse pointer is hovering a gizmo mesh
Returns boolean
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 any
-
snap Distance
-
Drag distance in babylon units that the gizmo will snap to when dragged (Default: 0)
Returns number
-
Drag distance in babylon units that the gizmo will snap to when dragged (Default: 0)
Parameters
-
value: number
Returns any
-
update Gizmo Rotation ToMatch Attached Mesh
-
Returns boolean
-
Parameters
-
value: boolean
Returns any
-
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
-
mesh: Mesh
Axis gizmo mesh
-
cache: GizmoAxisCache
Gizmo axis definition used for reactive gizmo UI
Returns void
-
disposeSearch playground for dispose
-
Disposes of the gizmo
Returns void
set Custom MeshSearch playground for setCustomMesh
-
CustomMeshes are not supported by this gizmo
Parameters
-
mesh: Mesh
The mesh to replace the default mesh of the gizmo
Returns void
-
Static Gizmo Axis Pointer ObserverSearch playground for GizmoAxisPointerObserver
-
Subscribes to pointer up, down, and hover events. Used for responsive gizmos.
Parameters
-
gizmoLayer: UtilityLayerRenderer
The utility layer the gizmo will be added to
-
gizmoAxisCache: Map<Mesh, GizmoAxisCache>
Gizmo axis definition used for reactive gizmo UI
Returns Observer<PointerInfo>
pointerObserver
-
Gizmo that enables rotating a mesh along 3 axis