SoCal, the whole bay, a moon, and gates that actually run
Six agents in parallel, and the two city packs independently reported the same blocker: `focusRegions` and `coarseFactor` existed on the `City` type and nothing implemented them. Uniform lattices would have been 2.9M points for Southern California and 3.7M for the expanded bay. Both packs were unloadable as written. `buildAxis` is the answer, and it is honest about its limits: refinement is per axis, not per rectangle, so a focus region sharpens its whole row *and* its whole column. Two regions at opposite corners refine nearly everything between them. Measured, not guessed — the bay went 0.53M points with one region and 1.64M with three, for detail nobody is looking at from a board this wide. One region each, coarse factor ten, and the builds land at 3.8 s and 2.3 s. Then three things that were only ever right because San Francisco was the only city. `maxDistance: 340` and a 170-unit shadow box were constants tuned for a 230-unit board; the bay is 1003 units across and the camera physically could not retreat far enough to frame it. Fog distances were scene units pinned to the same assumption. And `minVisibilityM` defaulted to 4.5 km of honest weather, which over ninety-four kilometres of bay correctly hides three quarters of it — the night view was a black rectangle for a completely reasonable reason. All three now derive from the board. The moon is a real ephemeris and its light is a deliberate lie: 1.15, against a physical ratio of one to four hundred thousand. What is being reproduced is what a moonlit night looks like on a screen in a lit room. The CI gate caught itself, which is the part worth keeping. Port 8431 was already held by a server from an earlier session, so the boot check polled a healthy stranger while the process it started died on EADDRINUSE. It now refuses to run rather than pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,308 @@
|
||||
/**
|
||||
* Fabricated demo data, so that a clone of this repo has something on it.
|
||||
*
|
||||
* **Everything in this file is invented.** The companies do not exist, have
|
||||
* never existed, and are named the way they are — Wobbegong, Nonsuch, Pennyfarthing
|
||||
* — specifically so that nobody can mistake one for a real business. The
|
||||
* coordinates were typed by hand from a general sense of where San Francisco's
|
||||
* neighbourhoods are; none of them is anybody's address, and none of them came
|
||||
* out of a geocoder.
|
||||
*
|
||||
* That last point is the licence rule and not a stylistic preference. No real
|
||||
* company data ships in this repo, for two reasons that happen to want the same
|
||||
* thing. The privacy one is obvious: pipeline status — who is talking to whom,
|
||||
* who said no — is private, and a public repo is the wrong place for it. The
|
||||
* licence one is sharper and is the subject of ARCHITECTURE.md §3.2 and
|
||||
* CONTRACT.md §8: real positions are *geocoded*, and a geocoder built on
|
||||
* OpenStreetMap returns ODbL data. Serving a snapshot of those coordinates is
|
||||
* Publicly Using a Derivative Database, which drags share-alike onto everything
|
||||
* served alongside it, whether or not the rows live in the repo. So real markers
|
||||
* arrive at runtime over the API — see `http.ts` — carrying a provenance field
|
||||
* the server checks, and the repo itself ships this: fiction, which owes nobody
|
||||
* anything.
|
||||
*
|
||||
* The demo is worth having anyway. A map with no pins on it teaches nobody what
|
||||
* the thing is for, and half the interesting behaviour in `markers.ts` — the
|
||||
* ghost treatment for a marker that has no real position yet — is invisible
|
||||
* without data that exercises it.
|
||||
*/
|
||||
|
||||
import type { SimRoute } from "../engine/flights.ts";
|
||||
import type { Marker, MarkerPalette } from "../engine/types.ts";
|
||||
|
||||
/**
|
||||
* A small pipeline, as colours.
|
||||
*
|
||||
* Five states is about the fewest that still shows why `colorKey` is opaque to
|
||||
* the engine: none of these words means anything to `markers.ts`, which looks
|
||||
* the key up here and draws whatever it finds. A public sector map would supply
|
||||
* an entirely different set against the same renderer.
|
||||
*/
|
||||
export const SAMPLE_PALETTE: MarkerPalette = {
|
||||
watching: 0x7f8b99,
|
||||
applied: 0x4f9cf2,
|
||||
talking: 0x3fbf9a,
|
||||
offer: 0xf2b134,
|
||||
closed: 0xd2544f,
|
||||
};
|
||||
|
||||
/**
|
||||
* Where the unplaced markers float: out over the bay, east of the Ferry
|
||||
* Building, in a short arc.
|
||||
*
|
||||
* A marker with `located: false` has no address yet, and the honest thing to do
|
||||
* with a position you do not have is to not pretend you have one. Open water is
|
||||
* the clearest way to say that on a map — nothing is there, the pin visibly
|
||||
* stands on nothing, and it cannot be misread as a building. `markers.ts` gives
|
||||
* these a different silhouette and a lower opacity as well, so the tell does not
|
||||
* rest on placement alone.
|
||||
*/
|
||||
const UNPLACED_LNG = -122.3665;
|
||||
|
||||
/**
|
||||
* Twenty-two invented companies across San Francisco.
|
||||
*
|
||||
* Placed by neighbourhood rather than by street: Hayes Valley and SoMa are
|
||||
* crowded because that is the fact the map is usually drawing attention to, the
|
||||
* Bayview and the Richmond have one each, and three have no position at all.
|
||||
* The clustering is the point — a marker layer that only ever gets evenly
|
||||
* scattered test data hides every overlap problem it has.
|
||||
*/
|
||||
export const SAMPLE_MARKERS: Marker[] = [
|
||||
// Hayes Valley and the bowl below Buena Vista.
|
||||
{
|
||||
id: "sample-thimbleway",
|
||||
label: "Thimbleway Systems",
|
||||
colorKey: "talking",
|
||||
lat: 37.7768,
|
||||
lng: -122.4243,
|
||||
located: true,
|
||||
blurb: "Invented. Model-serving, allegedly, in a Victorian with bad wiring.",
|
||||
},
|
||||
{
|
||||
id: "sample-nonsuch",
|
||||
label: "Nonsuch Cartography Co.",
|
||||
colorKey: "applied",
|
||||
lat: 37.7752,
|
||||
lng: -122.4262,
|
||||
located: true,
|
||||
blurb: "Invented. Maps of places that are not there.",
|
||||
},
|
||||
{
|
||||
id: "sample-marmalade",
|
||||
label: "Marmalade Interchange",
|
||||
colorKey: "watching",
|
||||
lat: 37.7781,
|
||||
lng: -122.4218,
|
||||
located: true,
|
||||
blurb: "Invented. Moves data between two formats nobody uses.",
|
||||
},
|
||||
|
||||
// SoMa, where the grid turns forty-six degrees.
|
||||
{
|
||||
id: "sample-kettle-anvil",
|
||||
label: "Kettle & Anvil Compute",
|
||||
colorKey: "offer",
|
||||
lat: 37.7805,
|
||||
lng: -122.4051,
|
||||
located: true,
|
||||
blurb: "Invented. Sells the shovels, or claims to.",
|
||||
},
|
||||
{
|
||||
id: "sample-ninth-pelican",
|
||||
label: "Ninth Pelican Labs",
|
||||
colorKey: "applied",
|
||||
lat: 37.7784,
|
||||
lng: -122.4009,
|
||||
located: true,
|
||||
blurb: "Invented. There were never eight others.",
|
||||
},
|
||||
{
|
||||
id: "sample-brassbound",
|
||||
label: "Brassbound Telemetry",
|
||||
colorKey: "closed",
|
||||
lat: 37.7822,
|
||||
lng: -122.4074,
|
||||
located: true,
|
||||
blurb: "Invented. Went quiet after the second call.",
|
||||
},
|
||||
|
||||
// The Financial District and Jackson Square.
|
||||
{
|
||||
id: "sample-grimsby-doone",
|
||||
label: "Grimsby & Doone Photonics",
|
||||
colorKey: "watching",
|
||||
lat: 37.7941,
|
||||
lng: -122.4008,
|
||||
located: true,
|
||||
blurb: "Invented. Two surnames and a laser.",
|
||||
},
|
||||
{
|
||||
id: "sample-tugboat",
|
||||
label: "Tugboat Actuarial",
|
||||
colorKey: "applied",
|
||||
lat: 37.7958,
|
||||
lng: -122.4032,
|
||||
located: true,
|
||||
blurb: "Invented. Insurance for things that have already happened.",
|
||||
},
|
||||
|
||||
// Mission Bay: landfill, then biotech.
|
||||
{
|
||||
id: "sample-fogbank",
|
||||
label: "Fogbank Freight",
|
||||
colorKey: "talking",
|
||||
lat: 37.7709,
|
||||
lng: -122.3918,
|
||||
located: true,
|
||||
blurb: "Invented. Logistics, in a building younger than most of the staff.",
|
||||
},
|
||||
{
|
||||
id: "sample-bittern",
|
||||
label: "Bittern & Sons Biologics",
|
||||
colorKey: "watching",
|
||||
lat: 37.7688,
|
||||
lng: -122.3894,
|
||||
located: true,
|
||||
blurb: "Invented. No sons.",
|
||||
},
|
||||
|
||||
// The Mission, flat and sunny.
|
||||
{
|
||||
id: "sample-unlikely-weather",
|
||||
label: "Bureau of Unlikely Weather",
|
||||
colorKey: "offer",
|
||||
lat: 37.7602,
|
||||
lng: -122.4151,
|
||||
located: true,
|
||||
blurb: "Invented. Forecasts nobody asked for.",
|
||||
},
|
||||
{
|
||||
id: "sample-perpetual-bagel",
|
||||
label: "Perpetual Bagel Works",
|
||||
colorKey: "closed",
|
||||
lat: 37.7574,
|
||||
lng: -122.4192,
|
||||
located: true,
|
||||
blurb: "Invented. The name was the whole pitch.",
|
||||
},
|
||||
|
||||
// Potrero Hill and Dogpatch, the old industrial edge.
|
||||
{
|
||||
id: "sample-wobbegong",
|
||||
label: "Wobbegong Robotics",
|
||||
colorKey: "talking",
|
||||
lat: 37.7589,
|
||||
lng: -122.4002,
|
||||
located: true,
|
||||
blurb: "Invented. Named after a carpet shark, for reasons never explained.",
|
||||
},
|
||||
{
|
||||
id: "sample-sourdough-semi",
|
||||
label: "Sourdough Semiconductor",
|
||||
colorKey: "applied",
|
||||
lat: 37.7597,
|
||||
lng: -122.3881,
|
||||
located: true,
|
||||
blurb: "Invented. A fab in a city with no fabs.",
|
||||
},
|
||||
{
|
||||
id: "sample-pennyfarthing",
|
||||
label: "Pennyfarthing Power",
|
||||
colorKey: "watching",
|
||||
lat: 37.7564,
|
||||
lng: -122.3973,
|
||||
located: true,
|
||||
blurb: "Invented. Batteries, uphill.",
|
||||
},
|
||||
|
||||
// The north side and the hills.
|
||||
{
|
||||
id: "sample-lamplighter",
|
||||
label: "Lamplighter Aerostatics",
|
||||
colorKey: "watching",
|
||||
lat: 37.8004,
|
||||
lng: -122.4086,
|
||||
located: true,
|
||||
blurb: "Invented. Airships, which are always about to come back.",
|
||||
},
|
||||
{
|
||||
id: "sample-halfpenny",
|
||||
label: "Halfpenny Optics",
|
||||
colorKey: "applied",
|
||||
lat: 37.7929,
|
||||
lng: -122.4147,
|
||||
located: true,
|
||||
blurb: "Invented. Lenses, four hundred feet above the water they look at.",
|
||||
},
|
||||
|
||||
// One each in the parts of the city the map usually forgets.
|
||||
{
|
||||
id: "sample-cormorant",
|
||||
label: "Cormorant Freight Systems",
|
||||
colorKey: "talking",
|
||||
lat: 37.7357,
|
||||
lng: -122.3908,
|
||||
located: true,
|
||||
blurb: "Invented. The only pin south of Islais Creek, which is the point.",
|
||||
},
|
||||
{
|
||||
id: "sample-tidewrack",
|
||||
label: "Tidewrack Instruments",
|
||||
colorKey: "watching",
|
||||
lat: 37.7802,
|
||||
lng: -122.4638,
|
||||
located: true,
|
||||
blurb: "Invented. Sensors, in the fog, on purpose.",
|
||||
},
|
||||
|
||||
// Three with no position yet. See `UNPLACED_LNG`.
|
||||
{
|
||||
id: "sample-quibble",
|
||||
label: "Quibble Quantum",
|
||||
colorKey: "applied",
|
||||
lat: 37.7965,
|
||||
lng: UNPLACED_LNG,
|
||||
located: false,
|
||||
blurb: "Invented, and unplaced: no address on file, so the map does not invent one.",
|
||||
},
|
||||
{
|
||||
id: "sample-antelope-foundry",
|
||||
label: "Antelope Foundry",
|
||||
colorKey: "watching",
|
||||
lat: 37.7905,
|
||||
lng: UNPLACED_LNG,
|
||||
located: false,
|
||||
blurb: "Invented, and unplaced.",
|
||||
},
|
||||
{
|
||||
id: "sample-mudlark",
|
||||
label: "Mudlark Instruments",
|
||||
colorKey: "closed",
|
||||
lat: 37.7845,
|
||||
lng: UNPLACED_LNG,
|
||||
located: false,
|
||||
blurb: "Invented, and unplaced.",
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* Sample traffic, for when the API is not there to send a flight plan.
|
||||
*
|
||||
* The corridors are roughly the real ones — arrivals down the peninsula from
|
||||
* the north, departures turning out over the Pacific, a slow light aircraft
|
||||
* crossing the bay — because that is what makes the sky read as this city's sky
|
||||
* rather than as random motion. The callsigns are not: no real operator uses
|
||||
* these prefixes, which keeps a demo from looking like a feed of actual
|
||||
* traffic. Nothing here is observed, and `flights.ts` explains at length why
|
||||
* this project ships a simulator instead of a client for somebody's live data.
|
||||
*/
|
||||
export const SAMPLE_ROUTES: SimRoute[] = [
|
||||
{ callsign: "NIMBUS 4", from: [37.95, -122.36], to: [37.66, -122.4], fromAlt: 2400, toAlt: 500, duration: 190 },
|
||||
{ callsign: "NIMBUS 17", from: [37.93, -122.31], to: [37.65, -122.38], fromAlt: 2100, toAlt: 450, duration: 210 },
|
||||
{ callsign: "PELICAN 2", from: [37.64, -122.39], to: [37.9, -122.62], fromAlt: 700, toAlt: 5200, duration: 165 },
|
||||
{ callsign: "PELICAN 31", from: [37.7, -122.21], to: [37.88, -122.55], fromAlt: 1800, toAlt: 6100, duration: 230 },
|
||||
{ callsign: "CORMORANT 8", from: [37.62, -122.6], to: [37.95, -122.28], fromAlt: 6800, toAlt: 8200, duration: 260 },
|
||||
{ callsign: "KESTREL 5", from: [37.83, -122.56], to: [37.7, -122.22], fromAlt: 1100, toAlt: 1300, duration: 300 },
|
||||
{ callsign: "NIMBUS 40", from: [37.96, -122.48], to: [37.63, -122.36], fromAlt: 3100, toAlt: 600, duration: 205 },
|
||||
];
|
||||
Reference in New Issue
Block a user