|
30 | 30 | //! The defaults provide a "full" engine experience, but you can easily enable / disable features
|
31 | 31 | //! in your project's `Cargo.toml` to meet your specific needs. See Bevy's `Cargo.toml` for a full list of features available.
|
32 | 32 | //!
|
33 |
| -//! If you prefer it, you can also consume the individual bevy crates directly. |
| 33 | +//! If you prefer, you can also consume the individual bevy crates directly. |
| 34 | +//! Each module in the root of this crate, except for the prelude, can be found on crates.io |
| 35 | +//! with `bevy_` appended to the front, e.g. `app` -> [`bevy_app`](https://docs.rs/bevy_app/0.2.1/bevy_app/). |
34 | 36 |
|
35 | 37 | #![doc(
|
36 | 38 | html_logo_url = "https://bevyengine.org/assets/icon.png",
|
37 | 39 | html_favicon_url = "https://bevyengine.org/assets/icon.png"
|
38 | 40 | )]
|
39 | 41 |
|
40 |
| -mod default_plugins; |
| 42 | +/// `use bevy::prelude::*;` to import common components, bundles, and plugins. |
41 | 43 | pub mod prelude;
|
42 | 44 |
|
43 |
| -pub use bevy_app as app; |
44 |
| -pub use bevy_asset as asset; |
45 |
| -pub use bevy_core as core; |
46 |
| -pub use bevy_diagnostic as diagnostic; |
47 |
| -pub use bevy_ecs as ecs; |
48 |
| -pub use bevy_input as input; |
49 |
| -pub use bevy_math as math; |
50 |
| -pub use bevy_property as property; |
51 |
| -pub use bevy_scene as scene; |
52 |
| -pub use bevy_tasks as tasks; |
53 |
| -pub use bevy_transform as transform; |
54 |
| -pub use bevy_type_registry as type_registry; |
55 |
| -pub use bevy_utils as utils; |
56 |
| -pub use bevy_window as window; |
| 45 | +mod default_plugins; |
57 | 46 | pub use default_plugins::*;
|
58 | 47 |
|
| 48 | +pub mod app { |
| 49 | + //! Build bevy apps, create plugins, and read events. |
| 50 | + pub use bevy_app::*; |
| 51 | +} |
| 52 | + |
| 53 | +pub mod asset { |
| 54 | + //! Load and store assets and resources for Apps |
| 55 | + pub use bevy_asset::*; |
| 56 | +} |
| 57 | + |
| 58 | +pub mod core { |
| 59 | + //! Contains core plugins and utilities for time. |
| 60 | + pub use bevy_core::*; |
| 61 | +} |
| 62 | + |
| 63 | +pub mod diagnostic { |
| 64 | + //! Useful diagnostic plugins and types for bevy apps. |
| 65 | + pub use bevy_diagnostic::*; |
| 66 | +} |
| 67 | + |
| 68 | +pub mod ecs { |
| 69 | + //! Bevy's entity-component-system. |
| 70 | + pub use bevy_ecs::*; |
| 71 | +} |
| 72 | + |
| 73 | +pub mod input { |
| 74 | + //! Resources and events for inputs, e.g. mouse/keyboard, touch, gamepads, etc. |
| 75 | + pub use bevy_input::*; |
| 76 | +} |
| 77 | + |
| 78 | +pub mod math { |
| 79 | + pub use bevy_math::*; |
| 80 | +} |
| 81 | + |
| 82 | +pub mod property { |
| 83 | + //! Dynamically interact with struct fields and names. |
| 84 | + pub use bevy_property::*; |
| 85 | +} |
| 86 | + |
| 87 | +pub mod scene { |
| 88 | + pub use bevy_scene::*; |
| 89 | +} |
| 90 | + |
| 91 | +pub mod tasks { |
| 92 | + pub use bevy_tasks::*; |
| 93 | +} |
| 94 | + |
| 95 | +pub mod transform { |
| 96 | + pub use bevy_transform::*; |
| 97 | +} |
| 98 | + |
| 99 | +pub mod type_registry { |
| 100 | + pub use bevy_type_registry::*; |
| 101 | +} |
| 102 | + |
| 103 | +pub mod utils { |
| 104 | + pub use bevy_utils::*; |
| 105 | +} |
| 106 | + |
| 107 | +pub mod window { |
| 108 | + pub use bevy_window::*; |
| 109 | +} |
| 110 | + |
59 | 111 | #[cfg(feature = "bevy_audio")]
|
60 |
| -pub use bevy_audio as audio; |
| 112 | +pub mod audio { |
| 113 | + //! Provides types and plugins for audio playback. |
| 114 | + pub use bevy_audio::*; |
| 115 | +} |
61 | 116 |
|
62 | 117 | #[cfg(feature = "bevy_gltf")]
|
63 |
| -pub use bevy_gltf as gltf; |
| 118 | +pub mod gltf { |
| 119 | + //! Support for GLTF file loading. |
| 120 | + pub use bevy_gltf::*; |
| 121 | +} |
64 | 122 |
|
65 | 123 | #[cfg(feature = "bevy_pbr")]
|
66 |
| -pub use bevy_pbr as pbr; |
| 124 | +pub mod pbr { |
| 125 | + //! Physically based rendering. **Note**: true PBR has not yet been implemented; the name `pbr` is aspirational. |
| 126 | + pub use bevy_pbr::*; |
| 127 | +} |
67 | 128 |
|
68 | 129 | #[cfg(feature = "bevy_render")]
|
69 |
| -pub use bevy_render as render; |
| 130 | +pub mod render { |
| 131 | + pub use bevy_render::*; |
| 132 | +} |
70 | 133 |
|
71 | 134 | #[cfg(feature = "bevy_sprite")]
|
72 |
| -pub use bevy_sprite as sprite; |
| 135 | +pub mod sprite { |
| 136 | + //! Items for sprites, rects, texture atlases, etc. |
| 137 | + pub use bevy_sprite::*; |
| 138 | +} |
73 | 139 |
|
74 | 140 | #[cfg(feature = "bevy_text")]
|
75 |
| -pub use bevy_text as text; |
| 141 | +pub mod text { |
| 142 | + pub use bevy_text::*; |
| 143 | +} |
76 | 144 |
|
77 | 145 | #[cfg(feature = "bevy_ui")]
|
78 |
| -pub use bevy_ui as ui; |
| 146 | +pub mod ui { |
| 147 | + pub use bevy_ui::*; |
| 148 | +} |
79 | 149 |
|
80 | 150 | #[cfg(feature = "bevy_winit")]
|
81 |
| -pub use bevy_winit as winit; |
| 151 | +pub mod winit { |
| 152 | + pub use bevy_winit::*; |
| 153 | +} |
82 | 154 |
|
83 | 155 | #[cfg(feature = "bevy_wgpu")]
|
84 |
| -pub use bevy_wgpu as wgpu; |
| 156 | +pub mod wgpu { |
| 157 | + pub use bevy_wgpu::*; |
| 158 | +} |
85 | 159 |
|
86 | 160 | #[cfg(feature = "bevy_dynamic_plugin")]
|
87 |
| -pub use bevy_dynamic_plugin as dynamic_plugin; |
| 161 | +pub mod dynamic_plugin { |
| 162 | + pub use bevy_dynamic_plugin::*; |
| 163 | +} |
0 commit comments