# Mapbox 3D City Review Lab

This zero-build demo exercises Mapbox GL JS 3.26.0 against the Mapbox Standard style. It covers the features used in the accompanying review:

- built-in 3D buildings, landmark models, trees, facades, shadows, and ambient occlusion;
- dawn, day, dusk, and night lighting presets;
- rain and snow style effects;
- runtime basemap configuration;
- a custom emissive GeoJSON route inserted through a Standard style slot;
- building interactions through the Standard `buildings` featureset;
- camera animation and a six-second browser frame-time sample;
- JSON evidence export without the access token.

## Run it

1. Create a restricted public Mapbox token beginning with `pk.`. Do not use a secret token.
2. From this directory, run `python -m http.server 4173`.
3. Open `http://127.0.0.1:4173` in a modern WebGL-capable browser.
4. Paste the public token into the local page. The value remains in memory and is never intentionally exported or written to the URL; token-shaped strings in Mapbox error messages are redacted before evidence export.
5. Run the six-second measurement, then export the JSON evidence.

The frame sample describes only that browser, GPU, viewport, scene, and camera move; it is not a universal Mapbox benchmark.

## Automated evidence capture

If Playwright is available in the parent project, the capture script performs the same flow at 1440 by 900 and writes the screenshot and JSON into `../evidence/`:

```powershell
$env:MAPBOX_PUBLIC_TOKEN = '<restricted public pk. token>'
node .\capture-evidence.mjs
```

The script and the application's error recorder redact Mapbox-shaped tokens from diagnostics. The checked-in run used Chrome's SwiftShader software renderer, so its timing verifies the harness without representing ordinary hardware-accelerated performance.

## Token safety

Mapbox public tokens are intended for client-side applications, but production tokens should use the minimum public scopes and URL restrictions. This demo does not persist the token. See Mapbox's official guidance:

- https://docs.mapbox.com/help/dive-deeper/access-tokens/
- https://docs.mapbox.com/help/dive-deeper/how-to-use-mapbox-securely/

## Version

- Mapbox GL JS: `3.26.0`
- Map style: `mapbox://styles/mapbox/standard`
- Last protocol review: `2026-07-22`
