Fix the follow-up review findings in import, layers, startup and engines

- KML/KMZ import: a per-file canvas budget and cache for ground overlays,
  limits on rings and vertices of raised polygons, overlays across 360° and
  near the poles, degenerate holes, polar and single-latitude fills,
  absolute overlays at their altitude, overlay order by drawOrder as on
  Cesium, and pins on tiles keep their measured height.
- Points on the surface: OSM Places and Street Level cones share the
  surface sampler and sit on the terrain before they are measured, within
  a sampling budget per pass; Cockpit's contact-dot bank keeps the dot
  atlas, and a failed fleet model loads again after a pause.
- Startup: the loading screen lifts after the share-link view is restored,
  the retry screen names the failed engine and takes focus, and the
  fallback toast stays for 6 s.
- Engines: an engine switch lands a running camera flight at its
  destination (camera.completeFlight on both engines), the sighting card
  leaves focus on the engine picker after a switch, and a Cesium model
  error stays with the instance that failed.
- The MCP panel builds again: its wind-mesh alias resolves to the stub.
- QA: the wildlife switch waits for the camera to rest, GBFS --w2 says it
  needs the dev server, and test fixtures are shared instead of copied.
This commit is contained in:
German Khokhlov committed 2026-11-10 01:57:11 +04:00
1 parent 0ef29781e5
commit 60fb8fee07
82 files changed
+2363 -1574

No files matched your search

+27
View File
@@ -132,6 +132,33 @@ test('flightActive also reports a flight started straight on the Cesium camera',
assert.equal(camera.flightActive(), false);
});
test('completeFlight lands at the destination and calls complete only', () => {
const { scene, engine } = createCameraViewer();
// Cesium's own flight: a real tween collection under the real camera.
scene.tweens = new Cesium.TweenCollection();
scene.screenSpaceCameraController = { enableInputs: true };
const outcome = [];
const destination = geo.cartesian3.fromDegrees(86.925, 27.988, 40000);
engine.camera.completeFlight();
engine.camera.flyTo({
destination,
orientation: { heading: 0.5, pitch: -0.8, roll: 0 },
duration: 8,
complete: () => outcome.push('complete'),
cancel: () => outcome.push('cancel'),
});
assert.equal(engine.camera.flightActive(), true);
engine.camera.completeFlight();
assert.deepEqual(outcome, ['complete']);
assert.equal(engine.camera.flightActive(), false);
assert.equal(scene.screenSpaceCameraController.enableInputs, true);
const pose = engine.camera.pose();
assert.ok(geo.cartesian3.distance(pose.position, destination) < 0.01);
assert.ok(Math.abs(pose.heading - 0.5) < 1e-6);
assert.ok(Math.abs(pose.pitch + 0.8) < 1e-6);
engine.destroy();
});
test('setView with direction and up keeps the exact basis next to nadir', () => {
const { camera, engine } = createCameraViewer();
const unit = (x, y, z) =>