Lane F R19 (v4.0-alpha): B's BIG_CITY one-liner — big-graph towns stream like big cities

Real towns can have FEW shops but a HUGE road graph (real Katoomba: 20 shops / 799 edges / 5 km), so the
shop-count-only heuristic left them on small-town streaming and blew the tri budget (280k > the 200k gate).
Extend the trigger to the graph: BIG_CITY = shops>120 || edges>200. B proved the effect; landed EARLY so
D/B's post-fix re-measures see it (per the R19 order).

Verified: katoomba_real 799 edges -> BIG_CITY -> 61 draws / ~12k tris (was 280k), 0 errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
m3ultra 2026-07-16 17:19:08 +10:00
parent 55d5c634d9
commit e6fcb7b365

View File

@ -138,7 +138,10 @@ try {
// Adaptive to plan density: a large generated city (Lane A) has content in nearly every chunk, so // Adaptive to plan density: a large generated city (Lane A) has content in nearly every chunk, so
// a smaller radius + no sun-shadow pass keeps draw calls near the ≤300 gate. The sparse fixture // a smaller radius + no sun-shadow pass keeps draw calls near the ≤300 gate. The sparse fixture
// gets the fuller radius 3 + shadows (measured ~140 draws). Override via ?r= / ?shadows=0|1. // gets the fuller radius 3 + shadows (measured ~140 draws). Override via ?r= / ?shadows=0|1.
const BIG_CITY = (plan.shops?.length || 0) > 120; // [Lane F R19 — B's proven one-liner] a real town can have FEW shops but a HUGE road graph (real Katoomba:
// 20 shops / 799 edges / 5 km) — the shop-count heuristic alone left it on small-town streaming and blew the
// tri budget (280k > 200k). Extend the trigger to the graph size so big-graph towns stream like big cities.
const BIG_CITY = (plan.shops?.length || 0) > 120 || (plan.streets?.edges?.length || 0) > 200;
const RADIUS = parseInt(params.get('r'), 10) || (BIG_CITY ? 2 : 3); const RADIUS = parseInt(params.get('r'), 10) || (BIG_CITY ? 2 : 3);
const SHADOWS = params.has('shadows') ? params.get('shadows') !== '0' : !BIG_CITY; const SHADOWS = params.has('shadows') ? params.get('shadows') !== '0' : !BIG_CITY;
const canvas = document.getElementById('c'); const canvas = document.getElementById('c');