mirror of
https://github.com/bevyengine/bevy
synced 2025-01-12 05:09:00 +00:00
62 lines
1.7 KiB
Rust
62 lines
1.7 KiB
Rust
#![feature(min_specialization)]
|
|
pub mod prelude;
|
|
|
|
pub use bevy_app as app;
|
|
pub use glam as math;
|
|
pub use legion;
|
|
|
|
#[cfg(feature = "asset")]
|
|
pub use bevy_asset as asset;
|
|
#[cfg(feature = "core")]
|
|
pub use bevy_core as core;
|
|
#[cfg(feature = "derive")]
|
|
pub use bevy_derive as derive;
|
|
#[cfg(feature = "diagnostic")]
|
|
pub use bevy_diagnostic as diagnostic;
|
|
#[cfg(feature = "input")]
|
|
pub use bevy_input as input;
|
|
#[cfg(feature = "render")]
|
|
pub use bevy_render as render;
|
|
#[cfg(feature = "serialization")]
|
|
pub use bevy_serialization as serialization;
|
|
#[cfg(feature = "transform")]
|
|
pub use bevy_transform as transform;
|
|
#[cfg(feature = "ui")]
|
|
pub use bevy_ui as ui;
|
|
#[cfg(feature = "window")]
|
|
pub use bevy_window as window;
|
|
|
|
use app::AppBuilder;
|
|
|
|
pub trait AddDefaultPlugins {
|
|
fn add_default_plugins(&mut self) -> &mut Self;
|
|
}
|
|
|
|
impl AddDefaultPlugins for AppBuilder {
|
|
fn add_default_plugins(&mut self) -> &mut Self {
|
|
#[cfg(feature = "core")]
|
|
self.add_plugin(bevy_core::CorePlugin::default());
|
|
|
|
#[cfg(feature = "input")]
|
|
self.add_plugin(bevy_input::InputPlugin::default());
|
|
|
|
#[cfg(feature = "window")]
|
|
self.add_plugin(bevy_window::WindowPlugin::default());
|
|
|
|
#[cfg(feature = "render")]
|
|
self.add_plugin(bevy_render::RenderPlugin::default());
|
|
|
|
#[cfg(feature = "ui")]
|
|
self.add_plugin(ui::UiPlugin::default());
|
|
|
|
#[cfg(feature = "winit")]
|
|
self.add_plugin(bevy_winit::WinitPlugin::default());
|
|
#[cfg(not(feature = "winit"))]
|
|
self.add_plugin(bevy_app::schedule_runner::ScheduleRunnerPlugin::default());
|
|
|
|
#[cfg(feature = "wgpu")]
|
|
self.add_plugin(bevy_wgpu::WgpuRendererPlugin::default());
|
|
|
|
self
|
|
}
|
|
}
|