Merge main through #1634 into the renderer seam

Brings in the CCTV opening camera, the Iceland, Giroc HLS, Taiwan, Quebec,
Ottawa and world camera packs, the world clock and timeline, the zoom-out
limit and registered-only layer state, ported onto the renderer contract:
the sky follows the world time through the frame port's setTime in
preUpdate, the Quebec overlay reads the eye, projects and redraws through
the camera, query and frame ports, launches hide pending missions through
their draw records, and mission orbit rings turn on the scene clock.
This commit is contained in:
Sameh Khamis committed 2026-11-10 00:31:23 -08:00
commit 2b60531c3c
170 files changed
+44096 -319

No files matched your search

+3 -3
View File
@@ -10,7 +10,7 @@ import { eastNorthUp, framePoint } from '../../geo/frames.js';
import {
addSeconds,
julianLessThan,
julianNow,
julianFromEpochMs,
secondsDifference,
} from '../../geo/julian.js';
import {
@@ -209,7 +209,7 @@ export function createMotion({
const renderTime =
sampledRenderTime ??
addSeconds(
julianNow(flightState._scratchRenderTime),
julianFromEpochMs(flightState.now(), flightState._scratchRenderTime),
-RENDER_DELAY_SEC,
flightState._scratchRenderTime,
);
@@ -306,7 +306,7 @@ export function createMotion({
const history = flightState._positionHistory.get(flightState._trackedIcao);
if (!history || history.length === 0) return true;
const renderTime = addSeconds(
julianNow(),
julianFromEpochMs(flightState.now()),
-RENDER_DELAY_SEC,
flightState._scratchWarmupTime,
);
+8 -4
View File
@@ -12,6 +12,7 @@ function fixture() {
_scratchArc: {},
_scratchOffset: { x: 0, y: 0, z: 0 },
_scratchRenderTime: { dayNumber: 0, secondsOfDay: 0 },
now: Date.now,
};
const motion = createMotion({
flightState,
@@ -129,7 +130,7 @@ test('fleet render time is shared without resampling or mutating the supplied in
assert.ok(Cesium.JulianDate.equals(renderTime, savedTime));
});
test('tracked callers still sample a fresh delayed time without a fleet epoch', (t) => {
test('tracked callers still sample a fresh delayed time without a fleet epoch', () => {
const { flightState, motion } = fixture();
const start = Cesium.JulianDate.fromIso8601('2026-10-24T12:00:00Z');
const history = [
@@ -147,8 +148,11 @@ test('tracked callers still sample a fresh delayed time without a fleet epoch',
flightState.records.data.set('tracked', { velocity: 100, true_track: 90 });
flightState._positionHistory.set('tracked', history);
let elapsed = 60;
const startMs = Cesium.JulianDate.toDate(start).getTime();
const spy = t.mock.method(Date, 'now', () => startMs + elapsed * 1000);
let reads = 0;
flightState.now = () => {
reads += 1;
return Cesium.JulianDate.toDate(start).getTime() + elapsed * 1000;
};
const out = new Cesium.Cartesian3();
close(
motion._deadReckon('tracked', out),
@@ -169,7 +173,7 @@ test('tracked callers still sample a fresh delayed time without a fleet epoch',
new Cesium.Cartesian3(),
),
);
assert.equal(spy.mock.callCount(), 2);
assert.equal(reads, 2);
// Sampled into the layer's scratch, not a new date.
assert.ok(
Cesium.JulianDate.equals(
+1
View File
@@ -187,6 +187,7 @@ test('the tracked trail head is drawn each frame while tracked and stops with th
);
let headLon = 0.03;
const flightState = {
now: Date.now,
_viewer: viewer,
_trackedIcao: 'abc123',
_trail: null,
+3
View File
@@ -1,5 +1,6 @@
import { FlightRecords } from './records.js';
import { createFlightFeed } from './ingestion.js';
import { worldTimeFor } from '../../time/worldClock.js';
import { ENRICH_AMBIENT_BUDGET_CEIL } from './policy.js';
export function createFlightState({ source, services }) {
@@ -10,6 +11,8 @@ export function createFlightState({ source, services }) {
...services.geoid,
...services.groundFloor,
});
/** The time contacts are drawn behind by the render delay, in epoch ms. */
flightState.now = worldTimeFor('flights');
/** Per-class model spec. Hangar-fleet classes (CLASS_MODEL_REAL) ship GLBs
* vertex-baked to real-world METERS in the airplane.glb axis convention, so
+2 -2
View File
@@ -21,7 +21,7 @@ import { fromDegrees, toLonLatH } from '../../geo/ellipsoid.js';
import {
addSeconds,
julianLessThanOrEquals,
julianNow,
julianFromEpochMs,
julianToEpochMs,
} from '../../geo/julian.js';
import { clone, distanceSquared, vec } from '../../geo/vector.js';
@@ -441,7 +441,7 @@ export function createTracking({
// would draw the trail in front of the plane. They join the trail via _appendTrailFix
// as they age past the delay.
const seedRenderTime = addSeconds(
julianNow(),
julianFromEpochMs(flightState.now()),
-RENDER_DELAY_SEC,
flightState._scratchWarmupTime,
);