asepriteatlas

This haxelib allows you to parse the Asprite JSON exports as atlas frames!
https://github.com/DillyzThe1/AsepriteAtlas

To install, run:

haxelib install asepriteatlas 1.0.1 

See using Haxelib in Haxelib documentation for more information.

README.md

AsepriteAtlas

A haxelib meant for parsing the Asprite JSON format & making a frame atlas.
Install by typing haxelib install asepriteatlas in any shell such as command prompt.

Setup (Aseprite)

  1. Properly tag your animations.
    GitHub Logo
  2. Select all frames.
    GitHub Logo
  3. File > Export Sprite Sheet
  4. (optional) Edit the "Borders" tab for optimization
    GitHub Logo
  5. Go to output and enable both JSON and PNG output.
  6. Export!

Usage (HaxeFlixel)

  1. Add to Project.xml
  2. Initiate an FlxSprite. (flixel.FlxSprite)
  3. Set the FlxSprite variable "frames" to "asepriteatlas.AsepriteAtlasFrames.fromI8('assets/images/spr.png', 'assets/images/spr.json')";
  4. For every animation you want, use "animation.addByPrefix('yourAnimName', 'Tag Name', 12, false, false, false);"
  5. Add it to the game & play animation using "animation.play('yourAnimName', true);"
  6. Compile

    Visual example:

Contributors
DillyzThe1
Version
1.0.1
Published
4 years ago
License
Apache

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub