23 releases (15 breaking)

0.16.2 Mar 14, 2024
0.15.0 Feb 1, 2024
0.13.0 Dec 22, 2023
0.12.0 Oct 10, 2023
0.4.1 Nov 18, 2021

#307 in GUI

Download history 961/week @ 2024-07-14 737/week @ 2024-07-21 1043/week @ 2024-07-28 589/week @ 2024-08-04 576/week @ 2024-08-11 586/week @ 2024-08-18 603/week @ 2024-08-25 650/week @ 2024-09-01 803/week @ 2024-09-08 606/week @ 2024-09-15 1021/week @ 2024-09-22 519/week @ 2024-09-29 274/week @ 2024-10-06 470/week @ 2024-10-13 578/week @ 2024-10-20 525/week @ 2024-10-27

1,936 downloads per month
Used in 9 crates (3 directly)

Custom license

230KB
1.5K SLoC

egui-gizmo

Latest version Documentation MIT

3d transformation gizmo built on top of the egui library.

Try it out in a web demo

Rotation Translation Scale

Usage

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.

Dependencies

~8–13MB
~203K SLoC