Class: TileMap

html.TileMap

Class representing a scrollable tile map.

The tile map supports two modes of rendering tiles:

  • RAM to GPU: Tiles are copied from an image buffer in the RAM to the GPU in this mode.

  • GPU to GPU: Tiles are stored on the GPU and are copied internally on the GPU only, which results in less overhead and helps maintaining a higher frame rate. This mode, however, is not supported by all platforms.

The tile set implementation controls which mode to use.

new html.TileMap ()

Properties:
Name Type Description
contentHeight number

[readonly] The current scrolling viewport height.

contentWidth number

[readonly] The current scrolling viewport width.

contentX number

(default: 0) The current horizontal scrolling position.

contentY number

(default: 0) The current vertical scrolling position.

contentColumn number

[readonly] The current tiles column at contentX.

contentRow number

[readonly] The current tiles row at contentY.

key string

(default: "") The key of the tile type in the model items.

model html.ListModel

(default: null) The model of the map.

rowStride number

(default: 1) The amount of tiles per row.

tileSet html.TileSet

(default: null) The tile set to use for rendering.

Extends