Class: MapData

Phaser.Tilemaps. MapData

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])

Parameters:
Name Type Argument Description
config MapDataConfig <optional>

[description]

Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 33)

Members


collision :object

An object of collision data. Must be created as physics object or will return undefined.

Type:
  • object
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 194)

format :integer

[description]

Type:
  • integer
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 117)

height :number

The height of the entire tilemap.

Type:
  • number
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 72)

heightInPixels :number

The height in pixels of the entire tilemap.

Type:
  • number
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 108)

imageCollections :array

The collection of images the map uses(specified in Tiled)

Type:
  • array
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 212)

images :array

An array of Tiled Image Layers.

Type:
  • array
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 176)

layers :Array.<Phaser.Tilemaps.LayerData>|Phaser.Tilemaps.ObjectLayer

An array with all the layers configured to the MapData.

Type:
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 167)

name :string

The key in the Phaser cache that corresponds to the loaded tilemap data.

Type:
  • string
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 54)

objects :object

An object of Tiled Object Layers.

Type:
  • object
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 185)

orientation :string

The orientation of the map data (i.e. orthogonal, isometric, hexagonal), default 'orthogonal'.

Type:
  • string
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 126)

properties :object

Map specific properties (can be specified in Tiled)

Type:
  • object
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 158)

renderOrder :string

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'

Type:
  • string
Since: 3.12.0
Source: src/tilemaps/mapdata/MapData.js (Line 135)

tileHeight :number

The height of the tiles.

Type:
  • number
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 90)

tiles :array

[description]

Type:
  • array
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 221)

tilesets :Array.<Phaser.Tilemaps.Tileset>

An array of Tilesets.

Type:
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 203)

tileWidth :number

The width of the tiles.

Type:
  • number
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 81)

version :string

The version of the map data (as specified in Tiled).

Type:
  • string
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 149)

width :number

The width of the entire tilemap.

Type:
  • number
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 63)

widthInPixels :number

The width in pixels of the entire tilemap.

Type:
  • number
Since: 3.0.0
Source: src/tilemaps/mapdata/MapData.js (Line 99)