Skip to content

PongoEngine/haxe-aseprite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haxe-aseprite

Haxe parser for .ase and .aseprite files.

haxe-aseprite was created for the GitHub GameOff. I've tested it for my needs however I would love for this to be feature complete. If you have access to aseprite files that break the parser send them my way!

The goal of this parser is to be concice, framework agnostic, and easy to use.

Example Usage

function createTexture(bytes :Bytes, width :Int, height :Int, colorDepth :ColorDepth) {
    return Texture.fromBytes(bytes, width, height, colorDepth);
}

/**
 * The Parser.parse has two parameters. The first is expecting a 
 * bytes representation of an Aseprite file. The second expects a callback
 * function that will create a texture for your specific framework.
 */
var file = Parser.parse(assets.getFile("animation.aseprite").toBytes(), createTexture);

Chunk types tested -

  • OLD_PALETTE_CHUNK_A
  • OLD_PALETTE_CHUNK_B
  • LAYER_CHUNK
  • CEL_CHUNK
  • CEL_EXTRA_CHUNK
  • COLOR_PROFILE_CHUNK
  • MASK_CHUNK
  • PATH_CHUNK
  • FRAME_TAGS_CHUNK
  • PALETTE_CHUNK
  • USER_DATA_CHUNK
  • SLICE_CHUNK

Releases

No releases published

Packages

No packages published

Languages