The TilemapRenderer component allows you to render a tile map defined by an array of tile ids, using an instance of the TileSet object.

Constructors

Properties

chunks: Chunk[] = []

Array of tile data split into chunks

data: number[] = []

Array of tiles. ID 0 (zero) represents empty space.

height: number = 0

The height of the tilemap (in tiles)

layer: string = defaultRenderLayer

The render layer

opacity: number = 1

Change the opacity between 1 and 0

smooth: boolean = false

TRUE for smooth pixels (not recommended for pixel art)

tileHeight: number = undefined

The height of the tile to render

tileset: Tileset = undefined

The Tileset instance

tileWidth: number = undefined

The width of the tile to render

tintColor: string = undefined

Define a color for tinting the tiles

width: number = 0

The width of the tilemap (in tiles)