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

+18 -12
View File
@@ -7,6 +7,7 @@ import { createWeatherRendering } from './rendering.js';
import { weatherDisplay, insideExtent, escapeCreditText } from './display.js';
import { createShellCesium, createShellScene } from './shellFixture.mjs';
import { formatScaleLabel } from '../../ui/unitLabels.js';
import { bindFakeCesiumCamera } from '../../testSupport/fakeCameraPort.mjs';
const times = ['2026-09-15T20:00:00.000Z', '2026-09-15T20:05:00.000Z'];
const base = {
@@ -58,18 +59,22 @@ async function shownLayer(id, manifest, params, view = {}) {
getDiagnostics: () => ({ time, loading: false, error: null }),
}),
});
layer.init({
camera: {
moveEnd: { addEventListener: () => () => {} },
flyTo: ({ destination }) => flights.push(destination),
pickEllipsoid: () =>
view.center ? Cesium.Cartesian3.fromDegrees(...view.center) : undefined,
},
scene: {
canvas: { clientWidth: 800, clientHeight: 600 },
globe: { ellipsoid: Cesium.Ellipsoid.WGS84 },
},
});
layer.init(
bindFakeCesiumCamera({
camera: {
moveEnd: { addEventListener: () => () => {} },
flyTo: ({ destination }) => flights.push(destination),
pickEllipsoid: () =>
view.center
? Cesium.Cartesian3.fromDegrees(...view.center)
: undefined,
},
scene: {
canvas: { clientWidth: 800, clientHeight: 600 },
globe: { ellipsoid: Cesium.Ellipsoid.WGS84 },
},
}),
);
if (params) layer.setParams(params);
layer.enable();
await layer.update();
@@ -638,6 +643,7 @@ function globeViewer() {
requestRender() {},
},
};
bindFakeCesiumCamera(viewer);
class Provider {
constructor(options) {
this.options = options;
+14 -11
View File
@@ -10,6 +10,7 @@ import {
} from './clock.js';
import { formatUtcDayMonth, t, msg } from '../../i18n/index.js';
import { formatScaleLabel } from '../../ui/unitLabels.js';
import { cameraOf } from '../../render/rendererOf.js';
/**
* A stored (English) failure in the language. HTTP failures from source.js
@@ -475,17 +476,19 @@ export function createWeatherLayer({
(lightning
? { west: 110, south: -25, east: 0, north: 80 }
: manifest.bounds);
runNavigation(() =>
viewer.camera.flyTo({
destination: cesium.Rectangle.fromDegrees(
b.west,
b.south,
b.east,
b.north,
),
duration: motion?.matches ? 0 : 1.4,
}),
);
runNavigation(() => {
cameraOf(viewer).flyTo(
{
rect: {
west: b.west,
south: b.south,
east: b.east,
north: b.north,
},
},
{ durationS: motion?.matches ? 0 : 1.4 },
);
});
}
if (clock && enabled) {
if (params.play === true) void clock.togglePlay();