Phaser API Documentation

  Version: 
setLayerTileSize(tileWidth, tileHeight, [layer])

Description:

Sets the tile size for a specific layer. Note: this does not necessarily match the maps tileWidth and tileHeight for all layers. This will set the tile size for the layer and any tiles the layer has.

Parameters:

name type arguments description
tileWidth number

The width of the tiles (in pixels) in the layer.

tileHeight number

The height of the tiles (in pixels) in the layer.

layer string | number | Phaser.Tilemaps.TilemapLayer <optional>

The name of the layer from Tiled, the index of the layer in the map or a TilemapLayer. If not given will default to the maps current layer index.

Returns:
Description:

This Tilemap object.

Since: 3.0.0
Source: src/tilemaps/Tilemap.js (Line 2309)