Skip to content

Commit 1b0969d

Browse files
Apply suggestions from code review
Co-authored-by: Alice Cecile <[email protected]>
1 parent bfcd2fa commit 1b0969d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/bevy_sprite/src/texture_atlas.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use bevy_reflect::{FromReflect, Reflect, TypeUuid};
55
use bevy_render::texture::Image;
66
use bevy_utils::HashMap;
77

8-
/// Maps a layout for a texture. Used with the [`TextureAtlas`] component it allows to
9-
/// either draw a specific area of the target texture, or to animate a sprite sheet.
8+
/// Stores a map used to lookup the position of a texture in a [`TextureAtlas`].
9+
/// This can be used to either use and look up a specific section of a texture, or animate frame-by-frame as a sprite sheet.
1010
///
1111
/// Optionaly it can store a mapping from sub texture handles to the related area index (see
1212
/// [`TextureAtlasBuilder`]).
@@ -23,7 +23,9 @@ pub struct TextureAtlasLayout {
2323
pub size: Vec2,
2424
/// The specific areas of the atlas where each texture can be found
2525
pub textures: Vec<Rect>,
26-
/// Texture handle to area index mapping. Set by [`TextureAtlasBuilder`].
26+
/// Maps from a specific image handle to the index in `textures` where they can be found.
27+
///
28+
/// This field is set by [`TextureAtlasBuilder`].
2729
///
2830
/// [`TextureAtlasBuilder`]: crate::TextureAtlasBuilder
2931
pub texture_handles: Option<HashMap<Handle<Image>, usize>>,

0 commit comments

Comments
 (0)