package haxepunk.graphics.atlas
class TextureAtlas
extends Atlas
extended by BitmapFontAtlas
Static functions
static loadGdxTexturePacker (file : String) : TextureAtlas
Loads a libgdx TexturePacker file and generates all tile regions.
Parameters:
file | The TexturePacker file to load |
Returns:
A TextureAtlas with all packed images defined as regions
static loadTexturePacker (file : String) : TextureAtlas
Loads a TexturePacker xml file and generates all tile regions. Uses the Generic XML exporter format from Texture Packer.
Parameters:
file | The TexturePacker file to load |
Returns:
A TextureAtlas with all packed images defined as regions
Functions
defineRegion (name : String, rect : Rectangle, center : Vector2, page : String) : AtlasRegion
Creates a new AtlasRegion and assigns it to a name
Parameters:
name | The region name to create | |
rect | Defines the rectangle of the tile on the tilesheet | |
center | Positions the local center point to pivot on | |
page | (optional) Page name, if this atlas supports multiple pages |
Returns:
The new AtlasRegion object.
getRegion (name : String) : AtlasRegion
Gets an atlas region based on an identifier
Parameters:
name | The name identifier of the region to retrieve. |
Returns:
The retrieved region.