Expand description
§Examples
Draw a single gizmo
draw_gizmo(
Gizmo::new(Vec3::ZERO, 1.0, Color::WHITE)
.on_click(|| println!("Clicked!"))
.on_hover(|| println!("Hovered")),
);
Draw multiple gizmos
draw_gizmos(vec![
Gizmo::new(Vec3::X, 0.5, Color::RED),
Gizmo::new(Vec3::Y, 0.5, Color::RED),
Gizmo::new(Vec3::Z, 0.5, Color::RED),
]);
Draw a line
draw_line(
vec![
Vec3::X,
Vec3::Y,
Vec3::Z,
],
Color::PURPLE,
);
The rest of the methods can be found here.
Structs§
- Gizmo
- A gizmo
- Gizmo
Interaction Camera - Add this to your main camera for interactable gizmos to function
- Gizmos
Plugin - Add this to your bevy
App
for gizmos to function - Line
- A pixel wide lline
Functions§
- draw_
closed_ line - Draw a closed line, it takes a vec of Vec3 points and a color
- draw_
gizmo - Draw a single gizmo, it takes anything that implements
Into<Gizmo>
- draw_
gizmos - Draw multiple gizmos, it takes a vec of anything that implements
Into<Gizmo>
- draw_
gizmos_ with_ line - Draw multiple gizmos with a connecting line, it takes a vec of anything that implements
Into<Gizmo>
- draw_
line - Draw a line, it takes a vec of Vec3 points and a color