Tilemap data. Strongly inspired from Tiled TMX format. (https://doc.mapeditor.org/en/stable/reference/tmx-map-format/).
This is a Model
class, which make it suitable for (optional) serialization
and observable data.
Events
orientationChange(current:TilemapOrientation, previous:TilemapOrientation):Void
Event when orientation field changes.
renderOrderChange(current:TilemapRenderOrder, previous:TilemapRenderOrder):Void
Event when renderOrder field changes.
staggerAxisChange(current:TilemapStaggerAxis, previous:TilemapStaggerAxis):Void
Event when staggerAxis field changes.
staggerIndexChange(current:TilemapStaggerIndex, previous:TilemapStaggerIndex):Void
Event when staggerIndex field changes.
backgroundColorChange(current:AlphaColor, previous:AlphaColor):Void
Event when backgroundColor field changes.
tilesetsChange(current:Array<Tileset>, previous:Array<Tileset>):Void
Event when tilesets field changes.
layersChange(current:Array<TilemapLayerData>, previous:Array<TilemapLayerData>):Void
Event when layers field changes.
Constructor
Variables
orientation:TilemapOrientation = ORTHOGONAL
Map orientation, can be ORTHOGONAL
, ISOMETRIC
, STAGGERED
or HEXAGONAL
.
renderOrder:TilemapRenderOrder = RIGHT_DOWN
The order in which tiles on tile layers are rendered. In all cases, the map is drawn row-by-row.
hexSideLength:Int = -1
Only for hexagonal maps. Determines the width or height (depending on the staggered axis) of the tile's edge
staggerAxis:TilemapStaggerAxis = AXIS_X
For staggered and hexagonal maps, determines which axis (x or y) is staggered.
staggerIndex:TilemapStaggerIndex = ODD
For staggered and hexagonal maps, determines whether the
EVEN
or ODD
indexes along the staggered axis are shifted.
read onlymaxTileWidth:Int
The highest tile width this tilemap is having from its layers.
Computed from each tileWidth
field in each layer.
Returns:
Int
read onlymaxTileHeight:Int
The highest tile height this tilemap is having from its layers.
Computed from each tileHeight
field in each layer.
Returns:
Int