fix(globe): harden the Navara engine after review

- maps: photoreal hides the base imagery layer instead of deleting it,
  and a new base layer goes in before the old one goes: deleting the
  last raster layer stops Navara 0.2.1 loading terrain at the current
  view, which left terrainHeight undefined under the tiles
- Google 3D tiles open Navara's attribution card so the tiles'
  copyright lines are on screen, as Cesium shows them; onScreen
  credits do the same
- setCameraInputs merges into the camera options set through the
  engine (new setCameraOptions extension) instead of resetting them
- createNavaraGlobe disposes the view and canvas if the engine throws
- the pin test checks the installed Navara version and catches
  bracketed private access
- QA: draw-match checks at the nadir clamp, after a Navara flight and
  after a mouse drag; terrain under photoreal set right away; the
  copyright lines on screen; create/destroy/create leaves no canvas,
  frames, animation frames, workers or console errors (54/54)
This commit is contained in:
German Khokhlov committed 2026-10-15 19:04:07 +04:00
1 parent 90c8e7763a
commit a4ac0b9b0d
8 files changed
+148 -25

No files matched your search

+12 -2
View File
@@ -32,6 +32,7 @@ export function createNavaraInput(view, { onCameraInput = () => {} } = {}) {
let attached = false;
let destroyed = false;
let cameraInputs = true;
let cameraOptions = {};
let downAt = null;
let last = null;
@@ -108,11 +109,20 @@ export function createNavaraInput(view, { onCameraInput = () => {} } = {}) {
},
setCameraInputs(enabled) {
cameraInputs = Boolean(enabled);
view.camera.options = {
input.setCameraOptions({
enableSpin: cameraInputs,
enableZoom: cameraInputs,
enableTilt: cameraInputs,
};
});
},
/**
* Navara-only extension: camera controller options (zoom distances,
* speeds, ...). Navara has no getter, so the engine keeps every option
* set through it and always sends the merged set.
*/
setCameraOptions(options) {
cameraOptions = { ...cameraOptions, ...options };
view.camera.options = { ...cameraOptions };
},
};
return {