mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +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
@@ -49,7 +49,6 @@ import militaryFlightsLayer, {
|
||||
} from './militaryFlights.js';
|
||||
import { clearTr3bRegistry, setTr3b } from './tr3bRegistry.js';
|
||||
import { reportMeshFloorCell, _clearMeshFloorCellsForTest } from './groundFloor.js';
|
||||
import { setBillboard } from './billboardMirror.js';
|
||||
|
||||
// Sample altitudes are expressed RELATIVE to the band rather than as absolute
|
||||
// offsets. The thresholds have already been retuned once (1_000_000 → 150_000
|
||||
@@ -231,8 +230,8 @@ const LAYERS = [
|
||||
_setTrackedFlightRefreshStateForTest({
|
||||
icao24,
|
||||
entity: null,
|
||||
billboard,
|
||||
billboardCollection: { show: true, remove() {} },
|
||||
icon: billboard,
|
||||
iconLayer: { show: true, remove() {} },
|
||||
viewer,
|
||||
tracked,
|
||||
models,
|
||||
@@ -256,8 +255,8 @@ const LAYERS = [
|
||||
_setTrackedMilitaryRefreshStateForTest({
|
||||
icao24,
|
||||
entity: null,
|
||||
billboard,
|
||||
billboardCollection: { show: true, remove() {} },
|
||||
icon: billboard,
|
||||
iconLayer: { show: true, remove() {} },
|
||||
viewer,
|
||||
tracked,
|
||||
models,
|
||||
@@ -375,7 +374,7 @@ for (const fixture of LAYERS) {
|
||||
onGround: true,
|
||||
models: [[icao24, model]],
|
||||
});
|
||||
setBillboard(billboard, 'show', false);
|
||||
billboard.show = false;
|
||||
|
||||
let ownsVisual = fixture.driveFleetModel({ icao24, position, course: 92 });
|
||||
assert.equal(ownsVisual, false, 'cold terrain cannot transfer ownership to 3D');
|
||||
@@ -511,7 +510,7 @@ for (const fixture of LAYERS) {
|
||||
onGround: true,
|
||||
models: [[icao24, model]],
|
||||
});
|
||||
setBillboard(billboard, 'show', false);
|
||||
billboard.show = false;
|
||||
|
||||
const atA = Cesium.Cartesian3.fromDegrees(A_LON, LAT, 0);
|
||||
const atB = Cesium.Cartesian3.fromDegrees(B_LON, LAT, 0);
|
||||
@@ -646,7 +645,7 @@ for (const fixture of LAYERS) {
|
||||
0,
|
||||
1e-6,
|
||||
), 'a hidden tracked model cannot steal the detection anchor');
|
||||
setBillboard(billboard, 'show', false); // tracking hides the fleet sprite; the tracked entity remains the 2D owner
|
||||
billboard.show = false; // tracking hides the fleet sprite; the tracked entity remains the 2D owner
|
||||
const loadingNearby = fixture.layer.getNearby(billboard.position, 1_000, 50)
|
||||
.find((object) => object.icao24 === (fixture.name === 'flights' ? 'a0f001' : 'b0f001'));
|
||||
assert.ok(loadingNearby, 'the tracked contact remains in proximity while its model loads');
|
||||
@@ -685,7 +684,7 @@ for (const fixture of LAYERS) {
|
||||
|
||||
viewer.tileset.tilesLoaded = false;
|
||||
sampledHeight = undefined;
|
||||
setBillboard(billboard, 'position', Cesium.Cartesian3.fromDegrees(-97.71, 30.21, -500));
|
||||
billboard.position = Cesium.Cartesian3.fromDegrees(-97.71, 30.21, -500);
|
||||
fixture.driveTrackedModel();
|
||||
assert.equal(model.show, true,
|
||||
'a successful cached snap survives a poll-time vertical datum change');
|
||||
@@ -695,7 +694,7 @@ for (const fixture of LAYERS) {
|
||||
// Taxi past the resample threshold with the tiles gone: the tracked model
|
||||
// holds its last measured floor rather than handing the operator's own
|
||||
// selection back to a 2D glyph for a retry backoff.
|
||||
setBillboard(billboard, 'position', Cesium.Cartesian3.fromDegrees(-97.709, 30.21, -500));
|
||||
billboard.position = Cesium.Cartesian3.fromDegrees(-97.709, 30.21, -500);
|
||||
fixture.driveTrackedModel();
|
||||
assert.equal(model.show, true,
|
||||
'a taxi-invalidated tracked snap is HELD through the resample outage');
|
||||
@@ -704,7 +703,7 @@ for (const fixture of LAYERS) {
|
||||
assert.equal(sampleCalls, 1, 'the hold costs no extra synchronous sample');
|
||||
|
||||
// Past the drift bound the memory is released and the gate takes over.
|
||||
setBillboard(billboard, 'position', Cesium.Cartesian3.fromDegrees(-97.707, 30.21, -500));
|
||||
billboard.position = Cesium.Cartesian3.fromDegrees(-97.707, 30.21, -500);
|
||||
fixture.driveTrackedModel();
|
||||
assert.equal(model.show, false,
|
||||
'past HELD_SNAP_MAX_DRIFT_M the hold is released and the model is withheld');
|
||||
|
||||
Reference in new issue
Block a user