City Walk/WissenZum StadtspaziergangViewer
ImpressumDatenschutz
Leitfaden
  • So funktioniert der Stadtspaziergang
  • Woher die Daten kommen
  • Quellen nach Stadt
  • Wie der Viewer zu einer Angabe kommt
  • Der Weg der Daten
  • Bedienung
  • Glossar
Guide (English)
  • How the city walker works
  • Where the data comes from
  • Sources by city
  • How the viewer comes by what it shows
  • From download to browser
  • Using the viewer
  • Glossary
Entwicklung (English)
  • docs/ — the project knowledge base
  • Rendering — how the data becomes pixels
  • Data pipeline — the bakes, the build step and the artifact contracts
  • Architecture decision records
    • ADR 0001: Static where possible — no database, no accounts, nothing kept about a visitor
    • ADR 0002: Imperative three.js inside a React shell, not react-three-fiber
    • ADR 0005: Data stays in its provider's UTM zone, under one recenter offset and a rotated world group
    • ADR 0009: Light, shadows and post — soft PCF redrawn on demand, four concentric rings, a baked horizon for the far field, a fixed lamp pool
    • ADR 0010: The look — opaque clay on a painted ground, colours within one palette, detail drawn softly
    • ADR 0012: Sources — official data first, OSM and Wikidata for what it lacks, named stand-ins marked per city
    • ADR 0018: Headless tests run a lite profile and count frames; visuals are judged on a real GPU through snapshots
    • ADR 0021: docs/ is published as /wissen, and its diagrams are prerendered SVG
    • ADR 0024: The build bakes each city into a 3D Tiles tileset that streams around the camera
    • ADR 0027: WebGPURenderer and TSL node materials, one path, public API only
    • ADR 0030: The ground — a TIN of the native DGM, its static parts baked in, every part meeting it by one set of rules
    • ADR 0032: The camera is never below the ground or inside a building
    • ADR 0034: Picture styles are one post pass over the clay scene, reading the light and the world
    • ADR 0036: Buildings are LoD2; geometry beyond it only where a measurement and a name agree, and roofs that miss the scan are rebuilt in its form
    • ADR 0037: Cities, providers and the pipeline — fetch, bake, build; one deployment, a route per city
    • ADR 0040: Data layers are switches, off at start, drawn as glass; optional features start on first use
    • ADR 0041: Rails, trams and bridges — decks measured in the surface model, every line on a drivable profile solved by the build
    • ADR 0042: The twin answers on demand — facts and provenance ride in the tileset, text appears only when asked
    • ADR 0043: Crash and page reports go to an error tracker without an SDK, and the privacy page says what the code does
    • ADR 0044: Modell — the city in parallel projection, every pass reading the camera through a lens
    • ADR 0047: Every device gets a budget in true bytes, a phone's memory never grows, and a device that lost its GPU gets a lighter page
    • ADR 0048: A network failure is retried for a budget of the page's visible time, never decided at once
    • ADR 0054: A planner's design is loaded on the device, placed by its coordinates or by hand, and stands in for the buildings it covers
    • ADR 0055: What the twin knows is baked as files; walks are written ahead, their narration marked, every claim sourced
    • ADR 0056: Frag die Stadt runs on the visitor's own key, through one stateless function with a fixed prompt and fixed tools
    • ADR 0057: The Sprachführer speaks and listens with the browser's own voice, and the scene rests while it does
    • ADR 0059: One schema per file a bake hands over, checked by the build
    • ADR 0060: Glass fronts are read from street photos by an open image model, offline
    • ADR 0061: The scene runs in a worker; the page hosts it
  • Data → feature provenance
  • Transformation catalog
  • Portability — rendering any location, with whatever data it has
  • Writing a walk
  • Routines: the twin's scheduled agents
  • Implementation plans, backlog and audit history
  • What the data streams carry that the walker does not use yet
Contents
Leitfaden
  • So funktioniert der Stadtspaziergang
  • Woher die Daten kommen
  • Quellen nach Stadt
  • Wie der Viewer zu einer Angabe kommt
  • Der Weg der Daten
  • Bedienung
  • Glossar
Guide (English)
  • How the city walker works
  • Where the data comes from
  • Sources by city
  • How the viewer comes by what it shows
  • From download to browser
  • Using the viewer
  • Glossary
