Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Doc/module style doc blocks for examples #4438

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ab2b895
Add a module doc block to the `2d/contributors` example.
themasch Mar 19, 2022
9f6925d
Add a module doc block to the `2d/many_sprites` benchmark example.
themasch Mar 19, 2022
c55dbf9
Add a very brief module doc block to the `2d/mesh2d` example.
themasch Mar 19, 2022
c228971
Move the doc block for `2d/mesh2d_manual` from the main function, to …
themasch Mar 19, 2022
f2225ec
Add a module doc block to the `2d/move_sprite` example.
themasch Mar 19, 2022
1fcbfb9
Add a module doc block to the `2d/rect` example.
themasch Mar 19, 2022
eef3fdb
Add a simple module doc block to the `2d/sprite` example.
themasch Apr 7, 2022
b8c6817
Add a simple module doc block to the `2d/sprite_flipping` example.
themasch Apr 7, 2022
1c5c560
moved the comment from main to the file head
themasch Apr 7, 2022
c2e78cf
Add a module doc block to the `2d/text2d` example.
themasch Apr 7, 2022
9c0c7b1
Cut the long comments, reworded others.
themasch Apr 8, 2022
301d75b
Add missing module doc blocks to examples.
themasch Apr 17, 2022
445327c
Some small changes to the examples README.md
themasch Apr 17, 2022
1b3e16b
Last missing blocks after rebase.
themasch Apr 17, 2022
7b18e71
ran cargo fmt --all to fix whatever the IDE auto format broke.
themasch Apr 17, 2022
c1b1da0
re-enable the markdownlint-ignore
themasch Apr 17, 2022
583acd4
fixed some clippy md complaints in the new doc blocks
themasch Apr 17, 2022
f9fd8b9
remove unnecessary argument separator in `cargo run` calls
themasch Apr 18, 2022
8313bac
some rewording, the old one was missing words and therefore meaning.
themasch Apr 18, 2022
64d11cb
add some detail.
themasch Apr 18, 2022
dad654a
Add/fix some punctuation.
themasch May 1, 2022
b260137
applied @Nilirad's suggestions for example docs
themasch May 15, 2022
cbc2470
added basic docs for the new example that had none.
themasch May 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/2d/mesh2d.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Shows how to render a polygonal [`Mesh`], generated from a [`Quad`] primitive, in a 2D scene.
use bevy::{prelude::*, sprite::MaterialMesh2dBundle};

