diff --git a/examples/2d/mesh2d.rs b/examples/2d/mesh2d.rs index 8b968a3966..6412c97f88 100644 --- a/examples/2d/mesh2d.rs +++ b/examples/2d/mesh2d.rs @@ -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() { diff --git a/examples/2d/mesh2d_manual.rs b/examples/2d/mesh2d_manual.rs index e585018aa5..0fea936b4f 100644 --- a/examples/2d/mesh2d_manual.rs +++ b/examples/2d/mesh2d_manual.rs @@ -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::*, @@ -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) diff --git a/examples/2d/move_sprite.rs b/examples/2d/move_sprite.rs index a895212b3a..856adcd31b 100644 --- a/examples/2d/move_sprite.rs +++ b/examples/2d/move_sprite.rs @@ -1,3 +1,5 @@ +//! Renders a 2D scene containing a single, moving sprite. + use bevy::prelude::*; fn main() { @@ -25,6 +27,8 @@ fn setup(mut commands: Commands, asset_server: Res) { .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