Home

Awesome

assetpacker

A simple asset packer for luxe alpha versions (and other haxe projects).

build

flow run as a regular luxe project in tool/

requires

targets

Works for native (mac/windows/linux/android/ios) and web targets.

Used in a few games like Westport Independent and the THREES web port.

tool usage

using the packed files, i.e Pack.hx usage

using the packed file outside of luxe

The class that does the work for the asset packing and unpacking doesn't have any dependencies, it uses plain haxe features. An agnostic version is inside non-luxe/Packer.hx.

If you want to use this in any haxe project, you can customize the types in the AssetPack easily and the rest will still work automatically. The code is simple and small enough to customize to your own use case.

The asset packs generated by the tool should work for frameworks or code not using luxe, the asset unpacking simply undoes the packing / compression, you have to feed that to your framework as needed!

    var to_pack:AssetPack = {
        bytes: ..
        ...
    }
    var bytes = Packer.compress_pack(to_pack);
    var unpacked = Packer.uncompress_pack(bytes);

    for(item in unpacked.bytes) {
        ..
    }

important notes

load time meta data

Some assets want to set load time settings, there is an optional meta file for these types of settings.

This file is currently manually created and matches the format of the parcel json info. Only the shader specifics are currently implemented. It should be in the root of your parcel.

Other types for sounds and textures were partially implemented but not needed at the time. The UI for editing the metadata was also partially implemented but commented out.

other notes

http://iconmonstr.com/

contributing

Feel free to file issues or contributions.

Since this tool is a quick but useful tool written for the earlier alpha versions of luxe, I don't expect it to get significant reworking any time soon.

license

MIT (LICENSE.md)