Events
Constructor
Variables
Methods
inlineadd(name:String, pixels:UInt8Array, originalWidth:Int, originalHeight:Int, packedWidth:Int, packedHeight:Int = -1, offsetX:Int = 0, offsetY:Int = 0):Void
inlineadd(variantName:String, sourceName:String, originalWidth:Int, originalHeight:Int, offsetX:Int = 0, offsetY:Int = 0):Void
Add a region to this atlas packer from the given pixels. Example usage:
atlas.add(region1, pixels1);
atlas.add(region2, pixels2);
atlas.pack(() -> {
// Done packing new regions
});
pack(done:(atlas:TextureAtlas) ‑> Void):Void
Pack new regions added with add()
to the texture atlas.
If no texture atlas exists yet, it will be created.