Parses a 2D array of tile indexes into a new MapData object with a single layer.
name | type | description |
---|---|---|
name | string |
The name of the tilemap, used to set the name on the MapData. |
data | Array.<Array.<number>> |
2D array, CSV string or Tiled JSON object. |
tileWidth | number |
The width of a tile in pixels. |
tileHeight | number |
The height of a tile in pixels. |
insertNull | boolean |
Controls how empty tiles, tiles with an index of -1, in the map
data are handled. If |
The MapData object.