diff --git a/crates/bevy_sprite/src/sprite.rs b/crates/bevy_sprite/src/sprite.rs index 3413160d76fd6..4a36eb11f49f9 100644 --- a/crates/bevy_sprite/src/sprite.rs +++ b/crates/bevy_sprite/src/sprite.rs @@ -14,13 +14,16 @@ use bevy_render::{ }; use serde::{Deserialize, Serialize}; +/// General Sprite Examples: [Link](https://github.com/bevyengine/bevy/tree/latest/examples/2d) #[derive(Debug, Default, Clone, TypeUuid, Reflect, RenderResources)] #[render_resources(from_self)] #[uuid = "7233c597-ccfa-411f-bd59-9af349432ada"] #[repr(C)] pub struct Sprite { pub size: Vec2, + /// When true flips sprite to left. [Example](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_flipping.rs) pub flip_x: bool, + /// When true flips sprite upside down. [Example](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_flipping.rs) pub flip_y: bool, pub resize_mode: SpriteResizeMode, } diff --git a/crates/bevy_sprite/src/texture_atlas.rs b/crates/bevy_sprite/src/texture_atlas.rs index 76df36000f6bb..6677b9562bea4 100644 --- a/crates/bevy_sprite/src/texture_atlas.rs +++ b/crates/bevy_sprite/src/texture_atlas.rs @@ -10,7 +10,9 @@ use bevy_render::{ }; use bevy_utils::HashMap; -/// An atlas containing multiple textures (like a spritesheet or a tilemap) +/// An atlas containing multiple textures (like a spritesheet or a tilemap). +/// [Example usage animating sprite.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs) +/// [Example usage loading sprite sheet.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) #[derive(Debug, RenderResources, TypeUuid)] #[uuid = "946dacc5-c2b2-4b30-b81d-af77d79d1db7"] pub struct TextureAtlas { diff --git a/crates/bevy_text/src/text2d.rs b/crates/bevy_text/src/text2d.rs index c5634cdfa81cf..e08258b686bdd 100644 --- a/crates/bevy_text/src/text2d.rs +++ b/crates/bevy_text/src/text2d.rs @@ -21,6 +21,7 @@ use glyph_brush_layout::{HorizontalAlign, VerticalAlign}; use crate::{DefaultTextPipeline, DrawableText, Font, FontAtlasSet, Text, Text2dSize, TextError}; /// The bundle of components needed to draw text in a 2D scene via a 2D `OrthographicCameraBundle`. +/// [Example usage.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/text2d.rs) #[derive(Bundle, Clone, Debug)] pub struct Text2dBundle { pub draw: Draw,