Bevy Asepritesheet
Bevy Asepritesheet is an asset loader and parser for Bevy game engine. Bevy Asepritesheet processes json spritesheet files exported by Aseprite software. It also has components and systems for building and managing animated sprite entities in the game engine.
Bevy Asepritesheet is capable of parsing spritesheets that look like this into distinct animations based on the aseprite json data.

Features
- Asset loader - asset loader can be specified to use whatever file extensions you need
- Sprite animator - the library includes a sprite animator component and bundle to help you spawn entities which have animated sprites on them
- Plugin - the library includes a bevy plugin that you can add to the bevy app, this adds the asset loader, registers the animation event system, and sets up a system that automatically animates any sprite animator components in the game world
- Animation events - animations send out an animation event whenever an animation ends, with data about what entity and what animation it was, so you can listen to them and define your own behavior
- Animation end actions - animations can loop, pause, stop, or transition to another animation upon completion, all configurable through the library
Aseprite Feature Support
Bevy Asepritesheet supports most features that aseprite exports as json data alongside your spritesheets. Here is a list of Aseprite features that are exported and whether they are supported in Bevy Asepritesheet or not:
Key:
✅ - fully supported and implementated
❌ - not supported
Aseprite Features:
- Frame ✅ - Frame rects for each individual frame of the sprite sheet, these are parsed by this library and turned into individual frames on a TextureAtlas
- Frame Trimming ✅ - Aseprite can trim frame rects to be tightly fitted together to avoid unnecesssary spacing between frames, this library can account for each frame's trim and adjust anchors accordingly so animations don't jitter when this feature is used
- Frame Duration ✅ - In aseprite, each frame has a specific duration that it shows in the animation for, this library includes that data in the animation which will be reflected when the animation is played in-game
- FrameTags ✅ - Frame tags are basicaly groups of frames in asprite that can have a "tag", this library interprets these tags as animations, so if you have a FrameTag of 10 frames in aserite named "running", this library will generate a "running" animation from that tag
- FrameTag Range ✅ - the frames specified to be part of a frameTag are included in the animation in game
- FrameTag Direction ❌ - In Aseprite you can specify that a FrameTag either plays in reverse or forwards, I don't really see a point to this so I'm not going to implement it, you can always reverse the frames if you want to reverse the animation
Usage Example
First, you'll need to add the dependency to your `Cargo.toml`` file:
[]
= "0.2"
Then, you will need to add the plugin to your bevy app:
use *;
use SpritesheetAssetPlugin;
use SpriteAnimator;
use *;
And now you're able to load your json assets:
// assume this system has been added to the app startup schedule
Once the asset is loaded, you can create the entity from the bundle:
// assume this system has been added to the app and the asset is loaded
Run the example
To run the example:
cargo run --example character
To see the complete example, see examples/character.rs.
Asset Credit
The asset I used is a modified version of a free assset made by Legnops
https://legnops.itch.io/red-hood-character