refactor(map): split foundry workspace and cesium runtime

This commit is contained in:
Codex
2026-08-09 19:22:25 +03:00
parent 6c1265b8b6
commit b70e165910
39 changed files with 5959 additions and 4225 deletions
+28 -25
View File
@@ -315,29 +315,32 @@ test("grid center is fixed and camera-independent, including for legacy camera-m
});
test("renderer uses fixed ENU sectors, angular graticules and a non-blank double-buffer swap", async () => {
const source = await readFile(new URL("../apps/catalog/src/CesiumMapRenderer.tsx", import.meta.url), "utf8");
assert.match(source, /class GridLayerController/);
assert.match(source, /dataSourceDisplay\.ready/);
assert.match(source, /fixedGridOrigin\(presentation\)/);
assert.match(source, /Transforms\.eastNorthUpToFixedFrame\(anchor\)/);
assert.match(source, /localSectorAt\(/);
assert.match(source, /gridController\?\.pick\(worldPosition\)/);
assert.match(source, /lod\.stepKm \* 1_000/);
assert.match(source, /lod\.graticuleStepDegrees/);
assert.match(source, /lod\.graticuleLineWidthPx/);
assert.match(source, /arcType: ArcType\.RHUMB/);
assert.match(source, /clampToGround: false/);
assert.match(source, /majorLineWidthMultiplier/);
assert.match(source, /isLocalMajorLineIndex/);
assert.match(source, /isGraticuleMajorLineValue/);
assert.match(source, /new LabelCollection\(\)/);
assert.match(source, /const maximumLabels = 48/);
assert.match(source, /materializeLocalSelection/);
assert.match(source, /localVolumeAt\(/);
assert.match(source, /focusGridSector/);
assert.match(source, /selectedGridSector/);
assert.match(source, /mountResources\(resources\)[\s\S]*?const previous = this\.current;[\s\S]*?removeResources\(previous\.resources\)/);
assert.doesNotMatch(source, /function rebuildElevatedGrid[\s\S]*?entities\.removeAll\(\)/);
assert.doesNotMatch(source, /Math\.min\(40,[\s\S]*?safeRadiusKm \/ safeStepKm/);
assert.doesNotMatch(source, /snapGridCenter\(/);
const [renderer, gridLayer] = await Promise.all([
readFile(new URL("../apps/catalog/src/CesiumMapRenderer.tsx", import.meta.url), "utf8"),
readFile(new URL("../apps/catalog/src/mapCesiumGridLayer.ts", import.meta.url), "utf8"),
]);
assert.match(gridLayer, /class GridLayerController/);
assert.match(gridLayer, /dataSourceDisplay\.ready/);
assert.match(gridLayer, /fixedGridOrigin\(presentation\)/);
assert.match(gridLayer, /Transforms\.eastNorthUpToFixedFrame\(anchor\)/);
assert.match(gridLayer, /localSectorAt\(/);
assert.match(renderer, /gridController\?\.pick\(worldPosition\)/);
assert.match(gridLayer, /lod\.stepKm \* 1_000/);
assert.match(gridLayer, /lod\.graticuleStepDegrees/);
assert.match(gridLayer, /lod\.graticuleLineWidthPx/);
assert.match(gridLayer, /arcType: ArcType\.RHUMB/);
assert.match(gridLayer, /clampToGround: false/);
assert.match(gridLayer, /majorLineWidthMultiplier/);
assert.match(gridLayer, /isLocalMajorLineIndex/);
assert.match(gridLayer, /isGraticuleMajorLineValue/);
assert.match(gridLayer, /new LabelCollection\(\)/);
assert.match(gridLayer, /const maximumLabels = 48/);
assert.match(gridLayer, /materializeLocalSelection/);
assert.match(gridLayer, /localVolumeAt\(/);
assert.match(renderer, /focusGridSector/);
assert.match(renderer, /selectedGridSector/);
assert.match(gridLayer, /mountResources\(resources\)[\s\S]*?const previous = this\.current;[\s\S]*?removeResources\(previous\.resources\)/);
assert.doesNotMatch(gridLayer, /function rebuildElevatedGrid[\s\S]*?entities\.removeAll\(\)/);
assert.doesNotMatch(gridLayer, /Math\.min\(40,[\s\S]*?safeRadiusKm \/ safeStepKm/);
assert.doesNotMatch(gridLayer, /snapGridCenter\(/);
});