Merge origin/main into the renderer seam

Brings in main up to f24abfc88: cockpit subject providers, the render
failure notice, aircraft drawn in their own mesh colours, airport ground
vehicles, and an aircraft with no ground track facing its true heading.

Under the seam:
- The render failure notice lives in the Cesium adapter
  (src/render/cesium/renderFailure.js) and is the application hook
  renderFailureNotice({allowReload, store}); its private Cesium fields
  (Event's raise queue, the widget's render loop flag) are read through
  internals.js. The inline panel's timer waits while the frame port reports
  the loop stopped, and goes on after a Retry.
- Ordinary aircraft models draw white with the 'highlight' colour blend
  through the draw port; tracked and emergency colours tint the mesh.
- Held trains and transit vehicles hide their route set and markers through
  the draw port; the fleet model test fakes answer loads through the fake
  draw port instead of Cesium's glTF loader.
- The Cockpit's subject view follows and places the camera through the
  camera port.
This commit is contained in:
Sameh Khamis committed 2026-11-14 09:59:55 -08:00
commit 866a9816f2
142 files changed
+9067 -308

No files matched your search

+55 -19
View File
@@ -6,7 +6,9 @@ import {
bridgeEntryAllowed,
cockpitEntryAllowed,
orbitEntryAllowed,
subjectEntryAllowed,
} from '../contextModePolicy.js';
import { cockpitSubjectProviders } from '../cockpitSubjectProviders.js';
import { formatAwarenessLabel } from '../data/militaryAwarenessEngine.js';
import { enterCockpitWithTracking } from '../cockpitTracking.js';
import { cockpitVisionModeForStyle } from '../cockpitVisionPolicy.js';
@@ -63,8 +65,11 @@ export class CockpitCoordinator {
regionalDistanceM,
weatherCodeLabel,
acquireOrbitImagery,
cockpitSubjects,
} = services;
this._cockpitDisplayPortal = null;
// The application's own subjects (services.cockpitSubjects), checked once.
const subjectProviders = cockpitSubjectProviders(cockpitSubjects ?? []);
this.cockpitView = new CockpitViewController(viewer, {
services: {
flightsLayer,
@@ -112,6 +117,21 @@ export class CockpitCoordinator {
vesselsEnabled: !!this._dataManager?.isEnabled('ais-live-vessels'),
contextModeChanging: this._contextModeChanging,
}),
subjectProviders,
// A provider's subject needs its own layer on, no Context change in
// flight, and the provider's own say.
isSubjectEntryAllowed: (provider, candidate) =>
subjectEntryAllowed({
layerEnabled: this._isLayerEnabled(provider.layerId),
contextModeChanging: this._contextModeChanging,
providerAllows:
this.cockpitView?.callSubject(
provider,
'isEntryAllowed',
[candidate],
false,
) === true,
}),
isOrbitEntryAllowed: () =>
orbitEntryAllowed({
satellitesEnabled: !!this._dataManager?.isEnabled('satellites'),
@@ -201,6 +221,9 @@ export class CockpitCoordinator {
this.cockpitView.subjectKind === 'satellite'
)
return 'Cockpit is in an orbital view — exit it first, then track an aircraft to enter Cockpit';
// And in an application's own first-person view.
if (this.cockpitView?.active && this.cockpitView.subjectProvider)
return 'Cockpit is in another first-person view — exit it first, then track an aircraft to enter Cockpit';
if (!this._aircraftLayerEnabled)
return 'No aircraft layer is on — turn on Flights or Military Flights and track an aircraft to enter Cockpit';
return null;
@@ -220,6 +243,17 @@ export class CockpitCoordinator {
active && this.cockpitView?.subjectKind === 'satellite'
? this.cockpitView.readSatelliteInfo?.()
: null;
// And a provider's subject in use.
const provided =
active && this.cockpitView?.subjectProvider
? {
kind: this.cockpitView.subjectProvider.kind,
id: this.cockpitView.subjectId,
layerId: this.cockpitView.subjectProvider.layerId,
callsign: null,
name: this.cockpitView.lastSubjectFrame?.name ?? null,
}
: null;
const gateOpen = Boolean(this.cockpitView?.isEntryAllowed?.());
// "Could Cockpit be ENTERED right now" — so it is false while already
// inside, unconditionally. Cockpit takes the entity off
@@ -248,30 +282,32 @@ export class CockpitCoordinator {
? 'subject-layer-off'
: 'no-tracked-aircraft',
visionMode: this.cockpitView?.visionMode || null,
subject: satellite
? {
kind: 'satellite',
id: satellite.id,
layerId: satellite.layerId,
callsign: null,
name: satellite.name,
}
: vessel
subject: provided
? provided
: satellite
? {
kind: 'vessel',
id: vessel.id,
layerId: vessel.layerId,
kind: 'satellite',
id: satellite.id,
layerId: satellite.layerId,
callsign: null,
name: vessel.name,
name: satellite.name,
}
: info
: vessel
? {
kind: 'aircraft',
id: info.icao24 || info.id || null,
layerId: info.layerId || null,
callsign: info.callsign || null,
kind: 'vessel',
id: vessel.id,
layerId: vessel.layerId,
callsign: null,
name: vessel.name,
}
: null,
: info
? {
kind: 'aircraft',
id: info.icao24 || info.id || null,
layerId: info.layerId || null,
callsign: info.callsign || null,
}
: null,
navigation: snapshot
? {
canPrevious: Boolean(snapshot.navigation?.canPrevious),