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

+38
View File
@@ -238,3 +238,41 @@ test('ordinary overlays keep the direct pass without a display copy or target',
assert.equal(h.renderer.autoClear, true);
h.pass.dispose();
});
test('static sprite glyphs are drawn again when the Cyber sonar moves', () => {
const h = harness(),
input = { width: 1280, height: 800, texture: {} },
output = {},
mesh = new InstancedMesh(
new PlaneGeometry(1, 1),
new MeshBasicMaterial({ map: new Texture() }),
1,
);
Object.assign(h.overlay.uniforms, {
uGevSonar: { value: [0, 1, 0.84, 1] },
uGevSonarSector: { value: 24 },
uGevSonarEnabled: { value: 1 },
});
mesh.userData.gevStaticSprite = true;
mesh.count = 1;
h.scene.add(mesh);
h.setActive(true);
h.pass.render(h.renderer, input, output);
const drawn = () => h.draws.filter((draw) => draw.object === h.scene).length;
assert.equal(drawn(), 1);
// The sweep turns (sonar.js writes the shared uniform each frame).
h.overlay.uniforms.uGevSonar.value[0] = 90;
h.pass.render(h.renderer, input, output);
assert.equal(drawn(), 2, 'a new sonar angle draws the glyphs again');
h.overlay.uniforms.uGevSonarSector.value = 60;
h.pass.render(h.renderer, input, output);
assert.equal(drawn(), 3, 'a new sector draws the glyphs again');
// The Cyber treatment is turned off.
h.overlay.uniforms.uGevSonarEnabled.value = 0;
h.pass.render(h.renderer, input, output);
assert.equal(drawn(), 4, 'sonar off draws the glyphs again');
// Off, the angle still moves every frame; the glyphs stay cached.
h.overlay.uniforms.uGevSonar.value[0] = 180;
h.pass.render(h.renderer, input, output);
assert.equal(drawn(), 4, 'the angle of an unused sonar draws nothing');
});