# XWUIGameMapViewer

Canvas-based local/dungeon overlay map. It renders a `mapData` tile grid (0 = wall, 1 = floor, 2 = door, 3 = stairs) with optional fog of war driven by the `fogRevealed` grid, a `playerPos` indicator, and `markers`. `conf_comp` picks the `mode` (`local`/`dungeon`/`tower`), the canvas `size`, and toggles `showFog`/`showGrid`. `setPlayerPos(x, y)` moves the player, `revealTile(x, y)` clears a single fog cell, and `updateData(...)` swaps the whole map and re-renders.

## Basic Usage

Mounts the canvas minimap with its tile grid and fog of war.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Mounts the dungeon map viewer rendering a tile grid with fog of war, player position, and markers.
```

## Fogged Dungeon

Enables `showFog: true` in `mode: "dungeon"` and supplies a `fogRevealed` grid so only explored cells are visible.

```example
file: examples/FoggedDungeon.ts
html: examples/FoggedDungeon.html
title: Fogged Dungeon
description: A dungeon map with fog of war and a fogRevealed grid exposing only the explored pocket.
```

## Tower Ascent

Runs `mode: "tower"`, then drives the player with `setPlayerPos(x, y)` and clears a cell with `revealTile(x, y)`.

```example
file: examples/TowerAscent.ts
html: examples/TowerAscent.html
title: Tower Ascent
description: A tower-mode floor that moves the player and reveals a fog tile via the imperative API.
```

```api
```
