Bevy Compiletime Aseprite Integration

This crate allows you to integrate your aseprite files into your game project at compile time. This means that changes will break the build should you reference something nonexistent.

Here's what's included:

Of note: Should you encounter any bugs or hard to use or confusing interfaces, please post an issue or bug report so that we may all profit from it!

How to use it

  1. Include this repository in your game cargo add https://github.com/TheNeikos/bevy-spicy-aseprite
  2. Import your aseprite file: rust,ignore aseprite!(pub Player, "assets/sprites/player.aseprite");
  3. This transform the macro invocation into something similar to this: rust,ignore mod Player { mod tags { pub const Walk = ...; pub const Run = ...; } }
  4. Use it in your games: rust,ignore commands.spawn_bundle(AsepriteBundle { aseprite: Player::sprite(), animation: AsepriteAnimation::from(Player::tags::Walk), transform: Transform { scale: Vec3::splat(4.), translation: Vec3::new(0., 0., 0.), ..Default::default() }, ..Default::default() });

Examples

Check out the example to see how it could be used:

bash cargo run --example show-aseprite

Press space to pause and unpause