Class: Tilemap

Tilemap

new Tilemap()

The tilemap which displays 2D tile-based game map.

Extends

  • PIXI.Container

Members

animationCountnumber

The animation count for autotiles

flagsarray

The tileset flags

heightnumber

The height of the tilemap

horizontalWrapboolean

Whether the tilemap loops horizontally

originPoint

The origin point of the tilemap for scrolling

tileHeightnumber

The height of one tile

tileWidthnumber

The width of one tile

verticalWrapboolean

Whether the tilemap loops vertically

widthnumber

The width of the tilemap

Methods

Destroys the tilemap

initialize()

Initializes the tile map

isReady()boolean

Checks whether the tileset is ready to render
Returns:
TypeDescription
booleanTrue if the tilemap is ready
Forces a repaint of the entire tilemap

setBitmaps(bitmaps)

Sets the bitmaps to be used as a tileset
NameTypeDescription
bitmapsarrayThe array of the tileset bitmaps

setData(width, height, data)

Sets the tilemap data
NameTypeDescription
widthnumberThe width of the map in number of tiles
heightnumberThe height of the map in number of tiles
dataarrayThe one dimensional array for the map data
Updates the tilemap for each frame

updateTransform()

Updates the transform on all children of this container for rendering