Class PlaneDragGizmo
Hierarchy
-
Gizmo
- PlaneDragGizmo
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Creates a PlaneDragGizmo
Parameters
-
dragPlaneNormal: Vector3
The axis normal to which the gizmo will be able to drag on
-
Optional color: Color3
The color of the gizmo
-
Optional gizmoLayer: UtilityLayerRenderer
The utility layer the gizmo will be added to
-
Optional parent: Nullable<PositionGizmo>
Returns PlaneDragGizmo
-
Properties
_root MeshSearch playground for _rootMesh
The root mesh of the gizmo
drag BehaviorSearch playground for dragBehavior
Drag behavior responsible for the gizmos dragging interactions
gizmo LayerSearch playground for gizmoLayer
The utility layer the gizmo will be added to
on Snap ObservableSearch playground for onSnapObservable
Event that fires each time the gizmo snaps to a new location.
- snapDistance is the the change in distance
snap DistanceSearch playground for snapDistance
Drag distance in babylon units that the gizmo will snap to when dragged (Default: 0)
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)
Accessors
attached Mesh
-
Mesh that the gizmo will be attached to. (eg. on a drag gizmo the mesh that will be dragged)
- When set, interactions will be enabled
Returns Nullable<AbstractMesh>
-
Mesh that the gizmo will be attached to. (eg. on a drag gizmo the mesh that will be dragged)
- When set, interactions will be enabled
Parameters
-
value: Nullable<AbstractMesh>
Returns any
attached Node
-
Node that the gizmo will be attached to. (eg. on a drag gizmo the mesh, bone or NodeTransform that will be dragged)
- When set, interactions will be enabled
Returns Nullable<Node>
-
Node that the gizmo will be attached to. (eg. on a drag gizmo the mesh, bone or NodeTransform that will be dragged)
- When set, interactions will be enabled
Parameters
Returns any
is Enabled
-
If the gizmo is enabled
Returns boolean
-
If the gizmo is enabled
Parameters
-
value: boolean
Returns any
-
is Hovered
-
True when the mouse pointer is hovered 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
-
update Gizmo Rotation ToMatch Attached Mesh
-
If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true)
Returns boolean
-
If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true)
Parameters
-
value: boolean
Returns any
-
Methods
disposeSearch playground for dispose
-
Disposes of the gizmo
Returns void
set Custom MeshSearch playground for setCustomMesh
-
Disposes and replaces the current meshes in the gizmo with the specified mesh
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
-
Single plane drag gizmo