Crates.io | bevy_gizmo_log |
lib.rs | bevy_gizmo_log |
version | 0.2.0 |
source | src |
created_at | 2024-08-09 21:47:21.245884 |
updated_at | 2024-08-10 07:26:15.650311 |
description | Render bevy gizmos by logging them |
homepage | |
repository | https://github.com/370417/bevy_gizmo_log |
max_upload_size | |
id | 1331686 |
size | 172,795 |
Bevy_gizmo_log gives you the ability to render gizmos by logging them. This lets you render gizmos anytime, anywhere.
debug!(gizmo = arrow(Vec3::ZERO, Vec3::ONE, RED));
bevy | bevy_gizmo_log |
---|---|
0.14 | 0.2.0, |
0.1.0 |
Add GizmoLogPlugin
to your bevy app. If you use
DefaultPlugins
, you'll also need to disable bevy's default
LogPlugin
.
App::new()
.add_plugins(DefaultPlugins.build().disable::<LogPlugin>())
.add_plugins(GizmoLogPlugin::default());
To log a gizmo, choose a function from the gizmo
module and log it in a gizmo field:
use bevy_gizmo_log::gizmo::{arrow, axes};
debug!(gizmo = arrow(Vec3::ZERO, Vec3::ONE, RED));
debug!(gizmo = axes(Transform::default(), 1.0));
bevy: Enabled by default. The bevy feature enables reading gizmo logs in bevy and rendering them. You can disable this feature if your crate needs to generate gizmo logs but doesn't need to consume them.
convert-nalgebra033: Adds a module gizmo_na
which lets you
create gizmos using nalgebra types instead of bevy's default glam types.