Constructor

new()

Methods

clearCache():Void

Clear cached data (if any). Only tileset data is cached because it can be shared between maps. Normally not needed to clear manually unless working with a lot of different tilesets.

parseTmx(rawTmxData:String, ?cwd:String, ?resolveTsxRawData:(name:String, cwd:String) ‑> String):TmxMap

Parse TMX Tilemap (Tiled Map Editor format)

Parameters:

rawTmxData

Raw TMX data as string

cwd

Current working directory. Needed to identify cached tileset relative to their tilemap

resolveTsxRawData

A method to resolve TSX Tileset data that are not embedded in TMX data (optional)

Returns:

The TMX map data

tmxMapToTilemapData(tmxMap:TmxMap, ?loadTexture:(source:String, configureAsset:(asset:ImageAsset) ‑> Void, done:(texture:Texture) ‑> Void) ‑> Void):TilemapData