Fly the camera through the renderer's camera port

The Cesium camera port moves into render/cesium/camera.js, with the
listener list and position conversion shared from common.js. It now
covers flights (flyTo, flyToBounds, cancelFlight, flying), lookAt and
release, command hooks, and a flightEnd event for the flights it starts.

A flight's end that Cesium raises inside one of the port's own calls is
delivered once Cesium's call returns, so its callback sees the flight
let go of. A flight Cesium declines to start, mid scene-mode morph,
ends as cancelled instead of never settling.

Flight traces run in Node on the recorder's headless camera with a
virtual clock; the browser harness keeps the instant traces.

The startup fly-in, landmark and viewport flights, share-link restore
and the shell's camera state now go through the port. camera.js and
sharelink.js leave the Cesium allow-list.
This commit is contained in:
Sameh Khamis committed 2026-11-05 20:15:52 -08:00
1 parent b5900b4178
commit 46a53bb49c
20 files changed
+846 -305

No files matched your search

+10 -1
View File
@@ -1,6 +1,6 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { bindRenderer, rendererOf } from './rendererOf.js';
import { bindRenderer, cameraOf, rendererOf } from './rendererOf.js';
test('a scene finds its renderer until it is unbound', () => {
const scene = {};
@@ -23,3 +23,12 @@ test('a stale unbind leaves a later binding alone', () => {
unbindFirst();
assert.equal(rendererOf(scene), second);
});
test('cameraOf names the missing renderer instead of returning nothing', () => {
const scene = {};
assert.throws(() => cameraOf(scene), /no renderer camera/);
const camera = { pose() {} };
const unbind = bindRenderer(scene, { camera });
assert.equal(cameraOf(scene), camera);
unbind();
});