AustinEast / heaps-aseprite

An Aseprite File Parser for Heaps
https://lib.haxe.org/p/heaps-aseprite/
MIT License
28 stars 8 forks source link

haxe.io.Bytes based Aseprite class #2

Closed deepnight closed 3 years ago

deepnight commented 3 years ago

Aseprite is now based on haxe.io.Bytes and no longer tied to Heaps resource system

Added separate resource class: aseprite.AsepriteRes

USAGE

var myAseprite = hxd.Res.myFile.toAseprite(); // previously: hxd.Res.myFile

The only downside is that you have to let the user take care of hot-reloading stuff (ie. file watching). But IMHO that's safer actually, as swapping the texture without notifying the user on file change will lead to issues on runtime anyway 🤔

It's still possible to "refresh" a Aseprite instance using the public myAseprite.fromBytes( bytes:haxe.io.Bytes ) method 👍