mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 00:02:25 +00:00
Fix the review findings across the engines, layers, data and QA
Navara now matches Cesium where the review found it diverging: a flight holds the camera inputs, camera.changed counts turns as Cesium does, render requests made during a frame survive it, follow pinches zoom, ground widths follow the pixel ratio and Cyber sonar reaches glyph caches and models. On Cesium, a staged imagery swap keeps loading tiles, setView replaces a running flight, and a cleared weather detail goes away. The contract gains MoverSet.failed, maps.terrainRevision, render.maxTextureSize and surface.sampleTerrainMostDetailed on every engine, so layers retry failed models, key road heights by terrain, size weather textures to the GPU and place Bhote Koshi cards on detailed terrain. Engine switches keep the live view, follows, focus, layer options and cards: a pick hands over the exact pose, applies no address options and pans no carried-over card; a history visit still applies its entry. Layers put GhostMaps pins, cable landings, OSM Places and directions on the measured surface without per-frame sampling, draw the Cockpit contact dot, hide disabled CCTV on attach, and keep ALPR running outside secure contexts. KML imports draw raised polygon fills, rotated and coloured ground overlays and north-referenced icon headings, and report files with nothing to draw. QA scripts read the contract instead of Cesium internals (test:track is 109/109 again), wait for the camera to rest before clicking, and give cold switches and parked engines realistic time. Docs follow the code.
This commit is contained in:
1 parent
69fbf5b38d
commit
0ef29781e5
276 files changed
+7217
-1517
No files matched your search
@@ -8,7 +8,7 @@ import { analyzeModule } from './module-analysis.mjs';
|
||||
const builtins = new Set(
|
||||
builtinModules.flatMap((name) => [name, `node:${name}`]),
|
||||
);
|
||||
const code = /\.[mc]?js$/;
|
||||
const code = /\.(?:[mc]?js|vue)$/;
|
||||
const entry = (file) =>
|
||||
file === 'src/main.js' || file.startsWith('src/standalone/');
|
||||
const tests = (file) =>
|
||||
@@ -30,12 +30,6 @@ const globeEngine = (file) => /^src\/globe\/(?:cesium|navara)\//.test(file);
|
||||
const cesiumPackage = /^(?:cesium(?:\/|$)|@cesium\/)/;
|
||||
// Navara renders through three.js and its postprocessing peer.
|
||||
const navaraPackage = /^(?:(?:three|postprocessing)(?:\/|$)|@navaramap\/)/;
|
||||
// The modules that load Navara renderers, each through import().
|
||||
const NAVARA_RENDERER_LOADERS = new Set([
|
||||
'src/app/navaraMode.js',
|
||||
'src/app/layers/renderers.js',
|
||||
]);
|
||||
const navaraLayerRenderer = (file) => /\/render\/navara[^/]*\.js$/.test(file);
|
||||
const renderer = (file) =>
|
||||
/^src\/(?:ui|app|standalone|overlays)\//.test(file) ||
|
||||
/^src\/layers\/[^/]+\/(?:index|rendering|snapshotRenderer|overlay|presentation|cards|controls)\.js$/.test(
|
||||
@@ -125,6 +119,7 @@ export function checkImportDirections(root) {
|
||||
try {
|
||||
analysis = analyzeModule(readFileSync(resolved, 'utf8'), {
|
||||
dynamic: true,
|
||||
filename: file,
|
||||
});
|
||||
} catch (error) {
|
||||
report(file, error.message);
|
||||
@@ -188,27 +183,12 @@ export function checkImportDirections(root) {
|
||||
if (
|
||||
to.startsWith('src/globe/navara/') &&
|
||||
!file.startsWith('src/globe/navara/') &&
|
||||
!analysis.dynamicImports.includes(specifier)
|
||||
analysis.staticImports.includes(specifier)
|
||||
)
|
||||
report(
|
||||
file,
|
||||
`The Navara engine loads only through a dynamic import(): ${to}`,
|
||||
);
|
||||
// Like the engine, a layer's Navara renderer reaches the app only
|
||||
// through an import() of the Navara mode (src/app/navaraMode.js) or
|
||||
// of the layer manifest (src/app/layers/renderers.js).
|
||||
if (
|
||||
navaraLayerRenderer(to) &&
|
||||
!navaraLayerRenderer(file) &&
|
||||
!(
|
||||
NAVARA_RENDERER_LOADERS.has(file) &&
|
||||
analysis.dynamicImports.includes(specifier)
|
||||
)
|
||||
)
|
||||
report(
|
||||
file,
|
||||
`A Navara layer renderer loads only through the Navara mode's dynamic import(): ${to}`,
|
||||
);
|
||||
if (file.startsWith('src/') && to.startsWith('server/'))
|
||||
report(file, `Browser imports server: ${to}`);
|
||||
if (
|
||||
@@ -322,8 +302,8 @@ export function checkImportDirections(root) {
|
||||
}
|
||||
for (const file of files.filter(globeContract)) globe(file);
|
||||
// Each engine graph stays on its own engine, through helpers too.
|
||||
for (const start of files.filter(globeEngine)) {
|
||||
const navara = start.startsWith('src/globe/navara/');
|
||||
for (const owner of ['cesium', 'navara']) {
|
||||
const navara = owner === 'navara';
|
||||
const label = navara ? 'Navara globe engine' : 'Cesium globe engine';
|
||||
const foreignPackage = navara ? cesiumPackage : navaraPackage;
|
||||
const foreignEngine = navara ? 'src/globe/cesium/' : 'src/globe/navara/';
|
||||
@@ -342,7 +322,10 @@ export function checkImportDirections(root) {
|
||||
else visit(to);
|
||||
}
|
||||
};
|
||||
visit(start);
|
||||
for (const start of files.filter((file) =>
|
||||
file.startsWith(`src/globe/${owner}/`),
|
||||
))
|
||||
visit(start);
|
||||
}
|
||||
// Common voice controls may use their DOM view, but never a protocol implementation.
|
||||
const voiceSeen = new Set();
|
||||
|
||||
Reference in new issue
Block a user