bevy_mod_gizmos 0.1.0

Visual gizmos to aid with development and debugging in Bevy
Documentation

Visual Gizmos for Bevy

Visual gizmos to aid with development and debugging in Bevy

Setup

Add the following to your Cargo.toml

bevy_mod_gizmos = { git = "https://github.com/LiamGallagher737/bevy_mod_gizmos" }

Add this to any file you want to use gizmos in

use bevy_mod_gizmos::*:

Add the plugin to your app

.add_plugin(bevy_mod_gizmos::GizmosPlugin)

For interactive gizmos add the following when creating your camera

.insert_bundle(GizmoInteractionCamera::default())

To increase performance I recommend the following in your Cargo.toml

[profile.dev.package."*"]
opt-level = 3

Usage

Render a single gizmo

draw_gizmo(gizmo);

Render multiple gizmos and a connecting line

draw_gizmos(vec![gizmo, gizmo, gizmo], true);

Render a line

draw_line(points, color);

Gizmos

Gizmo::sphere(position, size, color)
Gizmo::cube(position, size, color)
Gizmo::cubiod(position, scale, color)
Gizmo::capsule(position, width, height, color)
Gizmo::torus(position, size, color)
Gizmo::new(position, scale, color, mesh_handle)

License

All code in this repository is dual-licensed under either:

at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.