Class in reactor_core_display.js

Tilemap

35 public functions in 6 groups · show internal (_) functions

The Database: everything Core loads at boot.

Familiar territory. Tilemap keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

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

@class
@extends
PIXI.Container
function Tilemap()

Quick Reference

Setup & Creation 2

initialize() Sets up a new instance.
makeAutotileId() Makes the autotile id.

Getting Information 2

getAutotileKind() Gets the autotile kind.
getAutotileShape() Gets the autotile shape.

Checks (True / False) 20

isReady() Checks whether the tileset is ready to render.
isVisibleTile() Whether it is visible tile.
isAutotile() Whether it is autotile.
isSameKindTile() Whether it is same kind tile.
isTileA1() Whether it is tile a1.
isTileA2() Whether it is tile a2.
isTileA3() Whether it is tile a3.
isTileA4() Whether it is tile a4.
isTileA5() Whether it is tile a5.
isWaterTile() Whether it is water tile.
isWaterfallTile() Whether it is waterfall tile.
isGroundTile() Whether it is ground tile.
isShadowingTile() Whether it is shadowing tile.
isRoofTile() Whether it is roof tile.
isWallTopTile() Whether it is wall top tile.
isWallSideTile() Whether it is wall side tile.
isWallTile() Whether it is wall tile.
isFloorTypeAutotile() Whether it is floor type autotile.
isWallTypeAutotile() Whether it is wall type autotile.
isWaterfallTypeAutotile() Whether it is waterfall type autotile.

Actions 4

destroy() Destroys the tilemap.
setData() Sets the tilemap data.
setBitmaps() Sets the bitmaps used as a tileset.
setTileAnimation() Tile animation a tileset sets out (an RPG Maker 2000/2003 import): frames maps a tile id to the ids it shows…

Updating & Drawing 4

update() Updates the tilemap for each frame.
refresh() Forces to repaint the entire tilemap.
updateTransform() Updates the transform on all children of this container for rendering.
Renderer() Renderer.

Other 3

CombinedLayer() Combined layer.
ChunkRecorder() Collects one chunk's rects as the painting hooks hand them to a layer, with the water motion _addAutotile mar…
Layer() Layer.

Setup & Creation

initialize

method source
Tilemap.prototype.initialize()

Sets up a new instance. (Same as the RPG Maker MZ method of this name.)

makeAutotileId

static source
Tilemap.makeAutotileId(kind, shape)

Makes the autotile id. (Same as the RPG Maker MZ method of this name.)

Getting Information

getAutotileKind

static source
Tilemap.getAutotileKind(tileId)

Gets the autotile kind. (Same as the RPG Maker MZ method of this name.)

getAutotileShape

static source
Tilemap.getAutotileShape(tileId)

Gets the autotile shape. (Same as the RPG Maker MZ method of this name.)

Checks (True / False)

isReady

method source
Tilemap.prototype.isReady()

Checks whether the tileset is ready to render.

Details

Checks whether the tileset is ready to render.

@type
boolean
@returns
boolean True if the tilemap is ready.

isVisibleTile

static source
Tilemap.isVisibleTile(tileId)

Whether it is visible tile. (Same as the RPG Maker MZ method of this name.)

isAutotile

static source
Tilemap.isAutotile(tileId)

Whether it is autotile. (Same as the RPG Maker MZ method of this name.)

isSameKindTile

static source
Tilemap.isSameKindTile(tileID1, tileID2)

Whether it is same kind tile. (Same as the RPG Maker MZ method of this name.)

isTileA1

static source
Tilemap.isTileA1(tileId)

Whether it is tile a1. (Same as the RPG Maker MZ method of this name.)

isTileA2

static source
Tilemap.isTileA2(tileId)

Whether it is tile a2. (Same as the RPG Maker MZ method of this name.)

isTileA3

static source
Tilemap.isTileA3(tileId)

Whether it is tile a3. (Same as the RPG Maker MZ method of this name.)

isTileA4

static source
Tilemap.isTileA4(tileId)

Whether it is tile a4. (Same as the RPG Maker MZ method of this name.)