fn main() {
Expand Down
8 changes: 5 additions & 3 deletions examples/2d/mesh2d_manual.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//! This example shows how to manually render 2d items using "mid level render apis" with a custom
//! pipeline for 2d meshes.
//! It doesn't use the [`Material2d`] abstraction, but changes the vertex buffer to include vertex color.
//! Check out the "mesh2d" example for simpler / higher level 2d meshes.
use bevy::{
core_pipeline::Transparent2d,
prelude::*,
Expand All @@ -23,9 +28,6 @@ use bevy::{
utils::FloatOrd,
};

/// This example shows how to manually render 2d items using "mid level render apis" with a custom pipeline for 2d meshes
/// It doesn't use the [`Material2d`] abstraction, but changes the vertex buffer to include vertex color
/// Check out the "mesh2d" example for simpler / higher level 2d meshes
fn main() {
App::new()
.add_plugins(DefaultPlugins)
Expand Down
4 changes: 4 additions & 0 deletions examples/2d/move_sprite.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Renders a 2D scene containing a single, moving sprite.
use bevy::prelude::*;

fn main() {
Expand Down Expand Up @@ -25,6 +27,8 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
.insert(Direction::Up);
}

/// The sprite is animated by changing its translation depending on the time that has passed since
/// the last frame.
fn sprite_movement(time: Res<Time>, mut sprite_position: Query<(&mut Direction, &mut Transform)>) {
for (mut logo, mut transform) in sprite_position.iter_mut() {
match *logo {
Expand Down
2 changes: 2 additions & 0 deletions examples/2d/rotation.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Demonstrates rotating entities in 2D using quaternions.
use bevy::{
core::FixedTimestep,
math::{const_vec2, Vec3Swizzles},
Expand Down
2 changes: 2 additions & 0 deletions examples/2d/shapes.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Shows how to render simple primitive shapes with a single color.
use bevy::{prelude::*, sprite::MaterialMesh2dBundle};

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions examples/2d/sprite.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Displays a single [`Sprite`], created from an image.
use bevy::prelude::*;

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions examples/2d/sprite_flipping.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Displays a single [`Sprite`], created from an image, but flipped on one axis.
use bevy::prelude::*;

fn main() {
Expand Down
3 changes: 3 additions & 0 deletions examples/2d/sprite_sheet.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Renders an animated sprite by loading all animation frames from a single image (a sprite sheet)
//! into a texture atlas, and changing the displayed image periodically.
use bevy::prelude::*;

fn main() {
Expand Down
7 changes: 7 additions & 0 deletions examples/2d/text2d.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//! Shows text rendering with moving, rotating and scaling text.
//!
//! Note that this uses [`Text2dBundle`] to display text alongside your other entities in a 2D scene.
//!
//! For an example on how to render text as part of a user interface, independent from the world
//! viewport, you may want to look at `2d/contributors.rs` or `ui/text.rs`.
use bevy::{prelude::*, text::Text2dBounds};

fn main() {
Expand Down
5 changes: 3 additions & 2 deletions examples/2d/texture_atlas.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//! In this example we generate a new texture atlas (sprite sheet) from a folder containing
//! individual sprites.
use bevy::{asset::LoadState, prelude::*};

/// In this example we generate a new texture atlas (sprite sheet) from a folder containing
/// individual sprites
fn main() {
App::new()
.init_resource::<RpgSpriteHandles>()
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/3d_scene.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! A simple 3D scene with light shining over a cube sitting on a plane.
use bevy::prelude::*;

fn main() {
Expand Down
3 changes: 3 additions & 0 deletions examples/3d/lighting.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Illustrates different lights of various types and colors, some static, some moving over
//! a simple scene.

use bevy::prelude::*;

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/load_gltf.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Loads and renders a glTF file as a scene.
use bevy::prelude::*;

fn main() {
Expand Down
15 changes: 8 additions & 7 deletions examples/3d/msaa.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
//! This example shows how to configure Multi-Sample Anti-Aliasing. Setting the sample count higher
//! will result in smoother edges, but it will also increase the cost to render those edges. The
//! range should generally be somewhere between 1 (no multi sampling, but cheap) to 8 (crisp but
//! expensive).
//! Note that WGPU currently only supports 1 or 4 samples.
//! Ultimately we plan on supporting whatever is natively supported on a given device.
//! Check out [this issue](https://github.com/gfx-rs/wgpu/issues/1832) for more info.
use bevy::prelude::*;

/// This example shows how to configure Multi-Sample Anti-Aliasing. Setting the sample count higher
/// will result in smoother edges, but it will also increase the cost to render those edges. The
/// range should generally be somewhere between 1 (no multi sampling, but cheap) to 8 (crisp but
/// expensive).
/// Note that WGPU currently only supports 1 or 4 samples.
/// Ultimately we plan on supporting whatever is natively supported on a given device.
/// Check out [this issue](https://github.com/gfx-rs/wgpu/issues/1832) for more info.
fn main() {
App::new()
.insert_resource(Msaa { samples: 4 })
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/orthographic.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Shows how to create a 3D orthographic view (for isometric-look games or CAD applications).
use bevy::prelude::*;

fn main() {
Expand Down
5 changes: 3 additions & 2 deletions examples/3d/parenting.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//! Illustrates how to create parent-child relationships between entities and how parent transforms
//! are propagated to their descendants.
use bevy::prelude::*;

/// This example illustrates how to create parent->child relationships between entities how parent
/// transforms are propagated to their descendants
fn main() {
App::new()
.insert_resource(Msaa { samples: 4 })
Expand Down
3 changes: 2 additions & 1 deletion examples/3d/pbr.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! This example shows how to configure Physically Based Rendering (PBR) parameters.
use bevy::prelude::*;

/// This example shows how to configure Physically Based Rendering (PBR) parameters.
fn main() {
App::new()
.add_plugins(DefaultPlugins)
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/render_to_texture.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Shows how to render to a texture. Useful for mirrors, UI, or exporting images.
use bevy::{
core_pipeline::{
draw_3d_graph, node, AlphaMask3d, Opaque3d, RenderTargetClearColors, Transparent3d,
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/shadow_biases.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Demonstrates how shadow biases affect shadows in a 3d scene.
use bevy::{input::mouse::MouseMotion, prelude::*};

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/shadow_caster_receiver.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Demonstrates how to prevent meshes from casting/receiving shadows in a 3d scene.
use bevy::{
pbr::{NotShadowCaster, NotShadowReceiver},
prelude::*,
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/spherical_area_lights.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Demonstrates how lighting is affected by different radius of point lights.
use bevy::prelude::*;

fn main() {
Expand Down
3 changes: 2 additions & 1 deletion examples/3d/texture.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! This example shows various ways to configure texture materials in 3D.
use bevy::prelude::*;

/// This example shows various ways to configure texture materials in 3D
fn main() {
App::new()
.add_plugins(DefaultPlugins)
Expand Down
4 changes: 4 additions & 0 deletions examples/3d/two_passes.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Shows how to render multiple passes to the same window, useful for rendering different views
//! or drawing an object on top regardless of depth.
use bevy::{
core_pipeline::{draw_3d_graph, node, AlphaMask3d, Opaque3d, Transparent3d},
prelude::*,
Expand Down Expand Up @@ -68,6 +71,7 @@ fn extract_first_pass_camera_phases(
));
}
}

// A node for the first pass camera that runs draw_3d_graph with this camera.
struct FirstPassCameraDriver {
query: QueryState<Entity, With<FirstPassCamera>>,
Expand Down
3 changes: 3 additions & 0 deletions examples/3d/update_gltf_scene.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Update a scene from a glTF file, either by spawning the scene as a child of another entity,
//! or by accessing the entities of the scene.
use bevy::{prelude::*, scene::InstanceId};

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/vertex_colors.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Illustrates the use of vertex colors.
use bevy::{prelude::*, render::mesh::VertexAttributeValues};

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/wireframe.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Showcases wireframe rendering.
use bevy::{
pbr::wireframe::{Wireframe, WireframeConfig, WireframePlugin},
prelude::*,
Expand Down
14 changes: 7 additions & 7 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,14 @@ Example | File | Description

Example | File | Description
--- | --- | ---
`custom_vertex_attribute` | [`shader/custom_vertex_attribute.rs`](./shader/custom_vertex_attribute.rs) | Illustrates creating a custom shader material that reads a mesh's custom vertex attribute.
`shader_material` | [`shader/shader_material.rs`](./shader/shader_material.rs) | Illustrates creating a custom material and a shader that uses it
`shader_material_screenspace_texture` | [`shader/shader_material_screenspace_texture.rs`](./shader/shader_material_screenspace_texture.rs) | A custom shader sampling a texture with view-independent UV coordinates
`shader_material_glsl` | [`shader/shader_material_glsl.rs`](./shader/shader_material_glsl.rs) | A custom shader using the GLSL shading language.
`shader_instancing` | [`shader/shader_instancing.rs`](./shader/shader_instancing.rs) | A custom shader showing off rendering a mesh multiple times in one draw call.
`animate_shader` | [`shader/animate_shader.rs`](./shader/animate_shader.rs) | Shows how to pass changing data like the time since startup into a shader.
`compute_shader_game_of_life` | [`shader/compute_shader_game_of_life.rs`](./shader/compute_shader_game_of_life.rs) | A compute shader simulating Conway's Game of Life
`custom_vertex_attribute` | [`shader/custom_vertex_attribute.rs`](./shader/custom_vertex_attribute.rs) | Illustrates creating a custom shader material that reads a mesh's custom vertex attribute.
`shader_defs` | [`shader/shader_defs.rs`](./shader/shader_defs.rs) | Demonstrates creating a custom material that uses "shaders defs" (a tool to selectively toggle parts of a shader)
`shader_instancing` | [`shader/shader_instancing.rs`](./shader/shader_instancing.rs) | A custom shader showing off rendering a mesh multiple times in one draw call.
`shader_material` | [`shader/shader_material.rs`](./shader/shader_material.rs) | Illustrates creating a custom material and a shader that uses it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`shader_material` | [`shader/shader_material.rs`](./shader/shader_material.rs) | Illustrates creating a custom material and a shader that uses it
`shader_material` | [`shader/shader_material.rs`](./shader/shader_material.rs) | Illustrates creating a custom material and a shader that uses it.

`shader_material_glsl` | [`shader/shader_material_glsl.rs`](./shader/shader_material_glsl.rs) | A custom shader using the GLSL shading language.
`shader_material_screenspace_texture` | [`shader/shader_material_screenspace_texture.rs`](./shader/shader_material_screenspace_texture.rs) | A custom shader sampling a texture with view-independent UV coordinates.

## Stress Tests

Expand Down Expand Up @@ -279,14 +279,14 @@ Example | File | Description

Example | File | Description
--- | --- | ---
`scene_viewer` | [`tools/scene_viewer.rs`](./tools/scene_viewer.rs) | A simple way to view glTF models with Bevy. Just run `cargo run --release --example scene_viewer -- /path/to/model.gltf#Scene0`, replacing the path as appropriate. With no arguments it will load the FieldHelmet glTF model from the repository assets subdirectory.
`scene_viewer` | [`tools/scene_viewer.rs`](./tools/scene_viewer.rs) | A simple way to view glTF models with Bevy. Just run `cargo run --release --example scene_viewer /path/to/model.gltf#Scene0`, replacing the path as appropriate. With no arguments it will load the FieldHelmet glTF model from the repository assets subdirectory.

## Transforms

Example | File | Description
--- | --- | ---
`global_vs_local_translation` | [`transforms/global_vs_local_translation.rs`](./transforms/global_vs_local_translation.rs) | Illustrates the difference between direction of a translation in respect to local object or global object Transform
`3d_rotation` | [`transforms/3d_rotation.rs`](./transforms/3d_rotation.rs) | Illustrates how to (constantly) rotate an object around an axis
`global_vs_local_translation` | [`transforms/global_vs_local_translation.rs`](./transforms/global_vs_local_translation.rs) | Illustrates the difference between direction of a translation in respect to local object or global object Transform.
`scale` | [`transforms/scale.rs`](./transforms/scale.rs) | Illustrates how to scale an object in each direction
`transform` | [`transforms/transfrom.rs`](./transforms/transform.rs) | Shows multiple transformations of objects
`translation` | [`transforms/translation.rs`](./transforms/translation.rs) | Illustrates how to move an object along an axis
Expand Down
2 changes: 2 additions & 0 deletions examples/animation/animated_fox.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Plays animations from a skinned glTF.
use bevy::prelude::*;

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions examples/animation/animated_transform.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Create and play an animation defined by code that operates on the `Transform` component.
use std::f32::consts::{FRAC_PI_2, PI};

use bevy::prelude::*;
Expand Down
5 changes: 3 additions & 2 deletions examples/animation/custom_skinned_mesh.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Skinned mesh example with mesh and joints data defined in code.
//! Example taken from <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_019_SimpleSkin.md>
use std::f32::consts::PI;

use bevy::{
Expand All @@ -10,8 +13,6 @@ use bevy::{
};
use rand::Rng;

/// Skinned mesh example with mesh and joints data defined in code.
/// Example taken from <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_019_SimpleSkin.md>
fn main() {
App::new()
.add_plugins(DefaultPlugins)
Expand Down
7 changes: 4 additions & 3 deletions examples/animation/gltf_skinned_mesh.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//! Skinned mesh example with mesh and joints data loaded from a glTF file.
//! Example taken from <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_019_SimpleSkin.md>
use std::f32::consts::PI;

use bevy::{pbr::AmbientLight, prelude::*, render::mesh::skinning::SkinnedMesh};

/// Skinned mesh example with mesh and joints data loaded from a glTF file.
/// Example taken from <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_019_SimpleSkin.md>
fn main() {
App::new()
.add_plugins(DefaultPlugins)
Expand All @@ -27,7 +28,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn_scene(asset_server.load::<Scene, _>("models/SimpleSkin/SimpleSkin.gltf#Scene0"));
}

/// The scene hierachy currently looks somewhat like this:
/// The scene hierarchy currently looks somewhat like this:
///
/// ```ignore
/// <Parent entity>
Expand Down
5 changes: 3 additions & 2 deletions examples/app/custom_loop.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
//! This example demonstrates you can create a custom runner (to update an app manually). It reads
//! lines from stdin and prints them from within the ecs.
use bevy::prelude::*;
use std::{io, io::BufRead};

struct Input(String);

/// This example demonstrates you can create a custom runner (to update an app manually). It reads
/// lines from stdin and prints them from within the ecs.
fn my_runner(mut app: App) {
println!("Type stuff into the console");
for line in io::stdin().lock().lines() {
Expand Down
2 changes: 2 additions & 0 deletions examples/app/drag_and_drop.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! An example that shows how to handle drag and drop of files in an app.
use bevy::prelude::*;

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions examples/app/empty.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! An empty application (does nothing)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love that this example exists, but that's not this PR's fault.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want me to delete it?
Not sure if thats something that should be done in this context?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to say that this should be done in a separate PR, yeah.

use bevy::prelude::*;

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions examples/app/empty_defaults.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! An empty application with default plugins.
use bevy::prelude::*;

fn main() {
Expand Down
16 changes: 8 additions & 8 deletions examples/app/headless.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use bevy::{app::ScheduleRunnerSettings, prelude::*, utils::Duration};
//! This example only enables a minimal set of plugins required for bevy to run.
//! You can also completely remove rendering / windowing Plugin code from bevy
//! by making your import look like this in your Cargo.toml.
//!
//! [dependencies]
//! bevy = { version = "*", default-features = false }
//! # replace "*" with the most recent version of bevy

// This example only enables a minimal set of plugins required for bevy to run.
// You can also completely remove rendering / windowing Plugin code from bevy
// by making your import look like this in your Cargo.toml
//
// [dependencies]
// bevy = { version = "*", default-features = false }
// # replace "*" with the most recent version of bevy
use bevy::{app::ScheduleRunnerSettings, prelude::*, utils::Duration};

fn main() {
// this app runs once
Expand Down
3 changes: 3 additions & 0 deletions examples/app/headless_defaults.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! An application that runs with default plugins, but without an actual renderer.
//! This can be very useful for integration tests or CI.
use bevy::{prelude::*, render::settings::WgpuSettings};

fn main() {
Expand Down
3 changes: 2 additions & 1 deletion examples/app/logs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! This example illustrates how to use logs in bevy.
use bevy::prelude::*;

/// This example illustrates how to use logs in bevy
fn main() {
App::new()
// Uncomment this to override the default log settings:
Expand Down
9 changes: 6 additions & 3 deletions examples/app/plugin.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
//! Demonstrates the creation and registration of a custom plugin.
//!
//! Plugins are the foundation of Bevy. They are scoped sets of components, resources, and systems
//! that provide a specific piece of functionality (generally the smaller the scope, the better).
//! This example illustrates how to create a simple plugin that prints out a message.
use bevy::{prelude::*, utils::Duration};

/// Plugins are the foundation of Bevy. They are scoped sets of components, resources, and systems
/// that provide a specific piece of functionality (generally the smaller the scope, the better).
/// This example illustrates how to create a simple plugin that prints out a message.
fn main() {
App::new()
.add_plugins(DefaultPlugins)
Expand Down
Loading