Crates.io | egui-gizmo |
lib.rs | egui-gizmo |
version | 0.16.2 |
source | src |
created_at | 2021-11-01 15:00:48.660596 |
updated_at | 2024-03-14 18:04:04.733295 |
description | 3d transform gizmo for the egui library |
homepage | https://github.com/urholaukkarinen/egui-gizmo |
repository | https://github.com/urholaukkarinen/egui-gizmo |
max_upload_size | |
id | 475277 |
size | 290,320 |
3d transformation gizmo built on top of the egui library.
let gizmo = Gizmo::new("My gizmo")
.view_matrix(view_matrix)
.projection_matrix(projection_matrix)
.model_matrix(model_matrix)
.mode(GizmoMode::Rotate);
if let Some(response) = gizmo.interact(ui) {
model_matrix = response.transform();
}
For a more complete example, see the demo source code.
The gizmo exposes matrices and vectors as mint types, which means it is easy to use with matrix types from various crates
such as nalgebra, glam
and cgmath. You may need to enable a mint
feature, depending on the math library.