Files
gods-eye-view/src/data/flights.js
T
Sameh Khamis abe9f97768 Draw Flights and Military 3D models through draw-port model sets
The two aircraft layers' fleet and tracked models are now draw-port
models sets made each layer lifetime, re-posed and restyled in place,
instead of Cesium models in a collection of their own. Model records are
plain data; picks name the set and the contact, readiness comes from the
set's ready event, the IR boost restyles in place (unlit, white tint,
full blend), and the drawn scale comes from the camera pose and pixel
floor. Fleet writes go out together at the end of each tick, before the
icons they replace, and a failed write hands the contacts back to their
icons. A model that has not loaded is rewritten every few seconds so the
renderer can retry it, which replaces the tracked model's load-failure
budget. Models load off the tile-contended job queue, as before.

aircraftModelLayer.js, modelRecord.js and the flights and military
lifecycle and testing files, plus flights rendering.js, come off the
Cesium allow-list.
2026-11-07 17:10:38 -08:00

51 lines
2.5 KiB
JavaScript

import { defaultSurface } from './surfaceServices.js';
import { createApplicationFlights } from '../app/layers/flights.js';
import { createFlightSource } from '../sources/live/standalone.js';
import * as militaryRegistry from './militaryRegistry.js';
const flightsLayer = createApplicationFlights({
surface: defaultSurface,
source: createFlightSource(),
militaryRegistry,
});
export { TRACKED_MODEL_MAX_PX } from '../layers/flights/policy.js';
export const _floorGroundedDisplayPositionForTest =
flightsLayer.testing._floorGroundedDisplayPositionForTest;
export const _clearDisplayFloorStateForTest =
flightsLayer.testing._clearDisplayFloorStateForTest;
export const _setTrackedFlightRefreshStateForTest =
flightsLayer.testing._setTrackedFlightRefreshStateForTest;
export const _setFlightTrackingRefreshOutcomeForTest =
flightsLayer.testing._setFlightTrackingRefreshOutcomeForTest;
export const _addFlightTrackingCandidateForTest =
flightsLayer.testing._addFlightTrackingCandidateForTest;
export const _militaryLayerSuppressesForTest =
flightsLayer.testing._militaryLayerSuppressesForTest;
export const _armFlightTrackingRestoreForTest =
flightsLayer.testing._armFlightTrackingRestoreForTest;
export const _pendingFlightTrackingRestoreForTest =
flightsLayer.testing._pendingFlightTrackingRestoreForTest;
export const _applyPendingFlightTrackingRestoreForTest =
flightsLayer.testing._applyPendingFlightTrackingRestoreForTest;
export const _setCockpitDetectionSubjectForTest =
flightsLayer.testing._setCockpitDetectionSubjectForTest;
export const _trackedModelRegimeActiveForTest =
flightsLayer.testing._trackedModelRegimeActiveForTest;
export const _updateTrackedModelForTest =
flightsLayer.testing._updateTrackedModelForTest;
export const _trackedBillboardColorForTest =
flightsLayer.testing._trackedBillboardColorForTest;
export const _driveFleetModelHandoffForTest =
flightsLayer.testing._driveFleetModelHandoffForTest;
export const _ensureFleetModelForTest =
flightsLayer.testing._ensureFleetModelForTest;
export const _trackedModelForTest = flightsLayer.testing._trackedModelForTest;
export const _modelSetIdsForTest = flightsLayer.testing._modelSetIdsForTest;
export const _iconForTest = flightsLayer.testing._iconForTest;
export const _setIconForTest = flightsLayer.testing._setIconForTest;
export const _floorGroundedIconsForTest =
flightsLayer.testing._floorGroundedIconsForTest;
export const mapAnalystRecord = flightsLayer.mapAnalystRecord;
export default flightsLayer;