mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-22 03:02: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
@@ -2859,13 +2859,13 @@ test('isBenignViewportDeleteError is false for non-error payloads and junk', ()
|
||||
test('hidden document yields no fresh frame — capture must not label a stale canvas Current', async () => {
|
||||
const originalDocument = globalThis.document;
|
||||
let requested = 0;
|
||||
const scene = {
|
||||
postRender: { addEventListener() { return () => {}; } },
|
||||
requestRender() { requested += 1; },
|
||||
const engine = {
|
||||
frames: { postRender: { addEventListener() { return () => {}; } } },
|
||||
render: { request() { requested += 1; } },
|
||||
};
|
||||
try {
|
||||
globalThis.document = { hidden: true };
|
||||
const fresh = await renderFreshCesiumFrame({ scene });
|
||||
const fresh = await renderFreshCesiumFrame(engine);
|
||||
assert.equal(fresh, false, 'hidden capture reports non-fresh');
|
||||
assert.equal(requested, 0, 'no secret render restart while hidden');
|
||||
} finally {
|
||||
@@ -2878,11 +2878,11 @@ test('visible document with a rendering scene reports a fresh frame', async () =
|
||||
try {
|
||||
globalThis.document = { hidden: false };
|
||||
let fire = null;
|
||||
const scene = {
|
||||
postRender: { addEventListener(listener) { fire = listener; return () => { fire = null; }; } },
|
||||
requestRender() { queueMicrotask(() => fire?.()); },
|
||||
const engine = {
|
||||
frames: { postRender: { addEventListener(listener) { fire = listener; return () => { fire = null; }; } } },
|
||||
render: { request() { queueMicrotask(() => fire?.()); } },
|
||||
};
|
||||
const fresh = await renderFreshCesiumFrame({ scene });
|
||||
const fresh = await renderFreshCesiumFrame(engine);
|
||||
assert.equal(fresh, true);
|
||||
} finally {
|
||||
globalThis.document = originalDocument;
|
||||
@@ -2895,11 +2895,11 @@ test('a tab switch during the bounded render wait invalidates freshness', async
|
||||
const doc = { hidden: false };
|
||||
globalThis.document = doc;
|
||||
let fire = null;
|
||||
const scene = {
|
||||
postRender: { addEventListener(listener) { fire = listener; return () => { fire = null; }; } },
|
||||
requestRender() { doc.hidden = true; queueMicrotask(() => fire?.()); },
|
||||
const engine = {
|
||||
frames: { postRender: { addEventListener(listener) { fire = listener; return () => { fire = null; }; } } },
|
||||
render: { request() { doc.hidden = true; queueMicrotask(() => fire?.()); } },
|
||||
};
|
||||
const fresh = await renderFreshCesiumFrame({ scene });
|
||||
const fresh = await renderFreshCesiumFrame(engine);
|
||||
assert.equal(fresh, false, 'freshness rechecked after the await');
|
||||
} finally {
|
||||
globalThis.document = originalDocument;
|
||||
|
||||
Reference in new issue
Block a user