The Scene to which this Tilemap belongs.
Optionalkey: stringThe key in the Phaser cache that corresponds to the loaded tilemap data.
OptionaltileWidth: numberThe width of a tile in pixels. Default 32.
OptionaltileHeight: numberThe height of a tile in pixels. Default 32.
Optionalwidth: numberThe width of the map in tiles. Default 10.
Optionalheight: numberThe height of the map in tiles. Default 10.
Optionaldata: number[][]Instead of loading from the cache, you can also load directly from a 2D array of tile indexes.
OptionalinsertNull: booleanControls how empty tiles, tiles with an index of -1, in the
map data are handled. If true, empty locations will get a value of null. If false, empty
location will get a Tile object with an index of -1. If you've a large sparsely populated map and
the tile data doesn't need to change then setting this value to true will help with memory
consumption. However if your map is small or you need to update the tiles dynamically, then leave
the default value set. Default false.
Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map data. For an empty map, you should specify tileWidth, tileHeight, width & height.