Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ggez/aseprite
A parser for the aseprite sprite editor files
https://github.com/ggez/aseprite
Last synced: about 1 month ago
JSON representation
A parser for the aseprite sprite editor files
- Host: GitHub
- URL: https://github.com/ggez/aseprite
- Owner: ggez
- License: mit
- Created: 2017-04-25T20:22:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-06T15:06:06.000Z (8 months ago)
- Last Synced: 2024-10-31T12:09:26.445Z (about 1 month ago)
- Language: Rust
- Size: 30.3 KB
- Stars: 31
- Watchers: 5
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- AwesomeCppGameDev - aseprite
README
# aseprite
A Rust crate for loading data from the [aseprite](https://www.aseprite.org/) sprite editor
[![Cargo](https://img.shields.io/crates/v/aseprite.svg)](https://crates.io/crates/aseprite) [![Downloads](https://img.shields.io/crates/d/aseprite.svg)](#downloads)Should go along well with the [tiled](https://github.com/mattyhall/rs-tiled) crate, I hope! It does not load any actual images, just the metadata. Currently it only loads aseprite's JSON export format.
Automatically exporting a sprite to a given format is documented here:
# Docs
Documentation for the latest version is on [docs.rs](https://docs.rs/aseprite/).
# Example
Export sprite sheet with:
```sh
aseprite -b boonga.ase --sheet boonga.png --format json-array --list-tags --list-layers --data boonga.json
```Then write a program to load it:
```rust
use aseprite::SpritesheetData;
use std::fs::File;fn main() {
let file = File::open("boonga.json").unwrap();
let spritesheet: SpritesheetData = serde_json::from_reader(file).unwrap();
println!("Spritesheet is {:?}", spritesheet);
}
```