phaser - v4.0.0-rc.4
    Preparing search index...

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

    Index

    Constructors

    Properties

    alpha: number

    The alpha value of the layer.

    baseTileHeight: number

    The base tile height.

    baseTileWidth: number

    The base tile width.

    bodies: any[]

    An array of physics bodies.

    callbacks: any[]

    An array of callbacks.

    collideIndexes: any[]

    Tile Collision ID index map.

    data: Tile[][]

    An array of the tile data indexes.

    height: number

    The height of the layer in tiles.

    heightInPixels: number

    The height in pixels of the entire layer.

    hexSideLength: number

    The length of the horizontal sides of the hexagon. Only used for hexagonal orientation Tilemaps.

    id: number

    The id of the layer, as specified in the map data.

    Note: This is not the index of the layer in the map data, but its actual ID in Tiled.

    indexes: any[]

    Tile ID index map.

    name: string

    The name of the layer, if specified in Tiled.

    orientation: Tilemaps.Orientation

    The layers orientation, necessary to be able to determine a tiles pixelX and pixelY as well as the layers width and height.

    properties: object[]

    Layer specific properties (can be specified in Tiled)

    staggerAxis: string

    The Stagger Axis as defined in Tiled.

    Only used for hexagonal orientation Tilemaps.

    staggerIndex: string

    The Stagger Index as defined in Tiled.

    Either 'odd' or 'even'.

    Only used for hexagonal orientation Tilemaps.

    tileHeight: number

    The pixel height of the tiles.

    tilemapLayer: TilemapLayer

    A reference to the Tilemap layer that owns this data.

    tileWidth: number

    The pixel width of the tiles.

    visible: boolean

    Is the layer visible or not?

    width: number

    The width of the layer in tiles.

    widthInPixels: number

    The width in pixels of the entire layer.

    x: number

    The x offset of where to draw from the top left.

    y: number

    The y offset of where to draw from the top left.