A class for representing data about a map. Maps are parsed from CSV, Tiled, etc. into this format. A Tilemap object get a copy of this data and then unpacks the needed properties into itself.
new MapData([config])
name | type | arguments | description |
---|---|---|---|
config | Phaser.Types.Tilemaps.MapDataConfig | <optional> |
The Map configuration object. |
An object of collision data. Must be created as physics object or will return undefined.
The format of the map data.
The height of the entire tilemap.
The height in pixels of the entire tilemap.
The length of the horizontal sides of the hexagon. Only used for hexagonal orientation Tilemaps.
The collection of images the map uses(specified in Tiled)
An array of Tiled Image Layers.
If the map is infinite or not.
An array with all the layers configured to the MapData.
The key in the Phaser cache that corresponds to the loaded tilemap data.
An object of Tiled Object Layers.
The orientation of the map data (i.e. orthogonal, isometric, hexagonal), default 'orthogonal'.
Map specific properties (can be specified in Tiled)
Determines the draw order of tilemap. Default is right-down
0, or 'right-down' 1, or 'left-down' 2, or 'right-up' 3, or 'left-up'
The height of the tiles.
The width of the tiles.
An array of tile instances.
An array of Tilesets.
The version of the map data (as specified in Tiled).
The width of the entire tilemap.
The width in pixels of the entire tilemap.