Skip to content

Commit

Permalink
Improve bevy crate's docs (#748)
Browse files Browse the repository at this point in the history
Change `bevy` crates re-exports to modules
  • Loading branch information
memoryruins authored Oct 30, 2020
1 parent 1b051d3 commit f41f206
Showing 1 changed file with 102 additions and 26 deletions.
128 changes: 102 additions & 26 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,58 +30,134 @@
//! The defaults provide a "full" engine experience, but you can easily enable / disable features
//! in your project's `Cargo.toml` to meet your specific needs. See Bevy's `Cargo.toml` for a full list of features available.
//!
//! If you prefer it, you can also consume the individual bevy crates directly.
//! If you prefer, you can also consume the individual bevy crates directly.
//! Each module in the root of this crate, except for the prelude, can be found on crates.io
//! with `bevy_` appended to the front, e.g. `app` -> [`bevy_app`](https://docs.rs/bevy_app/0.2.1/bevy_app/).

#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]

mod default_plugins;
/// `use bevy::prelude::*;` to import common components, bundles, and plugins.
pub mod prelude;

pub use bevy_app as app;
pub use bevy_asset as asset;
pub use bevy_core as core;
pub use bevy_diagnostic as diagnostic;
pub use bevy_ecs as ecs;
pub use bevy_input as input;
pub use bevy_math as math;
pub use bevy_property as property;
pub use bevy_scene as scene;
pub use bevy_tasks as tasks;
pub use bevy_transform as transform;
pub use bevy_type_registry as type_registry;
pub use bevy_utils as utils;
pub use bevy_window as window;
mod default_plugins;
pub use default_plugins::*;

pub mod app {
//! Build bevy apps, create plugins, and read events.
pub use bevy_app::*;
}

pub mod asset {
//! Load and store assets and resources for Apps
pub use bevy_asset::*;
}

pub mod core {
//! Contains core plugins and utilities for time.
pub use bevy_core::*;
}

pub mod diagnostic {
//! Useful diagnostic plugins and types for bevy apps.
pub use bevy_diagnostic::*;
}

pub mod ecs {
//! Bevy's entity-component-system.
pub use bevy_ecs::*;
}

pub mod input {
//! Resources and events for inputs, e.g. mouse/keyboard, touch, gamepads, etc.
pub use bevy_input::*;
}

pub mod math {
pub use bevy_math::*;
}

pub mod property {
//! Dynamically interact with struct fields and names.
pub use bevy_property::*;
}

pub mod scene {
pub use bevy_scene::*;
}

pub mod tasks {
pub use bevy_tasks::*;
}

pub mod transform {
pub use bevy_transform::*;
}

pub mod type_registry {
pub use bevy_type_registry::*;
}

pub mod utils {
pub use bevy_utils::*;
}

pub mod window {
pub use bevy_window::*;
}

#[cfg(feature = "bevy_audio")]
pub use bevy_audio as audio;
pub mod audio {
//! Provides types and plugins for audio playback.
pub use bevy_audio::*;
}

#[cfg(feature = "bevy_gltf")]
pub use bevy_gltf as gltf;
pub mod gltf {
//! Support for GLTF file loading.
pub use bevy_gltf::*;
}

#[cfg(feature = "bevy_pbr")]
pub use bevy_pbr as pbr;
pub mod pbr {
//! Physically based rendering. **Note**: true PBR has not yet been implemented; the name `pbr` is aspirational.
pub use bevy_pbr::*;
}

#[cfg(feature = "bevy_render")]
pub use bevy_render as render;
pub mod render {
pub use bevy_render::*;
}

#[cfg(feature = "bevy_sprite")]
pub use bevy_sprite as sprite;
pub mod sprite {
//! Items for sprites, rects, texture atlases, etc.
pub use bevy_sprite::*;
}

#[cfg(feature = "bevy_text")]
pub use bevy_text as text;
pub mod text {
pub use bevy_text::*;
}

#[cfg(feature = "bevy_ui")]
pub use bevy_ui as ui;
pub mod ui {
pub use bevy_ui::*;
}

#[cfg(feature = "bevy_winit")]
pub use bevy_winit as winit;
pub mod winit {
pub use bevy_winit::*;
}

#[cfg(feature = "bevy_wgpu")]
pub use bevy_wgpu as wgpu;
pub mod wgpu {
pub use bevy_wgpu::*;
}

#[cfg(feature = "bevy_dynamic_plugin")]
pub use bevy_dynamic_plugin as dynamic_plugin;
pub mod dynamic_plugin {
pub use bevy_dynamic_plugin::*;
}

0 comments on commit f41f206

Please sign in to comment.