Class in reactor_core_display.js
Tilemap
35 public functions in 6 groups · show internal (_) functions
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.
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 sourceTilemap.prototype.initialize()
Sets up a new instance. (Same as the RPG Maker MZ method of this name.)
makeAutotileId
static sourceTilemap.makeAutotileId(kind, shape)
Makes the autotile id. (Same as the RPG Maker MZ method of this name.)
Getting Information
getAutotileKind
static sourceTilemap.getAutotileKind(tileId)
Gets the autotile kind. (Same as the RPG Maker MZ method of this name.)
getAutotileShape
static sourceTilemap.getAutotileShape(tileId)
Gets the autotile shape. (Same as the RPG Maker MZ method of this name.)
Checks (True / False)
isReady
method sourceTilemap.prototype.isReady()
Checks whether the tileset is ready to render.
Details
Checks whether the tileset is ready to render.
isVisibleTile
static sourceTilemap.isVisibleTile(tileId)
Whether it is visible tile. (Same as the RPG Maker MZ method of this name.)
isAutotile
static sourceTilemap.isAutotile(tileId)
Whether it is autotile. (Same as the RPG Maker MZ method of this name.)
isSameKindTile
static sourceTilemap.isSameKindTile(tileID1, tileID2)
Whether it is same kind tile. (Same as the RPG Maker MZ method of this name.)
isTileA1
static sourceTilemap.isTileA1(tileId)
Whether it is tile a1. (Same as the RPG Maker MZ method of this name.)
isTileA2
static sourceTilemap.isTileA2(tileId)
Whether it is tile a2. (Same as the RPG Maker MZ method of this name.)
isTileA3
static sourceTilemap.isTileA3(tileId)
Whether it is tile a3. (Same as the RPG Maker MZ method of this name.)
isTileA4
static sourceTilemap.isTileA4(tileId)
Whether it is tile a4. (Same as the RPG Maker MZ method of this name.)
isTileA5
static sourceTilemap.isTileA5(tileId)
Whether it is tile a5. (Same as the RPG Maker MZ method of this name.)
isWaterTile
static sourceTilemap.isWaterTile(tileId)
Whether it is water tile. (Same as the RPG Maker MZ method of this name.)
isWaterfallTile
static sourceTilemap.isWaterfallTile(tileId)
Whether it is waterfall tile. (Same as the RPG Maker MZ method of this name.)
isGroundTile
static sourceTilemap.isGroundTile(tileId)
Whether it is ground tile. (Same as the RPG Maker MZ method of this name.)
isShadowingTile
static sourceTilemap.isShadowingTile(tileId)
Whether it is shadowing tile. (Same as the RPG Maker MZ method of this name.)
isRoofTile
static sourceTilemap.isRoofTile(tileId)
Whether it is roof tile. (Same as the RPG Maker MZ method of this name.)
isWallTopTile
static sourceTilemap.isWallTopTile(tileId)
Whether it is wall top tile. (Same as the RPG Maker MZ method of this name.)
isWallSideTile
static sourceTilemap.isWallSideTile(tileId)
Whether it is wall side tile. (Same as the RPG Maker MZ method of this name.)
isWallTile
static sourceTilemap.isWallTile(tileId)
Whether it is wall tile. (Same as the RPG Maker MZ method of this name.)
isFloorTypeAutotile
static sourceTilemap.isFloorTypeAutotile(tileId)
Whether it is floor type autotile. (Same as the RPG Maker MZ method of this name.)
isWallTypeAutotile
static sourceTilemap.isWallTypeAutotile(tileId)
Whether it is wall type autotile. (Same as the RPG Maker MZ method of this name.)
isWaterfallTypeAutotile
static sourceTilemap.isWaterfallTypeAutotile(tileId)
Whether it is waterfall type autotile. (Same as the RPG Maker MZ method of this name.)
Actions
destroy
method sourceTilemap.prototype.destroy()
Destroys the tilemap.
setData
method sourceTilemap.prototype.setData(width, height, data)
Sets the tilemap data.
Details
Sets the tilemap data.
setBitmaps
method sourceTilemap.prototype.setBitmaps(bitmaps)
Sets the bitmaps used as a tileset.
Details
Sets the bitmaps used as a tileset.
setTileAnimation
method sourceTilemap.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 sourceTilemap.prototype.update()
Updates the tilemap for each frame.
refresh
method sourceTilemap.prototype.refresh()
Forces to repaint the entire tilemap.
updateTransform
method sourceTilemap.prototype.updateTransform()
Updates the transform on all children of this container for rendering.
Renderer
static sourceTilemap.Renderer()
Renderer. (Same as the RPG Maker MZ method of this name.)
Other
CombinedLayer
static sourceTilemap.CombinedLayer()
Combined layer. (Same as the RPG Maker MZ method of this name.)
ChunkRecorder
static sourceTilemap.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 sourceTilemap.Layer()
Layer. (Same as the RPG Maker MZ method of this name.)