# XWUIGameNavmeshViewer

A control-and-stats panel for a navigation-mesh debug visualizer. It exposes an ON/OFF toggle for navmesh visibility, read-only Walkable and Obstacles layer indicators (driven by the `showWalkable`/`showObstacles` config), a stats block reading `nodeCount`, `polyCount`, and pathfind time in ms, and a swatch for the `wireframeColor`. Use it as the UI half of an in-engine navmesh debugger: clicking the toggle flips `enabled` and fires `onToggle(enabled)` so the 3D side can show/hide the mesh, `highlight(polyId)` forwards a polygon highlight request, and `updateData({ enabled, nodeCount, polyCount, pathfindTime })` refreshes the stats.

## Basic Usage

Mounts the panel with no data, so it shows the `Navmesh Debug` title, the toggle reading `OFF`, Walkable/Obstacles both ON, and zeroed node/poly/pathfind stats.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A navmesh debug panel with the toggle OFF, walkable/obstacle layers on, and zeroed pathfinding stats.
```

## Obstacles-Only View

Hides the walkable layer and recolors the wireframe swatch via config.

```example
file: examples/ObstaclesOnly.ts
html: examples/ObstaclesOnly.html
title: Obstacles-Only View
description: showWalkable:false flips the Walkable indicator off and a custom wireframeColor drives the swatch.
```

## Live Stats Refresh

Pushes fresh pathfinding numbers via `updateData()` and subscribes to `onToggle()`.

```example
file: examples/LiveStats.ts
html: examples/LiveStats.html
title: Live Stats Refresh
description: Mounts disabled with zeroed stats, then updateData() streams a frame of counts and re-renders.
```

```api
```
