Move scene effects and imported geometry behind the globe contract

Move Cesium viewer, map, sky, projection, trail and sonar internals into
its engine. Drive styles, bloom, sharpening and contact sonar through
engine.render. Count camera-input suspensions across all three engines
and migrate the feature callers. Preserve Cesium's effects and input
behaviour; fix transit lens clicks on Cesium and make zero sharpening on
Navara disable sharpening, as it does on Cesium.

Parse imported files into plain records and draw them through movers,
lines, ground and imagery on both engines. Follow Cesium's KML style
precedence, preserve local KMZ images and frame the drawable records.
Open overlays use imagery when the engine has no native map-overlay API.
Run every imported-display case on fake and headless Cesium engines.

The shared import path retains these known differences from Cesium's old
DataSources: wall fills, extruded prisms and gx:LatLonQuad are undrawn;
raised polygon fills drape while outlines retain altitude; GroundOverlay
rotation, altitude and RGB tint are not applied; rhumb lines become great
circles. Ground heights use the loaded surface synchronously instead of
waiting for most-detailed sampling. Supported KMZ ground overlays now
draw on Navara too. Document the limits rather than claiming full parity.

Combine batches B and C because their disjoint path manifests cannot
place the shared boundary and format files in a later commit while
keeping B independently valid. This combined commit owns the shared
docs, package boundaries, format scope, locale catalogs and coupling
baseline. Remove five obsolete import strings from all eleven catalogs.
Make the load-time source scan include new files and skip deleted paths
so the same checks work before and after recording the moves.

Coupling: Navara renderer lines fall from 1695 to 1294, Cesium import
files from 25 to 9, viewer lines from 1177 to 1026, SDK loads from 4 to 3
and engine-name lines from 62 to 42. No count grows.

The full unit suite and the boundary, format and coupling checks pass.
Browser validation remains to be run.

Browser checks to run
GOOGLE_MAPS_API_KEY= CESIUM_ION_TOKEN= npm run dev -- --port 4291
node scripts/qa-contract-suite.mjs http://localhost:4291
node scripts/qa-navara-visual-styles.mjs http://localhost:4291
node scripts/qa-navara-bloom.mjs http://localhost:4291
node scripts/qa-navara-sonar.mjs http://localhost:4291
QA_BASE_URL=http://localhost:4291 node scripts/qa-visual-effects.mjs
QA_BASE_URL=http://localhost:4291 node scripts/qa-zoom-out-guard.mjs
node scripts/qa-sky-model-lighting.mjs --url http://localhost:4291
node scripts/qa-geo-import.mjs http://localhost:4291
node scripts/qa-geo-import-regressions.mjs http://localhost:4291
node scripts/qa-geo-import-large.mjs http://localhost:4291
node scripts/qa-navara-geo-import.mjs http://localhost:4291

Use the keyless server for every check. Photoreal-only cases remain
unverified; do not enable paid tiles to run them.
This commit is contained in:
German Khokhlov committed 2026-11-07 12:45:21 +04:00
1 parent c079b329d0
commit 97c4dc76ce
130 files changed
+4763 -3495

No files matched your search

+7 -7
View File
@@ -19,7 +19,7 @@ import {
isScopeMaskEnabled,
} from '../scopeMask.js';
import { KEYHOLE_OUTER_RADIUS } from '../celestialRing.js';
import { installGlobeInViewRecovery } from './viewer.js';
import { installGlobeInViewRecovery } from '../globe/cesium/viewer.js';
import { installLayerReleaseTrim } from '../sceneCommandRelease.js';
import {
installRenderGovernor,
@@ -272,7 +272,6 @@ function cesiumToolBackend({ engine, tileset }) {
viewer,
board: () => ({ viewer, engine, tileset }),
draw: () => ({ viewer, engine }),
geoImport: () => ({ viewer, engine }),
// The tileset lets the layer drape while the globe is hidden.
recentImagery(layer) {
layer.attachTileset(tileset);
@@ -336,8 +335,8 @@ function cesiumToolBackend({ engine, tileset }) {
* Import, the Recent Imagery box and panel, the render governor, the scope
* mask, hidden-tab handling and voice, and the engine's own tools. The
* engine kind's backend (TOOL_BACKENDS) says where the shared tools draw:
* `board()`, `draw()` and `geoImport()` give their attachScene arguments
* (null: not on this engine), `recentImagery(layer)` the panel's globe,
* `board()` and `draw()` give their attachScene arguments (null: not on
* this engine), `recentImagery(layer)` the panel's globe,
* `installGovernor()` the governor's; `attach(context, attachment)` adds
* the engine's own tools, `suspend(hidden, controls)` its hidden-tab
* handling and `attachViews(context, attachment)` its embedded views. The
@@ -369,8 +368,9 @@ async function attachEngineTools(
defer,
);
attachDraw(backend.draw, { layerSession, annotations, styleManager }, defer);
// Import draws through the globe contract, the same on every engine.
attachGeoImport(
backend.geoImport(),
{ engine },
{ layerSession, styleManager, operations, mapStackController },
defer,
);
@@ -513,8 +513,8 @@ function attachDraw(
}
/**
* UTILITIES ▸ Import on this globe (`importScene`, null: not on it): the
* next globe reads the session's files again. The drop listeners belong to
* UTILITIES ▸ Import on this globe (`importScene`: its engine): the next
* globe reads the session's files again. The drop listeners belong to
* this globe. Returns the control (null on a page without it).
*/
function attachGeoImport(