Events

@:dox(show)finishPack():Void

Constructor

new()

Variables

@:value(null)read onlyatlas:TextureAtlas = null

@:value(1)spacing:Int = 1

@:value(LINEAR)filter:TextureFilter = LINEAR

Methods

region(name:String):TextureAtlasPackerRegion

@:value({ removeAtlasRegions : true })removeRegionsWithMatcher(removeAtlasRegions:Bool = true, matcher:(regionName:String) ‑> Bool):Void

@:value({ removeAtlasRegions : true })removeRegionsWithPrefix(removeAtlasRegions:Bool = true, prefix:String):Void

@:value({ offsetY : 0, offsetX : 0, packedHeight : -1 })inlineadd(name:String, pixels:UInt8Array, originalWidth:Int, originalHeight:Int, packedWidth:Int, packedHeight:Int = -1, offsetX:Int = 0, offsetY:Int = 0):Void

@:value({ offsetY : 0, offsetX : 0 })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.

Inherited Events

Defined by Entity

@:dox(show)dispose(entity:Entity):Void

@:dox(show)destroy(entity:Entity):Void

Inherited Variables

Defined by Entity

read onlyhasData:Bool

@:value(null)id:String = null

read onlydestroyed:Bool

read onlydisposed:Bool

@:value(null)read onlyautoruns:Array<Autorun> = null

@editablecomponents:ReadOnlyMap<String, Component>

Public components mapping. Contain components created separately with component() or macro-based components as well.

scriptContent:ScriptContent

Available with script plugin

script:Script

Available with script plugin

Inherited Methods

Defined by Entity

dispose():Void

Schedules destroy, at the end of the current frame.

unbindEvents():Void

Remove all events handlers from this entity.

autorun(run:() ‑> Void, ?afterRun:() ‑> Void):Autorun

Creates a new Autorun instance with the given callback associated with the current entity.

Parameters:

run

The run callback

Returns:

The autorun instance

tween(?easing:Easing, duration:Float, fromValue:Float, toValue:Float, update:(Float, Float) ‑> Void):Tween

component<C>(?name:String, ?component:Null<C>):C