| Crates.io | bevy_aseprite_reader |
| lib.rs | bevy_aseprite_reader |
| version | 0.1.1 |
| created_at | 2022-03-17 03:09:13.285607+00 |
| updated_at | 2023-02-26 16:05:43.336559+00 |
| description | Aseprite reader |
| homepage | |
| repository | |
| max_upload_size | |
| id | 551574 |
| size | 88,504 |
❕ Note: This,
aseprite-reader2, is a fork of https://github.com/TheNeikos/aseprite-reader.
aseprite-reader2 is a parsing crate for .aseprite files, made by the Aseprite Editor.
It's focus is on speed and completeness1.
It exports a main [Aseprite] type, through which the parsed contents can be accessed.
use aseprite_reader::Aseprite;
fn load_character() {
let aseprite = Aseprite::from_path("assets/sprites/character.aseprite")
.expect("Could not read aseprite file.");
let tags = aseprite.tags();
let walk_tag = &tags["walk"];
println!("This tag uses these frames: {:?}", walk_tag.frames); // `.frames` is a range
let all_frames = aseprite.frames();
let frames = all_frames.get_for(&walk_tag.frames);
let images = frames.get_images();
}
Currently embedded ICC profiles are not supported ↩