Delete the billboard and model mirrors; models become layer-held records

Aircraft draw from GPU icon sets, so the billboard mirror, the billboard
treatment and the aircraft visual-state module had no callers left. 3D models
are now records the layer holds under the contact's id (modelRecord.js):
show and placement are written through showModel/placeModel and read back
from the record; renderer-measured values stay on record.model.

The tracked-model click check only matches when a tracked model exists, so
an id-only pick is never mistaken for a click on the tracked plane.
This commit is contained in:
Sameh Khamis committed 2026-11-03 22:36:27 -08:00
1 parent c9f1fcd425
commit 83ec9473b6
35 files changed
+391 -788

No files matched your search

+6 -7
View File
@@ -32,7 +32,6 @@ import {
DISPLAY_CORRIDOR_CELL_BUDGET,
DISPLAY_CORRIDOR_FAIR_SHARE,
} from './policy.js';
import { modelState } from '../../data/modelMirror.js';
import { readEntityRecord } from '../../data/entityRecords.js';
import {
aircraftMotionRegime,
@@ -476,10 +475,10 @@ export function createMotion({
flightState.records.data.get(flightState._trackedIcao)?.klass,
);
return modelVisualAnchor(
modelState(flightState._trackedModel).modelMatrix,
flightState._trackedModel.matrix,
spec.visualCenterNative,
Number.isFinite(flightState._trackedModel.computedScale)
? flightState._trackedModel.computedScale
Number.isFinite(flightState._trackedModel.model.computedScale)
? flightState._trackedModel.model.computedScale
: spec.scale,
flightState._trackedVisualPos,
);
@@ -505,7 +504,7 @@ export function createMotion({
)
return null;
return Cesium.Matrix4.getTranslation(
modelState(flightState._trackedModel).modelMatrix,
flightState._trackedModel.matrix,
flightState._scratchTrailClip,
);
}
@@ -520,8 +519,8 @@ export function createMotion({
const spec = parts.rendering._modelSpec(
flightState.records.data.get(flightState._trackedIcao)?.klass,
);
const scale = Number.isFinite(flightState._trackedModel.computedScale)
? flightState._trackedModel.computedScale
const scale = Number.isFinite(flightState._trackedModel.model.computedScale)
? flightState._trackedModel.model.computedScale
: spec.scale;
return spec.nativeRadiusM * scale;
}