# Visual Gizmos for Bevy Visual gizmos to aid with development and debugging in [Bevy](https://bevyengine.org/) [bevy tracking](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking) [build status](https://github.com/LiamGallagher737/bevy_mod_gizmos/actions) [github](https://github.com/LiamGallagher737/bevy_mod_gizmos) [crates.io](https://crates.io/crates/bevy_mod_gizmos) [docs.rs](https://docs.rs/bevy_mod_gizmos)
# [Demo](examples/demo.rs) This examples showcases all built-in gizmo types and interactions. Try hovering and clicking the center gizmo! ``` cargo run --example demo ```
Demo Example Screenshot
# Setup Add the following to your `Cargo.toml` ```toml bevy_mod_gizmos = "0.4.0" ``` Add this to any file you want to use gizmos in ```rust use bevy_mod_gizmos::*; ``` Add the plugin to your app ```rust .add_plugin(GizmosPlugin) ``` For interactive gizmos add the following bundle when spawning your camera ```rust GizmoInteractionCamera::default() ``` To increase performance I recommend the following in your `Cargo.toml` ```toml [profile.dev.package."*"] opt-level = 3 ``` # Usage Draw a single gizmo ```rust draw_gizmo(gizmo); ``` Draw multiple gizmos ```rust draw_gizmos(vec![gizmo, gizmo, gizmo]); ``` Draw multiple gizmos and a connecting line ```rust draw_gizmos_with_line(vec![gizmo, gizmo, gizmo]); ``` Draw a line ```rust draw_line(points, color); ``` Draw a closed line ```rust draw_closed_line(points, color); ``` # Interactions ```rust Gizmo::new(translation, size, color).on_click(|| println!("Clicked!")) Gizmo::new(translation, size, color).on_hover(|| println!("Hovered!")) Gizmo::new(translation, size, color).on_click_system(|time: Res