bevy_mod_gizmos 0.2.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 = "0.2.0"

Add this to any file you want to use gizmos in

use bevy_mod_gizmos::*:

Add the plugin to your app

.add_plugin(GizmosPlugin)

For interactive gizmos add the following bundle when spawning your camera

GizmoInteractionCamera::default()

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

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

Demo

This exampels showcases all built-in gizmmo types and interactions. Click on a gizmo and it will print to the console its name.

cargo run --example demo 

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)

More Info

Bevy Tracking

Bevy bevy_mod_gizmos
0.9 0.2.0
0.7 0.1.1

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.