TextureAtlasLayout

TextureAtlasLayout

  • size : glam::UVec2
  • textures : alloc::vec::Vec<bevy_math::rects::urect::URect>

Description

Stores a map used to lookup the position of a texture in a [TextureAtlas]. 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.

Optionally it can store a mapping from sub texture handles to the related area index (see TextureAtlasBuilder).

Example usage animating sprite. Example usage animating sprite in response to an event. Example usage loading sprite sheet.

Functions