Entwicklung (English)
  • docs/ — the project knowledge base
  • Rendering — how the data becomes pixels
  • Data pipeline — the bakes, the build step and the artifact contracts
  • Architecture decision records
    • ADR 0001: Static where possible — no database, no accounts, nothing kept about a visitor
    • ADR 0002: Imperative three.js inside a React shell, not react-three-fiber
    • ADR 0005: Data stays in its provider's UTM zone, under one recenter offset and a rotated world group
    • ADR 0009: Light, shadows and post — soft PCF redrawn on demand, four concentric rings, a baked horizon for the far field, a fixed lamp pool
    • ADR 0010: The look — opaque clay on a painted ground, colours within one palette, detail drawn softly
    • ADR 0012: Sources — official data first, OSM and Wikidata for what it lacks, named stand-ins marked per city
    • ADR 0018: Headless tests run a lite profile and count frames; visuals are judged on a real GPU through snapshots
    • ADR 0021: docs/ is published as /wissen, and its diagrams are prerendered SVG
    • ADR 0024: The build bakes each city into a 3D Tiles tileset that streams around the camera
    • ADR 0027: WebGPURenderer and TSL node materials, one path, public API only
    • ADR 0030: The ground — a TIN of the native DGM, its static parts baked in, every part meeting it by one set of rules
    • ADR 0032: The camera is never below the ground or inside a building
    • ADR 0034: Picture styles are one post pass over the clay scene, reading the light and the world
    • ADR 0036: Buildings are LoD2; geometry beyond it only where a measurement and a name agree, and roofs that miss the scan are rebuilt in its form
    • ADR 0037: Cities, providers and the pipeline — fetch, bake, build; one deployment, a route per city
    • ADR 0040: Data layers are switches, off at start, drawn as glass; optional features start on first use
    • ADR 0041: Rails, trams and bridges — decks measured in the surface model, every line on a drivable profile solved by the build
    • ADR 0042: The twin answers on demand — facts and provenance ride in the tileset, text appears only when asked
    • ADR 0043: Crash and page reports go to an error tracker without an SDK, and the privacy page says what the code does
    • ADR 0044: Modell — the city in parallel projection, every pass reading the camera through a lens
    • ADR 0047: Every device gets a budget in true bytes, a phone's memory never grows, and a device that lost its GPU gets a lighter page
    • ADR 0048: A network failure is retried for a budget of the page's visible time, never decided at once
    • ADR 0054: A planner's design is loaded on the device, placed by its coordinates or by hand, and stands in for the buildings it covers
    • ADR 0055: What the twin knows is baked as files; walks are written ahead, their narration marked, every claim sourced
    • ADR 0056: Frag die Stadt runs on the visitor's own key, through one stateless function with a fixed prompt and fixed tools
    • ADR 0057: The Sprachführer speaks and listens with the browser's own voice, and the scene rests while it does
    • ADR 0059: One schema per file a bake hands over, checked by the build
    • ADR 0060: Glass fronts are read from street photos by an open image model, offline
    • ADR 0061: The scene runs in a worker; the page hosts it
  • Data → feature provenance
  • Transformation catalog
  • Portability — rendering any location, with whatever data it has
  • Writing a walk
  • Routines: the twin's scheduled agents
  • Implementation plans, backlog and audit history
  • What the data streams carry that the walker does not use yet
Entwicklung (English)

ADR 0047: Every device gets a budget in true bytes, a phone's memory never grows, and a device that lost its GPU gets a lighter page

  • Status: accepted
  • Date: 2026-10

Context

The viewer must work on phones. An iPhone's tab dies past a few hundred megabytes, and Safari says nothing about the device's memory. Before this decision the phone's numbers did not add up: about 100 MiB of post targets and shadow map nobody counted, a tile cache whose bound sat above every loss, a sun camera that refined every tile it touched, CPU copies kept after upload. A lost GPU reloaded the page into the very budget that had just failed, in a loop, until a frozen canvas.

Decision

  1. A phone's memory must not grow with a change. A change that adds bytes on a phone pays for them elsewhere, measured.
  2. A budget per device tier and safety level, in one table (scene-profile.ts): pixel ratio, shadow map, tile cache, post profile. A phone builds no depth of field and antialiases with FXAA; every tier uses one-byte targets where a channel suffices. The camera's motion blur holds no target: it draws in place of the FXAA on a phone and into the lens blur's idle copy on a desktop.
  3. Fixed costs are counted, and a phone's tile cache is derived from the memory governor's soft line minus them.
  4. Fewer bytes a tile: buffers the site shares are one copy; CPU copies go once a compile has uploaded them, except what is read on the CPU later; the shadow camera streams at a low resolution of its own; a phone paces its downloads and decodes rasters one at a time.
  5. A safety level 0–3 per device, in local storage (gpu-safety). A GPU lost in use, a crashed previous page or a memory emergency raises it by one, once per incident; time lowers it by one every three days. Each level is a lighter budget, applied at boot.
  6. Recovery is bounded by levels: one reload per level, the old renderer and device released first, back at the player's pose. A GPU reclaimed in the background, or a frame that threw on a working GPU, reloads at the same level. Past the last level the failure card offers Leichter weiter and Neu laden.
  7. The level is visible: Qualität in the sidebar shows it and resets it to full detail through a reload after the whole app is torn down.

Consequences

  • What a tile adds beyond its glTF reaches the cache's weighing (calculateBytesUsed).
  • An attribute read on the CPU after the dressing stays off the drop lists; a buffer the site shares is detached before its geometry is disposed.
  • A device that crashed once runs plainer for days, and says so.
  • Granted exceptions (Manuel): the dormers' and chimneys' shadow-only undersides (2026-11-03, +0.46 % a building tile); the window niches near the eye (2026-11-07: 16 bytes a window, ≈ 2.3 MB the densest tile, weighed in its tile, so the cache holds less beside it; 2026-11-08 out to 250 m: a phone's set of 16 384, ≈ 1.25 MB on the GPU).

Alternatives

  • Governing on the page's own footprint: Safari exposes nothing to read.
  • Caps in time on recovery reloads: bound the loop's length, not its load.
  • Session-only safety state: lost on Safari's kill-and-reopen and on the next visit, where the device runs out again.
  • Stepping the budget down inside a page: rebuilds on a device already short of memory; a level is a new page.
  • Counting background reclaims as losses: every phone left in a pocket would end up plain.
  • Dropping every CPU copy: collision, picking and the height samplers read them.
  • Motion blur from a velocity buffer or a frame history (TAA): a screen-sized target, and a velocity output costs the clay inter-stage variables it does not have; the camera's own motion, rebuilt from depth, needs three matrices.
Previous
ADR 0044: Modell — the city in parallel projection, every pass reading the camera through a lens
Next
ADR 0048: A network failure is retried for a budget of the page's visible time, never decided at once
Source on GitHub: docs/adr/0047-phone-memory-budget-in-true-bytes.md
On this page
  • Context
  • Decision
  • Consequences
  • Alternatives