Creates a gizmo manager with the chosen gizmos enabled: position arrows, rotation rings, scale handles and a bounding box.
With usePointerToAttachGizmos true the gizmos attach to the mesh the user clicks, limited
to attachableMeshes when that list is given; clearGizmoOnEmptyPointerEvent detaches them
on a click into empty space.
Which gizmos to enable, the attachable meshes, the pointer behavior and the scale ratio
The gizmo manager
const manager = bitbybit.babylon.gizmo.manager.createGizmoManager({ positionGizmoEnabled: true, rotationGizmoEnabled: true, scaleGizmoEnabled: false, boundingBoxGizmoEnabled: false, attachableMeshes: [], usePointerToAttachGizmos: false, clearGizmoOnEmptyPointerEvent: false, scaleRatio: 1 });
bitbybit.babylon.gizmo.manager.attachToMesh({ gizmoManager: manager, mesh });
Reads the position gizmo of a manager, the arrows that drag the mesh along an axis, for tuning its snapping and planes; it exists only when position gizmos are enabled.
The gizmo manager
The position gizmo
Reads the rotation gizmo of a manager, the rings that turn the mesh around an axis, for tuning its snapping and sensitivity; it exists only when rotation gizmos are enabled.
The gizmo manager
The rotation gizmo
Reads the scale gizmo of a manager, the handles that stretch the mesh along an axis, for tuning its snapping and sensitivity; it exists only when scale gizmos are enabled.
The gizmo manager
The scale gizmo
Reads the bounding box gizmo of a manager, the frame with corner handles for scaling and rotating, for tuning its handles and snapping; it exists only when bounding box gizmos are enabled.
The gizmo manager
The bounding box gizmo
Shows the manager's enabled gizmos on a mesh so the user can manipulate it; any mesh attached before is released.
The gizmo manager and the mesh
The same gizmo manager
Hides the manager's gizmos by releasing the mesh they were attached to.
The gizmo manager
The same gizmo manager
The gizmo manager owns the on-screen manipulators for one attached mesh at a time and, by default, attaches them to whatever the pointer clicks. Create it with the gizmos you want enabled, then read the individual position, rotation, scale and bounding box gizmos from it to tune them.