spritesheet-generator

Build Status

A spritesheet generator library using the piston's texture_packer, this lib provides the packed image and a json with all information following the codeandweb's Texture Packer basic format.

Code Sample

To export the spritesheet: ```rust extern crate spritesheetgenerator; use spritesheetgenerator::spritesheetgenerator::generate; use spritesheetgenerator::spritesheetgeneratorconfig::SpritesheetGeneratorConfig;

fn main() { let config = SpritesheetGeneratorConfig { maxwidth: 500, maxheight: 500, borderpadding: 4, inputfolder: "examples/assets/".tostring(), outputfolder: "examples/resources/".tostring(), outputfilename: "example".tostring(), }; generate(config); } ```

Example

To test the sample code, run the code below from the project directory. ```bash

Be sure you're running this code at the root of the project directory!

cargo run --example generate-test ```

Credits