Class: LayerData

Phaser.Tilemaps. LayerData

A class for representing data about about a layer in a map. Maps are parsed from CSV, Tiled, etc. into this format. Tilemap, StaticTilemapLayer and DynamicTilemapLayer have a reference to this data and use it to look up and perform operations on tiles.


new LayerData( [config])

Parameters:
Name Type Argument Description
config object <optional>

[description]

Since: 3.0.0
Source: src/tilemaps/mapdata/LayerData.js (Line 10)

Members


alpha :number

[description]

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

baseTileHeight :number

[description]

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

baseTileWidth :number

[description]

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

bodies :array

[description]

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

callbacks :array

[description]

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

collideIndexes :array

[description]

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

data :Array.<number>

An array of the tile indexes

Type:
  • Array.<number>
Since: 3.0.0
Source: src/tilemaps/mapdata/LayerData.js (Line 193)

height :number

The height in tiles of the layer.

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

heightInPixels :number

The height in pixels of the entire layer.

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

indexes :array

[description]

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

name :string

The name of the layer, if specified in Tiled.

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

properties :object

Layer specific properties (can be specified in Tiled)

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

tileHeight :number

The pixel height of the tiles.

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

tilemapLayer :Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer

[description]

Type:
Since: 3.0.0
Source: src/tilemaps/mapdata/LayerData.js (Line 202)

tileWidth :number

The pixel width of the tiles.

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

visible :boolean

[description]

Type:
  • boolean
Since: 3.0.0
Source: src/tilemaps/mapdata/LayerData.js (Line 139)

width :number

The width in tile of the layer.

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

widthInPixels :number

The width in pixels of the entire layer.

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

x :number

The x offset of where to draw from the top left

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

y :number

The y offset of where to draw from the top left

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