isTileA5

static source
Tilemap.isTileA5(tileId)

Whether it is tile a5. (Same as the RPG Maker MZ method of this name.)

isWaterTile

static source
Tilemap.isWaterTile(tileId)

Whether it is water tile. (Same as the RPG Maker MZ method of this name.)

isWaterfallTile

static source
Tilemap.isWaterfallTile(tileId)

Whether it is waterfall tile. (Same as the RPG Maker MZ method of this name.)

isGroundTile

static source
Tilemap.isGroundTile(tileId)

Whether it is ground tile. (Same as the RPG Maker MZ method of this name.)

isShadowingTile

static source
Tilemap.isShadowingTile(tileId)

Whether it is shadowing tile. (Same as the RPG Maker MZ method of this name.)

isRoofTile

static source
Tilemap.isRoofTile(tileId)

Whether it is roof tile. (Same as the RPG Maker MZ method of this name.)

isWallTopTile

static source
Tilemap.isWallTopTile(tileId)

Whether it is wall top tile. (Same as the RPG Maker MZ method of this name.)

isWallSideTile

static source
Tilemap.isWallSideTile(tileId)

Whether it is wall side tile. (Same as the RPG Maker MZ method of this name.)

isWallTile

static source
Tilemap.isWallTile(tileId)

Whether it is wall tile. (Same as the RPG Maker MZ method of this name.)

isFloorTypeAutotile

static source
Tilemap.isFloorTypeAutotile(tileId)

Whether it is floor type autotile. (Same as the RPG Maker MZ method of this name.)

isWallTypeAutotile

static source
Tilemap.isWallTypeAutotile(tileId)

Whether it is wall type autotile. (Same as the RPG Maker MZ method of this name.)

isWaterfallTypeAutotile

static source
Tilemap.isWaterfallTypeAutotile(tileId)

Whether it is waterfall type autotile. (Same as the RPG Maker MZ method of this name.)

Actions

destroy

method source
Tilemap.prototype.destroy()

Destroys the tilemap.

setData

method source
Tilemap.prototype.setData(width, height, data)

Sets the tilemap data.

Details

Sets the tilemap data.

@param
width number The width of the map in number of tiles.
@param
height number The height of the map in number of tiles.
@param
data array The one dimensional array for the map data.

setBitmaps

method source
Tilemap.prototype.setBitmaps(bitmaps)

Sets the bitmaps used as a tileset.

Details

Sets the bitmaps used as a tileset.

@param
bitmaps array The array of the tileset bitmaps.

setTileAnimation

method source
Tilemap.prototype.setTileAnimation(frames, water)

Tile animation a tileset sets out (an RPG Maker 2000/2003 import): frames maps a tile id to the ids it shows in turn, a frame every 6 game frames; water gives the water's step in frames and its cycle (4: frames 1-2-3-2, 3: 1-2-3).

Details

Tile animation a tileset sets out (an RPG Maker 2000/2003 import): frames maps a tile id to the ids it shows in turn, a frame every 6 game frames; water gives the water's step in frames and its cycle (4: frames 1-2-3-2, 3: 1-2-3). Only tiles the map uses are kept, so a map without them never repaints for them.

Updating & Drawing

update

method source
Tilemap.prototype.update()

Updates the tilemap for each frame.

refresh

method source
Tilemap.prototype.refresh()

Forces to repaint the entire tilemap.

updateTransform

method source
Tilemap.prototype.updateTransform()

Updates the transform on all children of this container for rendering.

Renderer

static source
Tilemap.Renderer()

Renderer. (Same as the RPG Maker MZ method of this name.)

Other

CombinedLayer

static source
Tilemap.CombinedLayer()

Combined layer. (Same as the RPG Maker MZ method of this name.)

ChunkRecorder

static source
Tilemap.ChunkRecorder(tilemap)

Collects one chunk's rects as the painting hooks hand them to a layer, with the water motion _addAutotile marks them with.

Layer

static source
Tilemap.Layer()

Layer. (Same as the RPG Maker MZ method of this name.)