Phaser API Documentation

  Version: 
Filter
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Namespace: Impact
Phaser.Tilemaps.Parsers.Impact

Methods

<static> ParseTileLayers(json, insertNull)
Focus
Focus

Description:

Parses all tilemap layers in an Impact JSON object into new LayerData objects.

Parameters:

name type description
json object

The Impact 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}).

Returns:
Description:
  • An array of LayerData objects, one for each entry in json.layers with the type 'tilelayer'.
Examples:
Focus
Focus
<static> ParseTilesets(json)
Focus
Focus

Description:

Tilesets and Image Collections

Parameters:

name type description
json object

The Impact JSON data.

Returns:
Description:

An array of Tilesets.

Type:
  • array
Examples:
Since: 3.0.0
Focus
Focus
<static> ParseWeltmeister(name, json, insertNull)
Focus
Focus

Description:

Parses a Weltmeister JSON object into a new MapData object.

Parameters:

name type description
name string

The name of the tilemap, used to set the name on the MapData.

json object

The Weltmeister JSON object.

insertNull boolean

Controls 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.

Returns:
Description:

The created MapData object, or null if the data can't be parsed.

Examples:
Focus
Focus