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

+7 -81
View File
@@ -114,97 +114,23 @@ test('pickGlobe asks the globe along the camera pick ray and returns geo', () =>
assert.equal(picker.pickGlobe(geo.cartesian2.create(1, 1)), undefined);
});
test('picks of movers and lines name their owner and instance', () => {
test('a follow-proxy top pick falls through to the first pick under it with an id', () => {
const viewer = createFakeViewer();
const billboard = { id: 'ae01ce' };
viewer.scene.pick = () => ({ primitive: billboard, id: 'ae01ce' });
viewer.scene.drillPick = () => [
{ primitive: billboard, id: 'ae01ce' },
{ primitive: {}, id: 'other' },
];
const { picker } = createCesiumPicker(viewer, {
identify: (raw) =>
raw.primitive === billboard ? { owner: 'flights', instance: 7 } : null,
});
const picked = picker.pick({ x: 1, y: 2 });
assert.equal(picked.id, 'ae01ce');
assert.equal(picked.owner, 'flights');
assert.equal(picked.instance, 7);
const drilled = picker.drillPick({ x: 1, y: 2 }, 5);
assert.equal(drilled[0].owner, 'flights');
assert.equal(drilled[1].owner, undefined);
});
test('picks of a mover set made with pickable: false are dropped', () => {
const viewer = createFakeViewer();
const quiet = { id: 'q' };
viewer.scene.pick = () => ({ primitive: quiet, id: 'q' });
viewer.scene.drillPick = () => [
{ primitive: quiet, id: 'q' },
{ primitive: {}, id: 'other' },
];
const { picker } = createCesiumPicker(viewer, {
identify: (raw) =>
raw.primitive === quiet
? { owner: 'quiet', instance: 0, pickable: false }
: null,
});
// The pick falls through to what is under the quiet set.
assert.equal(picker.pick({ x: 1, y: 2 }).id, 'other');
assert.deepEqual(
picker.drillPick({ x: 1, y: 2 }, 5).map(({ id }) => id),
['other'],
);
});
test('a filtered top pick falls through to the first pick under it with an id', () => {
const viewer = createFakeViewer();
const quiet = { primitive: 'quiet-billboard', id: 'q' };
const proxy = { primitive: 'proxy-point', id: { gevFollowProxy: true } };
const tile = { primitive: 'tileset', content: {} };
const flight = { primitive: 'flight-billboard', id: 'ae01ce' };
const { picker } = createCesiumPicker(viewer, {
identify: (picked) =>
picked === quiet
? { owner: 'quiet', instance: 0, pickable: false }
: picked === flight
? { owner: 'flights', instance: 3, pickable: true }
: null,
});
viewer.scene.pick = () => quiet;
viewer.scene.drillPick = () => [quiet, proxy, tile, flight];
const picked = picker.pick(geo.cartesian2.create(1, 1));
assert.equal(picked.id, 'ae01ce');
assert.equal(picked.owner, 'flights');
const { picker } = createCesiumPicker(viewer);
viewer.scene.pick = () => proxy;
viewer.scene.drillPick = () => [proxy, tile, flight];
assert.equal(picker.pick(geo.cartesian2.create(1, 1)).id, 'ae01ce');
assert.deepEqual(
picker.drillPick(geo.cartesian2.create(1, 1)).map((p) => p.primitive),
['tileset', 'flight-billboard'],
'the follow proxy and pickable: false sets are never picked',
'the follow proxy is never picked',
);
// Nothing under it with an id: the first kept result (a tile).
viewer.scene.drillPick = () => [quiet, tile];
viewer.scene.drillPick = () => [proxy, tile];
assert.equal(picker.pick(geo.cartesian2.create(1, 1)).primitive, 'tileset');
viewer.scene.pick = () => proxy;
viewer.scene.drillPick = () => [proxy];
assert.equal(picker.pick(geo.cartesian2.create(1, 1)), undefined);
});
test('drills leave out mover instances behind the horizon', () => {
const viewer = createFakeViewer();
const near = { primitive: 'near', id: 'n' };
const far = { primitive: 'far', id: 'f' };
const { picker } = createCesiumPicker(viewer, {
identify: (picked) => ({
owner: 'flights',
instance: picked === near ? 0 : 1,
}),
visible: (known) => known.instance === 0,
});
viewer.scene.drillPick = () => [far, near];
assert.deepEqual(
picker.drillPick(geo.cartesian2.create(1, 1)).map((p) => p.id),
['n'],
);
viewer.scene.pick = () => far;
assert.equal(picker.pick(geo.cartesian2.create(1, 1)).id, 'n');
});