feat(app): run gev on Navara behind ?engine=navara

The page's engine is ?engine=cesium|navara, else localStorage gev.engine,
else Cesium (src/app/engineChoice.js). Cesium mode is unchanged.

In Navara mode (src/app/navaraMode.js, loaded with import() only then,
and loading the Navara globe the same way) the scene builds the Navara
globe on the app container with no viewer; map stacks go through
engine.maps (Google 3D from the browser key, else Esri imagery); only the
shell's own data credits are registered. The layer catalog is empty and
the controls get empty layer stand-ins. The shell does not create its
viewer-bound parts (cockpit view, celestial ring, detection, tracked
readout, post-process stages); the tools install the render governor on
the engine, skip the director, annotations, drawing, imagery box, scope
mask, voice and embedded views, skip the first-run welcome, and show
"Experimental Navara engine: layers, cockpit, director and voice are
unavailable". window.__godsEyeView.viewer is null.

Navara's attribution card is kept clear of the location tray. A few
shell paths became null-safe for the missing viewer, layers or stages
without changing Cesium behaviour.

scripts/qa-engine-shell.mjs checks both modes headless: boot, viewer,
console errors, map drawn, search and fly, north/tilt/zoom/reset, orbit,
HUD, share link restore and map stacks.
This commit is contained in:
German Khokhlov committed 2026-10-15 20:56:16 +04:00
1 parent 306e3e9467
commit 4ded3fbf15
21 files changed
+776 -49

No files matched your search

+21
View File
@@ -7,10 +7,23 @@ import { createStandaloneControls } from './controls.js';
import { createStandaloneData } from './data.js';
import { createStandaloneTools } from './tools.js';
import { createGoogleTokenSource } from '../maps/googleTokens.js';
import { createLayerCatalog } from '../app/catalog.js';
import { resolveEngineKind } from '../app/engineChoice.js';
// The existing controls and layer catalog contain page-scoped state.
let constructed = false;
/** The page's engine choice: ?engine=, else the stored gev.engine, else Cesium. */
function pageEngineKind() {
let storage = null;
try {
storage = globalThis.localStorage ?? null;
} catch {
// Blocked storage reads as no stored choice.
}
return resolveEngineKind({ search: globalThis.location?.search, storage });
}
/** Compose the standalone application once per page. Reload to start again. */
export function createStandaloneApplication({
googleApiKey,
@@ -20,6 +33,7 @@ export function createStandaloneApplication({
sources = {},
streetLevelProviders,
allowQaRegistration = false,
engineKind = pageEngineKind(),
}) {
if (constructed)
throw new Error('The standalone application already owns this page');
@@ -47,7 +61,14 @@ export function createStandaloneApplication({
googleTokens: googleApiKey ? null : createGoogleTokenSource(),
cesiumToken,
loaderStatus,
engineKind,
});
// The experimental Navara engine runs without data layers: an empty
// catalog with the same interface.
if (engineKind === 'navara') {
catalog = createLayerCatalog([], []);
return scene;
}
catalog = createStandaloneCatalog({
sources,
streetLevelProviders,