mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 07:42:23 +00:00
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:
1 parent
c502404e1d
commit
7abf74518f
272 files changed
+4828
-10213
No files matched your search
@@ -93,35 +93,12 @@ test('sampleHeightDetailed: tiles from sampleHeight, else terrain; no tile size'
|
||||
source: 'tiles',
|
||||
});
|
||||
scene.sampleHeight = () => undefined;
|
||||
assert.deepEqual(surface.sampleHeightDetailed(place, { lod: 'finest' }), {
|
||||
assert.deepEqual(surface.sampleHeightDetailed(place), {
|
||||
height: 12.5,
|
||||
source: 'terrain',
|
||||
});
|
||||
assert.throws(
|
||||
() => surface.sampleHeightDetailed(place, { lod: 2 }),
|
||||
() => surface.sampleHeightDetailed(place, { exclude: 'x' }),
|
||||
TypeError,
|
||||
);
|
||||
});
|
||||
|
||||
test('an engine mover set in exclude is hidden for the sample, native objects pass', () => {
|
||||
const viewer = createFakeViewer();
|
||||
const collection = { show: true };
|
||||
const set = { id: 'flights' };
|
||||
const { surface } = createCesiumSurface(viewer, {
|
||||
engineExclude: (entry) => (entry === set ? collection : null),
|
||||
});
|
||||
const shownDuring = [];
|
||||
viewer.scene.sampleHeight = (position, excluded) => {
|
||||
shownDuring.push(collection.show, excluded);
|
||||
return 30;
|
||||
};
|
||||
const native = { primitive: 1 };
|
||||
const place = geo.cartographic.fromDegrees(20, 10, 0);
|
||||
assert.equal(surface.sampleHeight(place, [set, native]), 30);
|
||||
assert.deepEqual(shownDuring, [false, [native]]);
|
||||
assert.equal(collection.show, true, 'shown again after the sample');
|
||||
shownDuring.length = 0;
|
||||
surface.sampleHeightDetailed(place, { exclude: [set] });
|
||||
assert.deepEqual(shownDuring, [false, []]);
|
||||
assert.equal(collection.show, true);
|
||||
});
|
||||
Reference in new issue
Block a user