heaps-local-res

Use macros to split up your Heaps resource folder
https://github.com/c-g-dev/heaps-local-res

To install, run:

haxelib install heaps-local-res 1.0.0 

See using Haxelib in Haxelib documentation for more information.

README.md

Heaps Local Resources

Split up your Heaps.io resources so they don't all have to be dumped into the same /res folder at the root of the project.

  • Have multiple /res folders.
  • Have /res folders scoped to individual packages so that resouces can colocate with their relevant code.

Example structure:

/res
/src
    /subfolder
        /res
        EncapsulatedComponent.hx
    GlobalComponent.hx

class EncapsulatedComponent extends Bitmap {
    public function new() {
        super();
        var localRes = LocalRes.here(); //macro function loads resources in this modules directory
        this.tile = localRes.res("sometile.png").toTile(); //call .res(<filename>) to get the resource from the /res folder in this class file's direcoty
    }
}
Contributors
cgdev
Version
1.0.0
Published
1 year ago
Dependencies
License
MIT

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

⌂