1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//! Bevy_gizmo_log gives you the ability to render gizmos by
//! logging them. This lets you render gizmos anytime, anywhere.
//!
//! ```
//! # use bevy_color::palettes::css::RED;
//! # use bevy_gizmo_log::gizmo::arrow;
//! # use bevy_log::debug;
//! # use bevy_math::Vec3;
//! debug!(gizmo = arrow(Vec3::ZERO, Vec3::ONE, RED));
//! ```
//!
//! # Compatible versions
//!
//! |bevy|bevy_gizmo_log|
//! |----|--------------|
//! |0.14|0.1 |
//!
//! # Motivation
//!
//! 1. Make adding gizmos as quick and easy as possible.
//! 2. Add gizmos from anywhere, even from code not managed by bevy.
//!
//! # Getting started
//!
//! Add [`GizmoLogPlugin`] to your bevy app. If you use
//! [`DefaultPlugins`], you'll also need to disable bevy's default
//! [`LogPlugin`].
//!
//! ```
//! # use bevy_app::{App, PluginGroup};
//! # use bevy_internal::DefaultPlugins;
//! # use bevy_gizmo_log::GizmoLogPlugin;
//! # use bevy_log::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_color::palettes::css::RED;
//! # use bevy_log::debug;
//! # use bevy_math::Vec3;
//! # use bevy_transform::components::Transform;
//! use bevy_gizmo_log::gizmo::{arrow, axes};
//!
//! debug!(gizmo = arrow(Vec3::ZERO, Vec3::ONE, RED));
//! debug!(gizmo = axes(Transform::default(), 1.0));
//! ```
//!
//! # Feature flags
//!
//! **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.
//!
//! [`DefaultPlugins`]: bevy::DefaultPlugins
//! [`LogPlugin`]: bevy::log::LogPlugin
pub use render_gizmo_log_events;
pub use GizmoLayer;
pub use GizmoLogPlugin;