#game #gamedev #bevy #anmiation


A sprite sheet animation plugin for Bevy

4 releases (2 breaking)

new 0.3.0 Jul 19, 2021
0.2.0 Jul 12, 2021
0.1.1 Jun 16, 2021
0.1.0 Jun 16, 2021

#268 in Game dev

21 downloads per month

Unlicense OR MIT

437 lines


License Crates.io Docs Bevy tracking dependency status Build

A sprite sheet animation plugin for bevy


  • A SpriteSheetAnimation component to automatically update the indices of the TextureAtlasSprite in the same entity
  • Animation modes: Repeat or Once
  • An animation is playing if, and only if, a Play component is present in the entity
    • Simply remove/insert the Play component to pause/resume an animation
  • The animation can be defined from an index-range, or an arbitrary list of indices
  • Each frame may have a different duration


fn main() {
          .add_plugin(AnimationPlugin) // <-- Add the plugin

fn spawn(
  mut commands: Commands,
  asset_server: Res<AssetServer>,
  mut textures: ResMut<Assets<TextureAtlas>>,
  mut animations: ResMut<Assets<SpriteSheetAnimation>>,
) {
  // Don't forget the camera ;-)

  // Create an animation
  // Here we use an index-range (from 0 to 4) where each frame has the same duration
  let animation_handle = animations.add(SpriteSheetAnimation::from_range(

          // Spawn a bevy sprite-sheet
          .spawn_bundle(SpriteSheetBundle {
            texture_atlas: textures.add(TextureAtlas::from_grid(asset_server.load("coin.png"), Vec2::new(16.0, 16.0), 5, 1)),
            transform: Transform::from_scale(Vec3::splat(10.0)),
          // Insert the asset handle of the animation
          // Start the animation immediately. Remove this component in order to pause the animation.

Here is the result:

Example result

(Asset by La Red Games - CC0)

For more details see the documentation


Add to Cargo.toml:

benimator = "0.3.0"

Cargo features

  • warnings (enabled by default). Log warnings in case of incorrect usage detected.

Bevy Version Compatibility

bevy benimator
0.5 >= 0.1

Contribute / Contact

Issues, pull requests are welcome.

It is possible to directly discuss with me (Jomag#2675) via the bevy discord


Licensed under either of

at your option.


~343K SLoC