2024-03-23 02:22:52 +00:00
|
|
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
2024-03-27 03:30:08 +00:00
|
|
|
#![forbid(unsafe_code)]
|
2024-03-25 18:52:50 +00:00
|
|
|
#![doc(
|
|
|
|
html_logo_url = "https://bevyengine.org/assets/icon.png",
|
|
|
|
html_favicon_url = "https://bevyengine.org/assets/icon.png"
|
|
|
|
)]
|
2024-03-23 02:22:52 +00:00
|
|
|
|
2022-01-01 21:22:04 +00:00
|
|
|
//! This module is separated into its own crate to enable simple dynamic linking for Bevy, and should not be used directly
|
|
|
|
|
2020-11-10 03:26:08 +00:00
|
|
|
/// `use bevy::prelude::*;` to import common components, bundles, and plugins.
|
|
|
|
pub mod prelude;
|
|
|
|
|
|
|
|
mod default_plugins;
|
|
|
|
pub use default_plugins::*;
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Integrate with platform accessibility APIs.
|
2023-03-01 22:45:04 +00:00
|
|
|
pub mod a11y {
|
|
|
|
pub use bevy_a11y::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Build bevy apps, create plugins, and read events.
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod app {
|
|
|
|
pub use bevy_app::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Load and store assets and resources for Apps.
|
2022-07-25 15:48:14 +00:00
|
|
|
#[cfg(feature = "bevy_asset")]
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod asset {
|
|
|
|
pub use bevy_asset::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Contains core plugins.
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod core {
|
|
|
|
pub use bevy_core::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Shared color types and operations.
|
2024-02-27 17:04:56 +00:00
|
|
|
#[cfg(feature = "bevy_color")]
|
|
|
|
pub mod color {
|
|
|
|
pub use bevy_color::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Useful diagnostic plugins and types for bevy apps.
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod diagnostic {
|
|
|
|
pub use bevy_diagnostic::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Bevy's entity-component-system.
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod ecs {
|
|
|
|
pub use bevy_ecs::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Resources and events for inputs, e.g. mouse/keyboard, touch, gamepads, etc.
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod input {
|
|
|
|
pub use bevy_input::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Logging capabilities
|
2020-11-13 01:23:57 +00:00
|
|
|
pub mod log {
|
|
|
|
pub use bevy_log::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Math types (Vec3, Mat4, Quat, etc) and helpers.
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod math {
|
|
|
|
pub use bevy_math::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Utilities for working with untyped pointers in a more safe way.
|
2022-05-04 19:16:10 +00:00
|
|
|
pub mod ptr {
|
|
|
|
pub use bevy_ptr::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Type reflection used for dynamically interacting with rust types.
|
2020-11-28 00:39:59 +00:00
|
|
|
pub mod reflect {
|
2023-09-14 19:10:57 +00:00
|
|
|
pub use bevy_reflect::*;
|
2020-11-10 03:26:08 +00:00
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Save/load collections of entities and components to/from file.
|
2022-07-25 15:48:14 +00:00
|
|
|
#[cfg(feature = "bevy_scene")]
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod scene {
|
|
|
|
pub use bevy_scene::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Pools for async, IO, and compute tasks.
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod tasks {
|
|
|
|
pub use bevy_tasks::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Contains time utilities.
|
2022-05-26 00:27:18 +00:00
|
|
|
pub mod time {
|
|
|
|
pub use bevy_time::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Entity hierarchies and property inheritance
|
2022-03-15 01:54:05 +00:00
|
|
|
pub mod hierarchy {
|
|
|
|
pub use bevy_hierarchy::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Local and global transforms (e.g. translation, scale, rotation).
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod transform {
|
|
|
|
pub use bevy_transform::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Various miscellaneous utilities for easing development
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod utils {
|
|
|
|
pub use bevy_utils::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Configuration, creation, and management of one or more windows.
|
2020-11-10 03:26:08 +00:00
|
|
|
pub mod window {
|
|
|
|
pub use bevy_window::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Provides types and plugins for animations.
|
2022-04-02 22:36:02 +00:00
|
|
|
#[cfg(feature = "bevy_animation")]
|
|
|
|
pub mod animation {
|
|
|
|
pub use bevy_animation::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Provides types and plugins for audio playback.
|
2020-11-10 03:26:08 +00:00
|
|
|
#[cfg(feature = "bevy_audio")]
|
|
|
|
pub mod audio {
|
|
|
|
pub use bevy_audio::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Core render pipeline.
|
2021-07-28 21:29:32 +00:00
|
|
|
#[cfg(feature = "bevy_core_pipeline")]
|
|
|
|
pub mod core_pipeline {
|
|
|
|
pub use bevy_core_pipeline::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Bevy interface with `GilRs` - "Game Input Library for Rust" - to handle gamepad inputs.
|
2021-01-03 19:36:42 +00:00
|
|
|
#[cfg(feature = "bevy_gilrs")]
|
|
|
|
pub mod gilrs {
|
|
|
|
pub use bevy_gilrs::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Support for GLTF file loading.
|
2020-11-10 03:26:08 +00:00
|
|
|
#[cfg(feature = "bevy_gltf")]
|
|
|
|
pub mod gltf {
|
|
|
|
pub use bevy_gltf::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Physically based rendering.
|
2020-11-10 03:26:08 +00:00
|
|
|
#[cfg(feature = "bevy_pbr")]
|
|
|
|
pub mod pbr {
|
|
|
|
pub use bevy_pbr::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Cameras, meshes, textures, shaders, and pipelines.
|
|
|
|
/// Use [`RenderDevice::features`](renderer::RenderDevice::features),
|
|
|
|
/// [`RenderDevice::limits`](renderer::RenderDevice::limits), and the
|
|
|
|
/// [`RenderAdapterInfo`](renderer::RenderAdapterInfo) resource to
|
|
|
|
/// get runtime information about the actual adapter, backend, features, and limits.
|
2020-11-10 03:26:08 +00:00
|
|
|
#[cfg(feature = "bevy_render")]
|
|
|
|
pub mod render {
|
|
|
|
pub use bevy_render::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Items for sprites, rects, texture atlases, etc.
|
2020-11-10 03:26:08 +00:00
|
|
|
#[cfg(feature = "bevy_sprite")]
|
|
|
|
pub mod sprite {
|
|
|
|
pub use bevy_sprite::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Text drawing, styling, and font assets.
|
2020-11-10 03:26:08 +00:00
|
|
|
#[cfg(feature = "bevy_text")]
|
|
|
|
pub mod text {
|
|
|
|
pub use bevy_text::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// User interface components and widgets.
|
2020-11-10 03:26:08 +00:00
|
|
|
#[cfg(feature = "bevy_ui")]
|
|
|
|
pub mod ui {
|
|
|
|
pub use bevy_ui::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Window creation, configuration, and handling
|
2020-11-10 03:26:08 +00:00
|
|
|
#[cfg(feature = "bevy_winit")]
|
|
|
|
pub mod winit {
|
|
|
|
pub use bevy_winit::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Immediate mode drawing api for visual debugging.
|
|
|
|
///
|
|
|
|
/// # Example
|
|
|
|
/// ```
|
|
|
|
/// # use bevy_gizmos::prelude::*;
|
|
|
|
/// # use bevy_render::prelude::*;
|
|
|
|
/// # use bevy_math::prelude::*;
|
|
|
|
/// # use bevy_color::palettes::basic::GREEN;
|
|
|
|
/// fn system(mut gizmos: Gizmos) {
|
|
|
|
/// gizmos.line(Vec3::ZERO, Vec3::X, GREEN);
|
|
|
|
/// }
|
|
|
|
/// # bevy_ecs::system::assert_is_system(system);
|
|
|
|
/// ```
|
|
|
|
///
|
|
|
|
/// See the documentation on [`Gizmos`](gizmos::Gizmos) for more examples.
|
2023-03-20 20:57:54 +00:00
|
|
|
#[cfg(feature = "bevy_gizmos")]
|
|
|
|
pub mod gizmos {
|
|
|
|
pub use bevy_gizmos::*;
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Dynamic linking of plugins
|
2020-11-10 03:26:08 +00:00
|
|
|
#[cfg(feature = "bevy_dynamic_plugin")]
|
|
|
|
pub mod dynamic_plugin {
|
|
|
|
pub use bevy_dynamic_plugin::*;
|
|
|
|
}
|
2024-03-06 20:33:05 +00:00
|
|
|
|
2024-04-16 02:46:46 +00:00
|
|
|
/// Collection of developer tools
|
2024-03-06 20:33:05 +00:00
|
|
|
#[cfg(feature = "bevy_dev_tools")]
|
|
|
|
pub mod dev_tools {
|
|
|
|
pub use bevy_dev_tools::*;
|
|
|
|
}
|