TextureAtlas
TextureAtlas
- layout : bevy_asset::handle::Handle<bevy_sprite::texture_atlas::TextureAtlasLayout>
- index : usize
Description
An index into a [
TextureAtlasLayout
], which corresponds to a specific section of a texture.It stores a handle to [
TextureAtlasLayout
] and the index of the current section of the atlas. The texture atlas contains various sections of a given texture, allowing users to have a single image file for either sprite animation or global mapping. You can change the textureindex
of the atlas to animate the sprite or display only a section of the texture for efficient rendering of related game objects.Check the following examples for usage: