new LayerData( [config])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
config |
Phaser.Types.Tilemaps.LayerDataConfig |
<optional> |
The Layer Data configuration object. |
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 11)
Members
-
alpha :number
-
The alpha value of the layer.
Type:
- number
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 140)
-
baseTileHeight :number
-
The base tile height.
Type:
- number
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 104)
-
baseTileWidth :number
-
The base tile width.
Type:
- number
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 95)
-
bodies :array
-
An array of physics bodies.
Type:
- array
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 194)
-
callbacks :array
-
An array of callbacks.
Type:
- array
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 185)
-
collideIndexes :array
-
Tile Collision ID index map.
Type:
- array
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 176)
-
data :Array.<Array.<Phaser.Tilemaps.Tile>>
-
An array of the tile data indexes.
Type:
- Array.<Array.<Phaser.Tilemaps.Tile>>
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 203)
-
height :number
-
The height of the layer in tiles.
Type:
- number
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 68)
-
heightInPixels :number
-
The height in pixels of the entire layer.
Type:
- number
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 131)
-
hexSideLength :number
-
The length of the horizontal sides of the hexagon. Only used for hexagonal orientation Tilemaps.
Type:
- number
- Since: 3.50.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 221)
-
indexes :array
-
Tile ID index map.
Type:
- array
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 167)
-
name :string
-
The name of the layer, if specified in Tiled.
Type:
- string
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 32)
-
orientation :Phaser.Tilemaps.OrientationType
-
The layers orientation, necessary to be able to determine a tiles pixelX and pixelY as well as the layers width and height.
Type:
- Since: 3.50.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 113)
-
properties :Array.<object>
-
Layer specific properties (can be specified in Tiled)
Type:
- Array.<object>
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 158)
-
tileHeight :number
-
The pixel height of the tiles.
Type:
- number
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 86)
-
tilemapLayer :Phaser.Tilemaps.TilemapLayer
-
A reference to the Tilemap layer that owns this data.
Type:
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 212)
-
tileWidth :number
-
The pixel width of the tiles.
Type:
- number
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 77)
-
visible :boolean
-
Is the layer visible or not?
Type:
- boolean
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 149)
-
width :number
-
The width of the layer in tiles.
Type:
- number
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 59)
-
widthInPixels :number
-
The width in pixels of the entire layer.
Type:
- number
- Since: 3.0.0
- Source: src/tilemaps/mapdata/LayerData.js (Line 122)
-
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 41)
-
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 50)