Skip to content

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

License

Notifications You must be signed in to change notification settings

hrydgard/egui-gizmo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.into();
}

For a more complete example, see the demo source code.

The gizmo accepts matrices as Into<[[f32; 4]; 4]>, which means it is easy to use with matrix types from various crates such as nalgebra, glam and cgmath.

About

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

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Rust 100.0%