mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
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:
1 parent
c079b329d0
commit
97c4dc76ce
130 files changed
+4763
-3495
No files matched your search
@@ -3,7 +3,7 @@
|
||||
// bloomStrengthFromIntensity, 0..1) as postprocessing BloomEffect settings,
|
||||
// and the bloom port createNavaraEngine takes. bloom.js adds the effect.
|
||||
//
|
||||
// Cesium's bloom stage (src/ui/visualEffects.js applyBloomIntensity) eases
|
||||
// Cesium's bloom stage (src/globe/cesium/postStages.js bloomUniforms) eases
|
||||
// the strength above a 0.06 dead zone (smoothstep) into a lower contrast, a
|
||||
// brighter offset and a wider blur: more of the frame glows, further out.
|
||||
// The same eased value drives the threshold, softness, blur radius and
|
||||
|
||||
@@ -139,10 +139,13 @@ export function createNavaraInput(
|
||||
cameraInputs = Boolean(enabled);
|
||||
sendCameraInputs();
|
||||
},
|
||||
/** Off under any suspension, else the setCameraInputs choice. */
|
||||
cameraInputsEnabled: () => cameraInputs && suspended === 0,
|
||||
/**
|
||||
* Navara-only: Navara's spin, zoom and tilt off until the returned
|
||||
* release (the follow camera takes drag and wheel itself); the app's
|
||||
* setCameraInputs choice comes back after the last release.
|
||||
* Navara's spin, zoom and tilt off until the returned release (the
|
||||
* follow camera takes drag and wheel itself, as do the app's camera
|
||||
* owners); the app's setCameraInputs choice comes back after the last
|
||||
* release.
|
||||
*/
|
||||
suspendCameraInputs() {
|
||||
suspended++;
|
||||
|
||||
@@ -134,6 +134,26 @@ test('setCameraInputs toggles Navara camera control and user input cancels fligh
|
||||
]);
|
||||
});
|
||||
|
||||
test('suspendCameraInputs counts and keeps the setCameraInputs choice for the last resume', () => {
|
||||
const { input, cameraOptions } = setup();
|
||||
const on = { enableSpin: true, enableZoom: true, enableTilt: true };
|
||||
const off = { enableSpin: false, enableZoom: false, enableTilt: false };
|
||||
assert.equal(input.cameraInputsEnabled(), true);
|
||||
const outer = input.suspendCameraInputs();
|
||||
const inner = input.suspendCameraInputs();
|
||||
assert.equal(input.cameraInputsEnabled(), false);
|
||||
inner();
|
||||
inner();
|
||||
assert.deepEqual(cameraOptions.at(-1), off);
|
||||
input.setCameraInputs(false);
|
||||
outer();
|
||||
assert.deepEqual(cameraOptions.at(-1), off);
|
||||
assert.equal(input.cameraInputsEnabled(), false);
|
||||
input.setCameraInputs(true);
|
||||
assert.deepEqual(cameraOptions.at(-1), on);
|
||||
assert.equal(input.cameraInputsEnabled(), true);
|
||||
});
|
||||
|
||||
test('destroy removes every DOM listener and later subscriptions are inert', () => {
|
||||
const { canvas, input, destroy } = setup();
|
||||
input.on('click', () => {});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// ({ descriptor, credit } for imagery, { id } for terrain) or plain
|
||||
// descriptions ({ kind, accessToken?, googleApiKey? }); this module builds
|
||||
// Navara sources and layers from them. The URLs and credits repeat those of
|
||||
// src/maps/imagery.js and src/maps/terrain.js, which import Cesium.
|
||||
// src/globe/cesium/mapImagery.js and terrain.js, which import Cesium.
|
||||
//
|
||||
// - imagery: OSM and Esri as `raster-tile` layers; Cesium ion imagery (Bing)
|
||||
// has no Navara path yet and rejects.
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
// shaders (movers/moverMesh.js) from uniforms every overlay of a view
|
||||
// shares. The rings and the sweep itself are the HUD's own (CSS,
|
||||
// src/cyberSonar.js); this is the contact side, the counterpart of the
|
||||
// Cesium command adapter (src/cyberSonarGpu.js), with the same maths: each
|
||||
// contact's factor from its anchor's place on screen against the sweep (the
|
||||
// sampler of src/cyberSonar.js createCyberSonarSampler), its colour pulled
|
||||
// toward the scanner tint by that factor and its alpha scaled by it.
|
||||
// Cesium command adapter (src/globe/cesium/sonarCommands.js), with the same
|
||||
// maths: each contact's factor from its anchor's place on screen against
|
||||
// the sweep (the sampler of src/cyberSonar.js createCyberSonarSampler), its
|
||||
// colour pulled toward the scanner tint by that factor and its alpha scaled
|
||||
// by it.
|
||||
// Positions, picks and the instance data stay as the layers set them.
|
||||
// Models keep their colours (Cesium tints them on the CPU).
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
} from 'three';
|
||||
|
||||
export const STYLES_EFFECT_KEY = 'gevStyles';
|
||||
/** Intensity under which a style draws nothing (as VisualEffects disables a stage). */
|
||||
/** Intensity under which a style draws nothing (as Cesium disables a stage). */
|
||||
const STYLE_VISIBLE_INTENSITY = 0.001;
|
||||
|
||||
const VERTEX_SHADER = /* glsl */ `precision highp float;
|
||||
|
||||
Reference in new issue
Block a user