Crate bevy_aseprite
source ·Expand description
Bevy Aseprite Parser and Loader
This is a fork of TheNeikos/bevy_spicy_aseprite.
Works with Bevy 0.9
Add bevy_aseprite = "0.9"
to your Cargo.toml.
How to use it without derives
ⓘ
commands.spawn(AsepriteBundle {
aseprite: asset_server.load("player.ase"),
animation: AsepriteAnimation::from("walk"),
transform: Transform {...},
..Default::default()
});
How to use it with derive (for compile time validation)
ⓘ
mod sprites {
use bevy_aseprite::aseprite;
aseprite!(pub Player, "player.ase");
}
...
commands.spawn(AsepriteBundle {
aseprite: asset_server.load(sprites::Player::PATH),
animation: AsepriteAnimation::from(sprites::Player::tags::LEFT_WALK),
transform: Transform {...},
..Default::default()
});
Examples
Check out the example to see how it could be used:
cargo run --example show_aseprite
Limitations
Currently no support for slices or toggling layers.
Modules
Macros
Structs
A bundle defining a drawn aseprite
A builder which is used to create a texture atlas from many individual
sprites.