mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +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
@@ -1,4 +1,4 @@
|
||||
// Contract: a parked globe is released after ?parkedMs= (3 s here; three
|
||||
// Contract: a parked globe is released after ?parkedMs= (8 s here; three
|
||||
// minutes by default). A switch back in time is warm (the same engine
|
||||
// object); after the delay the parked engine's WebGL context is lost and a
|
||||
// switch back builds a new engine on the same session that draws a
|
||||
@@ -21,7 +21,8 @@ import {
|
||||
startSession,
|
||||
} from './qa-strict-session.mjs';
|
||||
|
||||
const PARKED_MS = 3000;
|
||||
// Room for a cold switch on a busy machine (2-3 s) before the switch back.
|
||||
const PARKED_MS = 8000;
|
||||
const base = localPreview(process.argv[2]);
|
||||
const other = (kind) => (kind === 'navara' ? 'cesium' : 'navara');
|
||||
const strict = createStrict({ origin: base.origin, layers: [] });
|
||||
@@ -41,8 +42,9 @@ await strict.run({}, async (b) => {
|
||||
console.log('PASS', name);
|
||||
};
|
||||
const pick = async (kind) => {
|
||||
await strict.pick(p, kind);
|
||||
const { at } = await strict.pick(p, kind);
|
||||
await waitForEngine(p, kind);
|
||||
return at;
|
||||
};
|
||||
// The running engine is the one remembered under its kind (warm), and
|
||||
// the context of `kind`'s remembered engine is lost or not.
|
||||
@@ -77,17 +79,17 @@ await strict.run({}, async (b) => {
|
||||
await pick(parked);
|
||||
await rememberEngine(p);
|
||||
}
|
||||
await pick(running);
|
||||
const parkedAt = await pick(running);
|
||||
await rememberEngine(p);
|
||||
// A switch back in time is warm.
|
||||
await wait(PARKED_MS / 3);
|
||||
await pick(parked);
|
||||
await wait(1000);
|
||||
const backAt = await pick(parked);
|
||||
const early = await engines(parked);
|
||||
await assertSession(p, parked, `a quick switch back to ${parked}`);
|
||||
contract(
|
||||
`a switch back to ${parked} within the delay reuses the parked engine`,
|
||||
early.warm && early.lost === false,
|
||||
early,
|
||||
{ ...early, parkedMs: Math.round(backAt - parkedAt) },
|
||||
);
|
||||
// Parked past the delay: released, and the next switch back is cold.
|
||||
await pick(running);
|
||||
|
||||
Reference in new issue
Block a user