Stand an inertial subject on its floor once the floor arrives

- The first floor height that replaces the entry frame's height re-anchors
  the camera and resets the smoothed rise, so the subject stands on the
  floor within a second instead of hovering above it.
- A provider's thenable gets one rejection handler; frame fields and eye
  are read once each.
- A progress label's width counts the smaller detail line and full-width
  and astral glyphs.
- Tests cover the first camera update of an aircraft and a vessel, a
  double-click on a selected vessel, a tone-only Live Signals change and a
  getter that throws on its second read; repeated cases share helpers.
- Comments, the release note and CURRENT-STATE say which height the camera
  holds while it waits for the surface and how a Live Signals row keeps
  its time.
This commit is contained in:
German Khokhlov committed 2026-11-18 20:49:21 +04:00
1 parent 109bb0fd4f
commit c190e662bc
13 files changed
+314 -211

No files matched your search

+32
View File
@@ -495,6 +495,38 @@ test('Cockpit places the eye at its aircraft as the Cesium maths did', async ()
}
});
test("a live aircraft's first Cockpit update stands the anchor on it", async () => {
const Cesium = await import('cesium');
const env = environment();
try {
const target = Cesium.Cartesian3.fromDegrees(-97.67, 30.19, 1200);
const info = {
icao24: 'abc123',
layerId: 'flights',
track: 72,
velocityMps: 200,
latitude: 30.19,
longitude: -97.67,
onGround: false,
stale: false,
};
const { owner, views } = cockpitOver({ info, target });
// Entry was a while ago: the step would carry the anchor 20 m ahead.
owner.update();
const expected = cesiumCockpitEye(Cesium, {
target,
info: { ...info, stale: true },
heading: 72,
dtSec: 0,
liftM: 0,
});
near(views[0].destination, expected.eye, 1e-6, 'first live eye');
owner.dispose();
} finally {
env.restore();
}
});
test('a grounded Cockpit probes the mesh from the camera and keeps the eye above the floor', async () => {
const Cesium = await import('cesium');
const env = environment();