Fly layer focus flights through the camera port

flyToBounds takes an easing, as flyTo does: in the contract, the Cesium
port and the reference recorder, pinned by a new conformance trace.

The flights of radio, awareness, CCTV, submarine cables, cyclones, the
launch preview, installations, ALPR, street-level framing, recent
imagery, weather and world focus now go through the renderer's camera
port. Street-level framing cancels its own flight handle rather than
whatever flight is current. worldFocus.js no longer reaches Cesium and
leaves the allow-list.

Layer pose reads stay for each layer's own slice. The local GeoJSON
flight stays on Cesium: gods-eye-view/infrastructure is used with plain
Cesium viewers that have no renderer bound.
This commit is contained in:
Sameh Khamis committed 2026-11-05 20:46:58 -08:00
1 parent 46a53bb49c
commit c5b716b107
31 files changed
+2349 -871

No files matched your search

+9 -1
View File
@@ -3,6 +3,7 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
import * as Cesium from 'cesium';
import { bindFakeCesiumCamera } from '../testSupport/fakeCameraPort.mjs';
import alprCamerasLayer, {
createAlprCamerasLayer,
configureAlprSource,
@@ -342,6 +343,9 @@ function cameraHarness(layer = alprCamerasLayer) {
remove() {},
},
};
bindFakeCesiumCamera(viewer);
// The renderer's camera port relays moveEnd; the layer's own come on top.
const portMoveEndListeners = viewer.camera.moveEnd.numberOfListeners;
const setInput = Cesium.ScreenSpaceEventHandler.prototype.setInputAction;
Cesium.ScreenSpaceEventHandler.prototype.setInputAction = function (
fn,
@@ -364,6 +368,7 @@ function cameraHarness(layer = alprCamerasLayer) {
layer.enable();
return {
viewer,
portMoveEndListeners,
requests,
credits,
get source() {
@@ -932,7 +937,10 @@ test('two factories keep their requests, records and destruction independent', a
b.source.entities.values[0],
)?.labelModel.details.includes('Source: Test directory'),
);
assert.equal(a.viewer.camera.moveEnd.numberOfListeners, 0);
assert.equal(
a.viewer.camera.moveEnd.numberOfListeners,
a.portMoveEndListeners,
);
assert.equal(a.viewer.scene.postRender.numberOfListeners, 0);
} finally {
b.restore();