mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +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
@@ -4,12 +4,6 @@ import assert from 'node:assert/strict';
|
||||
import * as Cesium from 'cesium';
|
||||
import * as cartographic from './cartographic.js';
|
||||
|
||||
const close = (a, b, tol, label) =>
|
||||
assert.ok(
|
||||
Math.abs(a - b) <= tol * Math.max(1, Math.abs(b)),
|
||||
`${label}: ${a} vs ${b}`,
|
||||
);
|
||||
|
||||
test('fromDegrees and fromRadians equal Cesium', () => {
|
||||
for (const [lon, lat, h] of [
|
||||
[0, 0, 0],
|
||||
@@ -30,29 +24,6 @@ test('fromDegrees and fromRadians equal Cesium', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('fromCartesian and toCartesian equal Cesium, including the centre case', () => {
|
||||
for (const [x, y, z] of [
|
||||
[1334762.2, -4654869.1, 4137287.9],
|
||||
[6378137, 0, 0],
|
||||
[0.01, 0, 0],
|
||||
]) {
|
||||
const ours = cartographic.fromCartesian({ x, y, z });
|
||||
const theirs = Cesium.Cartographic.fromCartesian(
|
||||
new Cesium.Cartesian3(x, y, z),
|
||||
);
|
||||
if (theirs === undefined) {
|
||||
assert.equal(ours, undefined);
|
||||
continue;
|
||||
}
|
||||
close(ours.longitude, theirs.longitude, 1e-12, 'lon');
|
||||
close(ours.latitude, theirs.latitude, 1e-12, 'lat');
|
||||
close(ours.height, theirs.height, 1e-9, 'h');
|
||||
const back = cartographic.toCartesian(ours);
|
||||
const cBack = Cesium.Cartographic.toCartesian(theirs);
|
||||
for (const k of ['x', 'y', 'z']) close(back[k], cBack[k], 1e-12, k);
|
||||
}
|
||||
});
|
||||
|
||||
test('result objects are reused', () => {
|
||||
const out = cartographic.create();
|
||||
assert.equal(cartographic.fromDegrees(1, 2, 3, out), out);
|
||||
|
||||
Reference in new issue
Block a user