mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +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
@@ -18,7 +18,7 @@
|
||||
* node scripts/qa-overlay-baseline.mjs --engine=navara
|
||||
*
|
||||
* Engine-neutral: the camera and frames go through the globe engine and the
|
||||
* layers through the QA probe (window.__godsEyeView.layers, dev server only).
|
||||
* layers through the public engine and data manager surfaces.
|
||||
* A scene whose layers the engine does not have is SKIPPED. The inventory
|
||||
* counts the globe contract's sets (movers, lines, ground, imagery) on both
|
||||
* engines; on Cesium it also counts what is left of Entities, LabelGraphics
|
||||
@@ -29,6 +29,7 @@ import fs from 'node:fs';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import puppeteer from 'puppeteer';
|
||||
import { fromDegrees } from '../src/geo/cartesian3.js';
|
||||
|
||||
const CHROME_EXECUTABLE = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
|
||||
const DEFAULT_URL = 'http://localhost:4176';
|
||||
@@ -362,7 +363,7 @@ async function installPageInstrumentation(page) {
|
||||
async function waitForApp(page) {
|
||||
await page.goto(APP_URL, { waitUntil: 'domcontentloaded', timeout: 60_000 });
|
||||
await page.waitForFunction(
|
||||
() => Boolean(window.__godsEyeView?.layers && window.__godsEyeView?.dataManager),
|
||||
() => Boolean(window.__godsEyeView?.engine && window.__godsEyeView?.dataManager),
|
||||
{ timeout: 60_000 },
|
||||
);
|
||||
await page.evaluate(() => {
|
||||
@@ -375,17 +376,16 @@ async function waitForApp(page) {
|
||||
|
||||
async function setCamera(page, camera) {
|
||||
if (!camera) return;
|
||||
await page.evaluate(async ([lon, lat, height, heading, pitch]) => {
|
||||
await page.evaluate(([destination, heading, pitch]) => {
|
||||
const { engine, viewer } = window.__godsEyeView;
|
||||
const geo = await import('/src/geo/index.js');
|
||||
engine.camera.cancelFlight();
|
||||
viewer?.scene.tweens?.removeAll?.();
|
||||
engine.camera.setView({
|
||||
destination: geo.cartesian3.fromDegrees(lon, lat, height),
|
||||
destination,
|
||||
orientation: { heading, pitch, roll: 0 },
|
||||
});
|
||||
engine.render.request('qa-overlay-baseline');
|
||||
}, camera);
|
||||
}, [fromDegrees(...camera.slice(0, 3)), ...camera.slice(3)]);
|
||||
}
|
||||
|
||||
async function readLayerState(page, layerId) {
|
||||
@@ -646,7 +646,7 @@ async function prepareTrackedFlight(page, cockpit) {
|
||||
});
|
||||
if (!tracked.ok) return `Civil tracking unavailable (${tracked.reason})`;
|
||||
try {
|
||||
await page.waitForFunction(() => Boolean(window.__godsEyeView.layers.following()), { timeout: 10_000 });
|
||||
await page.waitForFunction(() => Boolean(window.__godsEyeView.engine.camera.following()), { timeout: 10_000 });
|
||||
} catch {
|
||||
return 'Civil tracking did not create a tracked entity';
|
||||
}
|
||||
@@ -679,7 +679,7 @@ async function prepareMission(page) {
|
||||
});
|
||||
if (!selected) return 'Mission roster did not expose a selectable mission';
|
||||
try {
|
||||
await page.waitForFunction(() => Boolean(window.__godsEyeView.layers.drawn('rocket-launches')?.selected), { timeout: 10_000 });
|
||||
await page.waitForFunction(() => Boolean(window.__godsEyeView.dataManager.layers.get('rocket-launches')?.module?.qaDrawn?.()?.selected), { timeout: 10_000 });
|
||||
} catch {
|
||||
return 'Mission selection did not reach the layer probe';
|
||||
}
|
||||
@@ -689,7 +689,7 @@ async function prepareMission(page) {
|
||||
|
||||
async function prepareScene(page, scene) {
|
||||
const missing = await page.evaluate(
|
||||
(ids) => ids.filter((id) => !window.__godsEyeView.layers.available(id)),
|
||||
(ids) => ids.filter((id) => !window.__godsEyeView.dataManager.layers.has(id)),
|
||||
scene.layers,
|
||||
);
|
||||
if (missing.length)
|
||||
|
||||
Reference in new issue
Block a user