Files
gods-eye-view/src/data/militaryFlights.js
T
Sameh Khamis 9fde0a2a59 Draw military flights from the shared GPU icon set
The flights icon planning and presentation move into
`createAircraftIcons` (src/data/aircraftIconLayer.js), and the motion
regime both layers dead-reckon from into src/data/aircraftMotionRegime.js.
Flights keeps only its grounded-floor pass on top.

Military now draws every contact as a row of that icon set, like
flights: the billboards, the cull positions and the rotation-pass
signature go. Tracking hides the row and untracking re-plans it from
the tracked course. Queries read the drawn row position and judge the
horizon as the shader does. Snapshots that arrive before init or after
destroy are ignored, and per-contact lookups find no contact then
instead of throwing.

With about 120 live military contacts, preRender p95 drops from
0.7-0.8 ms to 0.2 ms on the same views. Render time and frame gaps are
unchanged or slightly lower.
2026-11-03 20:30:43 -08:00

39 lines
2.0 KiB
JavaScript

import { defaultSurface } from './surfaceServices.js';
import { createApplicationMilitary } from '../app/layers/militaryFlights.js';
import { createMilitarySource } from '../sources/live/standalone.js';
import * as militaryRegistry from './militaryRegistry.js';
const militaryFlightsLayer = createApplicationMilitary({
surface: defaultSurface,
source: createMilitarySource(),
militaryRegistry,
});
export { TRACKED_MODEL_MAX_PX } from '../layers/military/policy.js';
export const _setTrackedMilitaryRefreshStateForTest =
militaryFlightsLayer.testing._setTrackedMilitaryRefreshStateForTest;
export const _setMilitaryTrackingRefreshOutcomeForTest =
militaryFlightsLayer.testing._setMilitaryTrackingRefreshOutcomeForTest;
export const _addMilitaryTrackingCandidateForTest =
militaryFlightsLayer.testing._addMilitaryTrackingCandidateForTest;
export const _pendingMilitaryTrackingRestoreForTest =
militaryFlightsLayer.testing._pendingMilitaryTrackingRestoreForTest;
export const _applyPendingMilitaryTrackingRestoreForTest =
militaryFlightsLayer.testing._applyPendingMilitaryTrackingRestoreForTest;
export const _setCockpitDetectionSubjectForTest =
militaryFlightsLayer.testing._setCockpitDetectionSubjectForTest;
export const _trackedModelRegimeActiveForTest =
militaryFlightsLayer.testing._trackedModelRegimeActiveForTest;
export const _updateTrackedModelForTest =
militaryFlightsLayer.testing._updateTrackedModelForTest;
export const _trackedBillboardColorForTest =
militaryFlightsLayer.testing._trackedBillboardColorForTest;
export const _driveFleetModelHandoffForTest =
militaryFlightsLayer.testing._driveFleetModelHandoffForTest;
export const _ensureFleetModelForTest =
militaryFlightsLayer.testing._ensureFleetModelForTest;
export const _iconForTest = militaryFlightsLayer.testing._iconForTest;
export const _setIconForTest = militaryFlightsLayer.testing._setIconForTest;
export const mapAnalystRecord = militaryFlightsLayer.mapAnalystRecord;
export default militaryFlightsLayer;