feat: one California becomes a board you can descend into
Three changes, and the first is the one that mattered. `orbitMinDistance` was `boardSpan * 0.02`. On the Bay Area that is 20.1 units of 94.3 m — 1.89 km, the range every close photograph of this product was taken at. On the merged board the same rule is 11.1 units of 1,919 m, which is 21.3 km: eleven times further out, on the one board that carries both metros' districts, landmarks and bridges. The floor is a fraction of board *size*, and board size is exactly what `unify.ts` changed without changing what stands on it — so the merged board could never resolve a city no matter what the level of detail did, because the camera was not allowed to arrive. A board that carries `detail` districts now floors on true metres instead. Boards without them keep the span rule, which is right for an atlas. The metro chapters come back. They were merged, photographed and reverted at `64618cb`, and the recorded reason was specific and true: the corridor's 4.7 km atlas glyph filled every close frame. `23e4bb8` — the next commit — added `overviewLayers`, which withdraws that glyph inside `DETAIL_STANDOFF_M`, naming that same photograph. The blocker was gone and nobody came back for the rungs it had blocked. Each rung is restated in this board's units: `distance` on `latScale` alone, `height` carrying the exaggeration ratio as well, or the camera arrives at the right altitude over relief drawn 2.6x taller and every authored angle flattens. And with `?one=1` there is one entry in `CITIES`. That is what makes the merge a board rather than a nicer tier on a three-board product: every ladder rung's `board` is `california`, so `goToPlace` never switches; the two doors stop intercepting clicks and fly their authored poses; and `DEFAULT_CITY_ID` is the one board that exists. Without the flag nothing moves, which keeps the capture guards and every budget cell aiming at the boards they were written against. Measured, all twelve budget cells PASS. `california-one` reads 355,859 triangles and 415 draws against 400,000 / 460 — unchanged from the 352,927 / 420 recorded when the board landed. No cap was raised. What this does NOT fix, photographed rather than assumed: at FiDi's 7.7 km the camera is inside the terrain, and at the Bay's 45 km the ground is visibly faceted. Both are one cause — `verticalExaggeration` is a per-board constant, correctly derived at 15x for framing the whole state, and a board you can traverse from 1,551 km to 7.7 km cannot hold it constant. See TODO.md.
This commit is contained in:
+57
-7
@@ -239,11 +239,36 @@ import type { PresenceIndicator } from "./realtime/presenceIndicator.ts";
|
||||
*/
|
||||
const ONE_CALIFORNIA = new URLSearchParams(location.search).get("one") === "1";
|
||||
|
||||
const CITIES: { id: string; label: string; city: City }[] = [
|
||||
{ id: "california", label: "California", city: ONE_CALIFORNIA ? unifiedCalifornia().city : CALIFORNIA },
|
||||
{ id: "sf", label: "Bay Area", city: SAN_FRANCISCO },
|
||||
{ id: "socal", label: "SoCal", city: SOCAL },
|
||||
];
|
||||
/**
|
||||
* The boards on offer — three, or **one**.
|
||||
*
|
||||
* With `?one=1` this is a single entry, and that is the whole of what makes the
|
||||
* merged board a *board* rather than a nicer statewide tier on a three-board
|
||||
* product. Everything downstream that decides "is this somewhere else" reads
|
||||
* this array:
|
||||
*
|
||||
* - `LADDER` is built from it, so every rung's `board` is `california` and
|
||||
* `goToPlace`'s `rung.board !== cityId` switch never fires. Clicking FiDi
|
||||
* moves the camera instead of tearing the board down and building another.
|
||||
* - `PREFETCH_TIERS` and the handover rule get one tier, so there is no
|
||||
* handover: nothing to promote to, nothing to demote from, and no cut to
|
||||
* conceal with a fog dip.
|
||||
* - The office return links and `?city=` fall back to the one board that
|
||||
* exists rather than to a board the visitor was never on.
|
||||
*
|
||||
* The metro packs are still imported and still merged — `unifiedCalifornia()`
|
||||
* reads both — they simply stop being *destinations*. Without the flag nothing
|
||||
* here moves, which is what keeps the twenty-nine capture guards and every cell
|
||||
* of `scripts/performance-budget.mjs` aiming at the boards they were written
|
||||
* against.
|
||||
*/
|
||||
const CITIES: { id: string; label: string; city: City }[] = ONE_CALIFORNIA
|
||||
? [{ id: "california", label: "California", city: unifiedCalifornia().city }]
|
||||
: [
|
||||
{ id: "california", label: "California", city: CALIFORNIA },
|
||||
{ id: "sf", label: "Bay Area", city: SAN_FRANCISCO },
|
||||
{ id: "socal", label: "SoCal", city: SOCAL },
|
||||
];
|
||||
|
||||
/**
|
||||
* The board a bare URL lands on. **The detailed one, not the state tier.**
|
||||
@@ -277,7 +302,14 @@ const CITIES: { id: string; label: string; city: City }[] = [
|
||||
* `?city=california` still goes straight to the state board, and nothing about
|
||||
* the deep link changed.
|
||||
*/
|
||||
const DEFAULT_CITY_ID = "sf";
|
||||
/*
|
||||
* With one board there is nothing to choose: the argument above is entirely
|
||||
* about which of three products a bare URL lands on, and `?one=1` is the answer
|
||||
* that there are not three. The landing *pose* is a separate question and still
|
||||
* belongs to the chapter list — `california-overview` frames the state, and the
|
||||
* metro rungs restored in `cities/unify.ts` are how you get down from it.
|
||||
*/
|
||||
const DEFAULT_CITY_ID = ONE_CALIFORNIA ? "california" : "sf";
|
||||
|
||||
/** The corridor's scale doors, and the office each detailed board arrives near. */
|
||||
const CALIFORNIA_DESTINATIONS = new Map<string, { cityId: string; officeId: string }>([
|
||||
@@ -5210,7 +5242,25 @@ function flyToChapter(viewId: string) {
|
||||
renderChrome();
|
||||
}
|
||||
else {
|
||||
const destination = cityId === "california" ? CALIFORNIA_DESTINATIONS.get(view.id) : undefined;
|
||||
/*
|
||||
* A door is a door only while there is somewhere else to go.
|
||||
*
|
||||
* `los-angeles` and `san-francisco` carry real authored poses — 38 units at
|
||||
* 26 of height, which is a 73 km stand-off over the city — and on the three
|
||||
* -board product those poses are never used, because this line intercepts
|
||||
* the click and switches boards instead. On the merged board both cities
|
||||
* are *on this board*, so the interception is what stops you looking at
|
||||
* them: it is the reason a visitor who clicks SF ends up somewhere the
|
||||
* merged board is not.
|
||||
*
|
||||
* Left alone, the fall-through below flies the authored pose, and the
|
||||
* offices stay reachable the way they already are on every other board —
|
||||
* the amber pins, which `scene.ts` gates on the board's own bounds and the
|
||||
* merged board's bounds contain both.
|
||||
*/
|
||||
const destination = cityId === "california" && !ONE_CALIFORNIA
|
||||
? CALIFORNIA_DESTINATIONS.get(view.id)
|
||||
: undefined;
|
||||
if (destination) {
|
||||
requestControlMode("overview");
|
||||
officeId = destination.officeId;
|
||||
|
||||
Reference in New Issue
Block a user