new TilemapParser()
Phaser.TilemapParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into a Tilemap.
- Source:
Methods
-
<static> parse(game, data, format) → {Phaser.Tileset}
-
Parse tileset data from the cache and creates a Tileset object.
Parameters:
Name Type Description game
Phaser.Game Game reference to the currently running game.
data
object format
string - Source:
Returns:
Generated Tileset object.
- Type
- Phaser.Tileset
-
<static> parseCSV(data) → {object}
-
Parses a CSV file into valid map data.
Parameters:
Name Type Description data
string The CSV file data.
- Source:
Returns:
Generated map data.
- Type
- object
-
<static> parseJSON(json-) → {object}
-
Parses a Tiled JSON file into valid map data.
Parameters:
Name Type Description json-
object The Tiled JSON data.
- Source:
Returns:
Generated map data.
- Type
- object
-
<static> tileset(game, key, tileWidth, tileHeight, tileMax, tileMargin, tileSpacing) → {Phaser.Tileset}
-
Creates a Tileset object.
Parameters:
Name Type Description game
Phaser.Game Game reference to the currently running game.
key
string tileWidth
number tileHeight
number tileMax
number tileMargin
number tileSpacing
number - Source:
Returns:
Generated Tileset object.
- Type
- Phaser.Tileset