Merge origin/main: shipwrecks, news, transit fronts, signal-lost trails and uncredited photos on the renderer's ports

Upstream's layers and changes are carried onto the ports, with no Cesium
outside src/render and no reach into the viewer:

- Shipwrecks draw as one icon set, clicked through the input dispatcher.
- News draws through draw sets, the camera port and the input dispatcher;
  its beacons pulse each frame through the frame port.
- The scene occlusion probe moves into src/render/cesium and reaches
  detection through a new application hook, createOcclusionProbe; its
  private Cesium reads go through internals.js.
- Flight and military trails, the stale and SIGNAL LOST cue, coasting and
  following the world clock run on the draw and frame ports. GPU icons
  follow the scene clock while the world clock is followed, and fade when
  stale. A report that holds is not planned again every tick.
- Vessels are keyed by their record id.

The stub boot now enables military, shipwrecks and news as well.
This commit is contained in:
Sameh Khamis committed 2026-11-10 20:03:28 -08:00
commit a755f63638
331 files changed
+40654 -1666

No files matched your search

+22 -8
View File
@@ -1,6 +1,7 @@
import { createVesselFeed } from './ingestion.js';
import { VesselRecords } from './records.js';
import { DEFAULT_AIS_RUNTIME } from './policy.js';
import { DEFAULT_AIS_RUNTIME, followsClock } from './policy.js';
import { worldTimeFor } from '../../time/worldClock.js';
export function createVesselState({ source, services }) {
const {
@@ -28,6 +29,19 @@ export function createVesselState({ source, services }) {
vesselState._aisRuntime = DEFAULT_AIS_RUNTIME;
/** Follows the world clock while the source declares a timeline (set by the
* layer); see followsClock in policy.js. */
vesselState.timeline = null;
/** The world time the layer draws at while it follows the clock. */
vesselState.worldNow = worldTimeFor('ais-live-vessels');
/** The time records are judged at: the world's while following the clock. */
vesselState.recordsNow = () =>
followsClock(vesselState)
? vesselState.worldNow()
: vesselState._aisRuntime.now();
vesselState._aisSessionSequence = 0;
/**
@@ -43,15 +57,15 @@ export function createVesselState({ source, services }) {
vesselState.shipIconCache = new Map();
/** Row ids for unkeyed (no-MMSI) records, which are rebuilt every poll. */
/** Row ids for unkeyed (no-id) records, which are rebuilt every poll. */
vesselState._unkeyedIconSequence = 0;
// The ship whose icon is hidden under the bridge camera (cockpit subject).
vesselState._iconHiddenMmsi = null;
vesselState._iconHiddenId = null;
vesselState.state = {
feed: createVesselFeed(),
records: new VesselRecords({ now: () => vesselState._aisRuntime.now() }),
records: new VesselRecords({ now: () => vesselState.recordsNow() }),
viewer: null,
/** The vessels' icons as drawn (`iconBook.js`), and their draw set. */
@@ -75,14 +89,14 @@ export function createVesselState({ source, services }) {
activeFocusCount: 0,
activeLabelCount: 0,
selectedRecord: null,
/** @type {string|null} MMSI whose bridge the Cockpit camera occupies; its sprite and card stay hidden. */
cockpitSubjectMmsi: null,
/** @type {string|null} Id of the vessel whose bridge the Cockpit camera occupies; its sprite and card stay hidden. */
cockpitSubjectId: null,
/** @type {{setPositions: Function, clear: Function, destroy: Function}|null} Selected-vessel fading trail */
trail: null,
/** @type {{x: number, y: number, z: number}[]} Chronological ECEF trail vertices (oldest first) */
trailPositions: [],
/** @type {string|null} MMSI that owns the active selected-vessel trail. */
trailMmsi: null,
/** @type {string|null} Id of the vessel that owns the active selected-vessel trail. */
trailId: null,
/** @type {number} Monotonic token — invalidates in-flight backfill responses */
trailBackfillToken: 0,
trailAbort: null,