Cut duplicated and dead code across the engines, the layers and the QA scripts

- src/geo drops the ported debug argument checks and the tests that
  bitExact already covers; package boundaries accept a directory entry,
  so src/geo/ is listed once per group.
- Cesium no longer carries movers and lines nobody draws with: they are
  optional engine capabilities. The fake engine and the Cesium camera use
  the shared cameraMath; unused contract tables, clock.ticked, the
  'finest' surface detail and Navara click statistics are gone.
- ALPR keeps one overlay core and one presentation model for both
  engines, bikeshare one station bookkeeping, the Navara ground effects
  one definition helper; image atlases, view centres, mover banks and
  colours are shared.
- The legacy switch route, the clock offset and rate controls and other
  unused exports are removed.
- The acceptance runs the Navara draw, geo import and scope checks;
  scenarios use the harness switch and page helpers; the main chunk
  check keeps the size budget only and runs once in CI.
This commit is contained in:
German Khokhlov committed 2026-11-05 13:32:39 +04:00
1 parent c502404e1d
commit 7abf74518f
272 files changed
+4828 -10213

No files matched your search

+1 -47
View File
@@ -146,57 +146,11 @@ test('the engine clock is the app clock given, latched on the viewer clock tick'
const viewer = createFakeViewer();
const engine = createCesiumEngine(viewer, { appClock });
assert.equal(engine.clock.now(), 1_000_000);
const seen = [];
engine.clock.ticked.addEventListener((time) => seen.push(time));
assert.equal(viewer.clock.onTick.numberOfListeners, 1);
wall += 16;
viewer.clock.onTick.raiseEvent(viewer.clock);
assert.deepEqual(seen, [1_000_016]);
wall += 5;
assert.equal(engine.clock.frameTime(), 1_000_016);
engine.destroy();
assert.equal(viewer.clock.onTick.numberOfListeners, 0);
});
test('picks leave out mover instances behind the horizon and the follow proxy', async () => {
const geo = await import('../../geo/index.js');
const viewer = createFakeViewer();
const engine = createCesiumEngine(viewer, { requestRender: () => {} });
try {
const set = engine.movers.createSet({
id: 'horizon-points',
pickable: true,
kind: 'point',
capacity: 2,
point: { sizePx: 8 },
});
// The fake camera is at x = 7e6 (over 0°, 0°): 0°E is in front, 180° behind.
set.set(0, { position: geo.cartesian3.fromDegrees(0, 1, 0) });
set.set(1, { position: geo.cartesian3.fromDegrees(180, 1, 0) });
set.setCount(2);
set.commit();
const [front, back] = viewer.primitiveList.flatMap((root) =>
collectPoints(root),
);
viewer.scene.drillPick = () => [
{ primitive: back, id: 'back' },
{ primitive: front, id: 'front' },
];
assert.deepEqual(
engine.picker.drillPick({ x: 1, y: 1 }).map(({ id }) => id),
['front'],
);
} finally {
engine.destroy();
}
});
// The PointPrimitives under a primitive collection tree.
function collectPoints(collection) {
const out = [];
for (let i = 0; i < (collection.length ?? 0); i++) {
const item = collection.get(i);
if (item instanceof Cesium.PointPrimitive) out.push(item);
else if (item?.length !== undefined) out.push(...collectPoints(item));
}
return out;
}