Class: ShaderTilemap

ShaderTilemap()

new ShaderTilemap()

The tilemap which displays 2D tile-based game map using shaders

Extends

Methods

(static) refresh()

Forces to repaint the entire tilemap AND update bitmaps list if needed

(static) renderCanvas(pixi)

PIXI render method
Parameters:
Name Type Description
pixi Object renderer

(static) renderWebGL(pixi)

PIXI render method
Parameters:
Name Type Description
pixi Object renderer

(static) updateBitmaps()

Call after you update tileset

addChild(child) → {Object}

[super] Adds a child to the container.
Parameters:
Name Type Description
child Object The child to add
Inherited From:
Returns:
The child that was added
Type
Object

addChildAt(child, index) → {Object}

[super] Adds a child to the container at a specified index.
Parameters:
Name Type Description
child Object The child to add
index Number The index to place the child in
Inherited From:
Returns:
The child that was added
Type
Object

initialize()

Inherited From:

isReady() → {Boolean}

Checks whether the tileset is ready to render.
Inherited From:
Returns:
True if the tilemap is ready
Type
Boolean

refresh()

Forces to repaint the entire tilemap.
Overrides:

refreshTileset()

Forces to refresh the tileset
Overrides:

removeChild(child) → {Object}

[super] Removes a child to the container.
Parameters:
Name Type Description
child Object The child to remove
Inherited From:
Returns:
The child that was removed
Type
Object

removeChildAt(index) → {Object}

[super] Removes a child from the specified index position.
Parameters:
Name Type Description
index Number The index to get the child from
Inherited From:
Returns:
The child that was removed
Type
Object

setData(width, height, data)

Sets the tilemap data.
Parameters:
Name Type Description
width Number The width of the map in number of tiles
height Number The height of the map in number of tiles
data Array The one dimensional array for the map data
Inherited From:

update()

Updates the tilemap for each frame.
Inherited From: