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

+21
View File
@@ -141,3 +141,24 @@ test('destroy removes every DOM listener and later subscriptions are inert', ()
assert.equal(typeof off, 'function');
assert.equal(canvas.listenerCount, 0);
});
test('setCameraInputs merges into the camera options set through the engine', () => {
const { input, cameraOptions } = setup();
input.setCameraOptions({ minimumZoomDistance: 50, zoomSpeed: 2 });
input.setCameraInputs(false);
assert.deepEqual(cameraOptions.at(-1), {
minimumZoomDistance: 50,
zoomSpeed: 2,
enableSpin: false,
enableZoom: false,
enableTilt: false,
});
input.setCameraOptions({ zoomSpeed: 3 });
assert.deepEqual(cameraOptions.at(-1), {
minimumZoomDistance: 50,
zoomSpeed: 3,
enableSpin: false,
enableZoom: false,
enableTilt: false,
});
});