fix: the five things integration found, and a cell that stands on the worst pose
The integration analysis built the actual combination of both tracks rather than adding up their reports, and found five defects plus one structural gap. All six are addressed here. **The detail normal map now follows its material into disposal.** `Material.dispose()` frees the material and not its maps — the same arithmetic `stage.ts` records for the renderer one level up — and `scene.ts`'s teardown traverses geometry and material only. Every board build was orphaning two 512-square RGBA textures on the GL context, about 2.8 MB with mips each, on a cache that retains three boards and rebuilds on every switch. `structures.ts` already had the idiom for its road canvases; copied rather than reinvented. **`TerrainOptions.detail` is `surfaceDetail`.** `createTerrain` reads `district.detail` nineteen lines below it — an unrelated flag meaning "metro lots, revealed by stand-off" — and the two are the gates for two different level-of-detail systems in one function, one of which decides whether the terrain is chunked at all. The test files had both spellings meaning both things. **The instrument stopped lying.** `store.tier` is an index and is always valid, because the coarse fill gives base districts an entry at every rung; at a pose with metro detail switched off the budget scan finds the visible base districts fit at the finest rung and sets it to 0. So `cost-at`'s new lot column printed "40 m" for a board drawing nothing but 806 m base lots — an instrument lying in the direction of "the fine rung is cheap", which is the direction that gets a budget spent that is not there. `detailTier` is `null` unless a detail district is actually drawn. **Two doc comments carried wrong numbers**, which is the defect this repo's house style exists to prevent. Capacity is exactly 19,000, not "about 26,000" — measured. And `LOT_BUDGET`'s guarantee is a bound on the *city*, not on the frame: the non-city cost is not a constant and nothing enforces it, reaching 288,365 at LA from 110 km. **And `california-one-basin`.** `california-one` is judged at the whole state from 1,551 km — the pose where the terrain grid saves nothing and the city is off. Every expensive pose this product has is somewhere else, and that was not hypothetical: six poses over the LA basin measured over the cap, one at 761,648, all reachable from the board's own chapters for as long as the merged board has existed. A cap nobody measures is not a cap. Eleven kilometres because the ladder makes the worst pose an interior one, not the closest: 12 / 11.5 / 11 / 10.5 / 10 / 7.7 km reads 340,328 / 390,598 / 390,578 / 390,578 / 387,428 / 375,172. A cell at 2.5 km or at 7.7 km would have watched the wrong thing. Its caps are `california-one`'s own rather than recorded from this run, because the question is not "has this pose regressed" but "is this board still inside the budget it claims".
This commit is contained in:
+15
-3
@@ -2782,12 +2782,24 @@ function publishCameraHook(record: MountedBoard): void {
|
||||
});
|
||||
const mesh = found[0];
|
||||
if (mesh === undefined) return null;
|
||||
const store = mesh.userData.detail as { tier?: number } | undefined;
|
||||
const store = mesh.userData.detail as
|
||||
| { tier?: number; detailTier?: number | null }
|
||||
| undefined;
|
||||
/*
|
||||
* `detailTier` and not `tier`, because they answer different questions and
|
||||
* only one of them is the one being asked. `tier` is an index and is
|
||||
* always valid; `detailTier` is `null` at a pose where no metro detail is
|
||||
* drawn at all. Reporting `tier` printed "40 m" at the whole-board pose,
|
||||
* on a board drawing nothing but 806 m base lots — an instrument lying in
|
||||
* the direction of "the fine rung is cheap", which is precisely the
|
||||
* direction that would get somebody to spend a budget they do not have.
|
||||
*/
|
||||
const drawn = store?.detailTier ?? null;
|
||||
return {
|
||||
packed: mesh.count,
|
||||
capacity: (mesh.instanceMatrix.array.length / 16) | 0,
|
||||
tier: store?.tier ?? null,
|
||||
lotMetres: store === undefined ? null : detailLotMetres(store.tier ?? 0),
|
||||
tier: drawn,
|
||||
lotMetres: drawn === null ? null : detailLotMetres(drawn),
|
||||
};
|
||||
},
|
||||
board: record.id,
|
||||
|
||||
Reference in New Issue
Block a user