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
+6
-11
@@ -104,11 +104,7 @@ function liveComponents() {
|
||||
}
|
||||
|
||||
// The page's application is created once; a switch detaches and attaches
|
||||
// only its engine-bound parts. `?switch=legacy` keeps the previous route, one
|
||||
// application per engine, for one release.
|
||||
const legacySwitch =
|
||||
new URLSearchParams(globalThis.location?.search ?? '').get('switch') ===
|
||||
'legacy';
|
||||
// only its engine-bound parts.
|
||||
|
||||
// Hand the session off and release the running engine. Its renderer is
|
||||
// parked for a later switch back.
|
||||
@@ -125,8 +121,7 @@ async function leave(from) {
|
||||
});
|
||||
renderers.retain(from);
|
||||
}
|
||||
if (legacySwitch) await application?.destroy();
|
||||
else if (attached) await application.detachScene({ handoff: true });
|
||||
if (attached) await application.detachScene({ handoff: true });
|
||||
session.count('detaches');
|
||||
}
|
||||
|
||||
@@ -134,10 +129,9 @@ async function leave(from) {
|
||||
// with the session attached and the address's view restored; its first frame
|
||||
// only decides when the cover goes (settle).
|
||||
async function enter(kind, { recovery = false } = {}) {
|
||||
if (legacySwitch) return enterLegacy(kind);
|
||||
if (!application || application.getState().status !== 'ready') {
|
||||
// The first engine never started: there is no application to attach to.
|
||||
return enterLegacy(kind);
|
||||
return enterNewApplication(kind);
|
||||
}
|
||||
layerSession.restoringView = true;
|
||||
try {
|
||||
@@ -180,8 +174,9 @@ async function resume(style) {
|
||||
}
|
||||
}
|
||||
|
||||
// The legacy route: a new application on the retained session.
|
||||
async function enterLegacy(kind) {
|
||||
// A new application on the retained session, for a page whose first engine
|
||||
// never started.
|
||||
async function enterNewApplication(kind) {
|
||||
const app = createApplication(kind, true);
|
||||
try {
|
||||
const { controls } = await app.start();
|
||||
|
||||
Reference in new issue
Block a user