mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
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:
1 parent
c9f1fcd425
commit
83ec9473b6
35 files changed
+391
-788
No files matched your search
@@ -11,7 +11,6 @@ import {
|
||||
} from '../../data/contactMatch.js';
|
||||
import { LANDED_ALT_MAX_FT, LANDED_SPEED_MAX_MPS } from './policy.js';
|
||||
import { emergencyBroadcastPhrase } from '../../data/aircraftEmergency.js';
|
||||
import { modelState } from '../../data/modelMirror.js';
|
||||
|
||||
export function createQueries({
|
||||
flightState,
|
||||
@@ -450,7 +449,7 @@ export function createQueries({
|
||||
const isTracked = icao24 === flightState._trackedIcao;
|
||||
// Keep planes rendered as a 3D model (icon hidden) so the detection box
|
||||
// doesn't vanish on the 2D→3D handoff.
|
||||
const model = flightState._models.get(icao24);
|
||||
const record = flightState._models.get(icao24);
|
||||
const modelOwnsVisual = parts.rendering._modelOwnsVisual(icao24);
|
||||
if (!isTracked && !icons.shown(row) && !modelOwnsVisual) continue;
|
||||
const info = flightState.records.data.get(icao24);
|
||||
@@ -479,10 +478,10 @@ export function createQueries({
|
||||
icons.position(row, tau, object._iconPos)
|
||||
: modelOwnsVisual
|
||||
? modelVisualAnchor(
|
||||
modelState(model).modelMatrix,
|
||||
record.matrix,
|
||||
spec.visualCenterNative,
|
||||
Number.isFinite(model.computedScale)
|
||||
? model.computedScale
|
||||
Number.isFinite(record.model.computedScale)
|
||||
? record.model.computedScale
|
||||
: spec.scale,
|
||||
object._weldPos || (object._weldPos = new Cesium.Cartesian3()),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user