Copy properties from tileset to tiles.
name | type | description |
---|---|---|
mapData | Phaser.Tilemaps.MapData |
The Map Data object. |
Decode base-64 encoded data, for example as exported by Tiled.
name | type | description |
---|---|---|
data | object |
Base-64 encoded data to decode. |
Array containing the decoded bytes.
Master list of tiles -> x, y, index in tileset.
name | type | description |
---|---|---|
mapData | Phaser.Tilemaps.MapData |
The Map Data object. |
An array of Tileset objects.
Parse a Tiled group layer and create a state object for inheriting.
name | type | arguments | description |
---|---|---|---|
json | object |
The Tiled JSON object. |
|
currentl | object | <optional> |
The current group layer from the Tiled JSON file. |
parentstate | object | <optional> |
The state of the parent group (if any). |
A group state object with proper values for updating children layers.
See Tiled documentation on tile flipping: http://docs.mapeditor.org/en/latest/reference/tmx-map-format/
name | type | description |
---|---|---|
gid | number |
A Tiled GID. |
The GID Data.
Parses a Tiled JSON object into an array of objects with details about the image layers.
name | type | description |
---|---|---|
json | object |
The Tiled JSON object. |
Array of objects that include critical info about the map's image layers
Parses a Tiled JSON object into a new MapData object.
name | type | description |
---|---|---|
name | string |
The name of the tilemap, used to set the name on the MapData. |
json | object |
The Tiled JSON object. |
insertNull | boolean |
Controls how empty tiles, tiles with an index of -1, in the map
data are handled. If |
The created MapData object, or null
if the data can't be parsed.
Convert a Tiled object to an internal parsed object normalising and copying properties over, while applying optional x and y offsets. The parsed object will always have the properties id
, name
, type
, rotation
, properties
, visible
, x
, y
, width
and height
. Other properties will be added according to the object type (such as text, polyline, gid etc.)
name | type | arguments | description |
---|---|---|---|
tiledObject | object |
Tiled object to convert to an internal parsed object normalising and copying properties over. |
|
offsetX | number | <optional> |
Optional additional offset to apply to the object's x property. Defaults to 0. |
offsetY | number | <optional> |
Optional additional offset to apply to the object's y property. Defaults to 0. |
The parsed object containing properties read from the Tiled object according to it's type with x and y values updated according to the given offsets.
Parses a Tiled JSON object into an array of ObjectLayer objects.
name | type | description |
---|---|---|
json | object |
The Tiled JSON object. |
An array of all object layers in the tilemap as ObjectLayer
s.
Parses all tilemap layers in a Tiled JSON object into new LayerData objects.
name | type | description |
---|---|---|
json | object |
The Tiled JSON object. |
insertNull | boolean |
Controls how empty tiles, tiles with an index of -1, in the map data are handled (see {@link Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled}). |
Tilesets and Image Collections
name | type | description |
---|---|---|
json | object |
The Tiled JSON data. |
An object containing the tileset and image collection data.