From 36624cd329d28a3eadd1999e8816705bada1bfbb Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Tue, 17 Nov 2026 11:21:08 -0800 Subject: [PATCH 1/5] 3D models only within 3 km of the camera, at true size An aircraft, vessel, transit or rail vehicle now draws as its 3D model only when it is within 3 km of the camera, and as its icon farther away. A model already drawn is kept out to 3.6 km, so a vehicle on the edge does not flicker. Proximity and All use the same distance and still differ by how many models they allow (150 and 350). Models are drawn at their true size: the minimum pixel size that inflated distant models is gone. The camera altitude above which no model is considered is now the highest aircraft the layers draw (30 km) plus the 3.6 km, so a camera high above the ground still models an aircraft close to it. Cockpit's aircraft silhouettes keep their own 150/185 km and 400/450 km bands, since they are icons. --- README.md | 2 +- docs/CURRENT-STATE.md | 16 ++--- scripts/track-regression.mjs | 6 +- src/data/aircraftModelLayer.js | 25 +++---- src/data/aircraftModelLayer.test.mjs | 100 ++++++++++++++++++++------ src/data/cockpitModels.test.mjs | 23 +++--- src/data/detectionOcclusion.js | 5 +- src/data/fleetModelInstances.js | 9 ++- src/data/fleetModelInstances.test.mjs | 43 +++++++++-- src/layers/flights/motion.js | 10 ++- src/layers/flights/policy.js | 69 +++++++++--------- src/layers/flights/queries.js | 6 +- src/layers/flights/tracking.js | 10 ++- src/layers/localAdsb/index.test.mjs | 7 +- src/layers/localAdsb/models.js | 14 ++-- src/layers/military/motion.js | 10 ++- src/layers/military/policy.js | 53 +++++++------- src/layers/military/queries.js | 8 +-- src/layers/military/tracking.js | 10 ++- src/layers/rail/rendering.js | 6 +- src/layers/vessels/rendering.js | 6 +- src/testSupport/fleetModelFakes.mjs | 3 - 22 files changed, 260 insertions(+), 181 deletions(-) diff --git a/README.md b/README.md index ea347a7399..9c03f82c9a 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ We've got a plurality of sensor systems watching the planet right now. Satellite - **📡 Contacts:** A 250 km roster of everything near your target — step through live aircraft and drop into any cockpit. - **🎯 Click-to-track anything:** Camera locks on, draws a fading trail, surfaces full metadata — and a tracked fire or vessel hands you off to the nearest live camera in one click. - **🖊️ Voice whiteboard:** Speak annotations onto the world — real boundary polygons, marks, and routes. -- **🛫 3D fleet:** 122 procedural models drawn life size by type — airliners, business jets, helicopters, drones, ships, buses, trams and trains — and every contact swaps from glyph to 3D model as you close in. +- **🛫 3D fleet:** 122 procedural models drawn life size by type — airliners, business jets, helicopters, drones, ships, buses, trams and trains — and every contact within 3 km of the camera swaps from glyph to its 3D model. - **🎨 Reskin reality:** GLSL sensor looks over the normal globe — CRT, NVG, FLIR/thermal, Noir. - **🟩 Detection overlay:** Screen-space bounding boxes and IDs on everything in view. - **🎖️ Military HUD:** Tactical heads-up display with intelligence-style telemetry. diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 4a5d97da6e..2a62830363 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -4886,9 +4886,10 @@ down | auth-failed` (plus the unchanged `missing-key`/`unsupported`) with > at 45% of their normal presentation opacity to reduce visor clutter; callouts, > density, allocation, fade, and Outside tuning are unchanged and normal bracket > opacity returns on exit. AIR presentation follows the same retained 3D mode: -> Proximity uses 150/185 km and All uses 400/450 km. With 3D off, in-range -> contacts remain rotating 2D silhouettes; with 3D on, ready admitted models -> take over under the Cockpit cap of 60. Loading/capped contacts remain 2D, +> Proximity uses 150/185 km and All uses 400/450 km for the AIR silhouettes +> (`COCKPIT_AIR_*`). With 3D off, in-range contacts remain rotating 2D +> silhouettes; with 3D on, ready admitted models take over within 3 km under +> the Cockpit cap of 60. Loading/capped contacts remain 2D, > out-of-range contacts use rotation-free dots, and exit restores map treatment. > Its Radio popover exposes compact power, > transport, station, and volume controls. Cockpit Previous/Next changes the @@ -8013,19 +8014,18 @@ pins and share links already supply complete boxes. ### 3D Aircraft + Tracking (June 2026) -- **The TRACKED contact's 2D↔3D handoff is DEFAULT behaviour (2026-08-19), driven by camera distance alone.** It does NOT consult the DISPLAY-rail `3D` toggle, which continues to own the FLEET (the un-instanced draw-call budget stays the operator's decision). Policy lives in `src/data/trackedModelRegime.js` and is shared by both layers: enter below `TRACKED_MODEL_ENTER_ALT_M` = 150,000 m and hand back to the billboard only above `TRACKED_MODEL_EXIT_ALT_M` = 172,500 m. **The swap distance was set by playtesting on 2026-08-20:** a first pass at 1,000,000 m switched too early; 2D reads correctly at ~600 km and the handoff belongs at ~150 km. **Consequence, recorded on purpose:** the tracked contact now enters 3D NEARER than the FLEET does (`MODEL_ALT_CEIL_M` = 800,000 m, unchanged), so with the DISPLAY-rail `3D` toggle on, 150–800 km draws surrounding contacts as models while the selected one is still a glyph. Nothing double-draws (the fleet pass skips the tracked icao) and aligning the two is a fleet-side decision, deliberately out of scope. **The two thresholds are asymmetric on purpose:** a single threshold makes a tracked orbit sitting ON the boundary strobe billboard↔model as the camera's altitude wobbles across it. Do not collapse them. The latch is scoped per selection, so a new target re-evaluates against the ENTER ceiling rather than inheriting the previous target's exit band. Exactly ONE model is involved; it loads on demand when the regime opens, is HIDDEN (not released) on regime exit so re-entry has no load gap, and is released by the existing teardown on deselect/re-track/destroy. Cockpit and TR-3B suppression are unchanged. **Two invariants around it:** (a) the hysteresis latch AND the load-failure latch are per-selection state cleared by `_resetTrackedSelectionState()` in the tracking lifecycle (deselect / re-track / cross-layer / init / destroy) — the predicate's icao-change guard is defence only, since it needs a drawn frame while nothing is selected and the render governor's idle mode does not promise one; (b) on-demand loading is bounded at 3 attempts per selection with a 1.5 s backoff and one console warning naming the asset — the driver runs every `scene.preUpdate`, so an unbounded catch means a missing GLB spins load→reject at frame rate. The billboard stays the visual throughout a failed load. +- **The TRACKED contact draws as a model exactly when the fleet would.** `_trackedModelRegimeActive` (`src/layers/flights/tracking.js`, `src/layers/military/tracking.js`) asks the fleet's own rule: the DISPLAY-rail `3D` toggle on, the camera below the fleet ceiling, and a place in the fleet pass's nearest-first cap (`_trackedModelEligible`), so selecting a contact changes its colour, never its form or size. Cockpit and TR-3B suppression are unchanged. The tracked model loads on demand from the fleet set's bytes; on-demand loading is bounded at 3 attempts per selection with a 1.5 s backoff and one console warning naming the asset (the driver runs every `scene.preUpdate`, so an unbounded catch would spin load→reject at frame rate), and the load-failure budget is per-selection state cleared by `_resetTrackedSelectionState()` on deselect / re-track / cross-layer / init / destroy. The icon stays the visual throughout a failed load. - **Grounded 3D handoff is terrain-validity gated (2026-08-23).** A ready civilian or military glTF does not own the visual until `groundSnap` (`src/data/groundSnap.js`) can answer with a MEASURED photoreal-surface height. On success the layer writes `height + the model's measured belly offset` before revealing the model. Cache movement is measured on the WGS84 surface, not across altitude, so a stationary contact keeps its snap through poll-time vertical-datum changes. Model existence or GPU readiness alone never suppresses the billboard floor, and ordinary zoom/style/deselect transitions preserve a valid snap cache. **Two states, and the difference is the whole design.** COLD — nothing has ever resolved for this icao (tiles still streaming on first sight, sample failure, backoff after a first miss): there is no evidence of where the ground is, `heightFor` returns null, the model stays hidden and the depth-test-free 2D billboard remains opaque and floored. Tiles still streaming is not a miss: no sample is taken, so it earns no retry backoff, and the first fleet tick after the tiles settle samples (2026-11-15); only a sample that finds no ground backs off (2 s, doubling to 30 s). WARM — a snap resolved and then a >`MOVE_INVALIDATE_M` (50 m) taxi move stopped it answering directly: the measurement is DEMOTED to a bounded last-known rather than deleted, and it keeps answering while the resample is outstanding, so a taxiing aircraft does not pop 3D→2D→3D across a 2–30 s retry backoff. The bound is `HELD_SNAP_MAX_DRIFT_M` = 250 m from the spot the value was measured at, past which the hold is dropped rather than stretched and the contact is COLD again. It is spatial with no timer beside it (ground under a contact that has not moved does not change; what invalidates the value is the contact MOVING) and deliberately a quarter of the billboard chain's `HELD_FLOOR_MAX_DRIFT_KM` — that hold only ever RAISES a sprite, while a held snap IS the model's placement, so its error shows in both directions. A fresh sample releases the hold, and so does a ground flip (which already calls `forget`). **A loading model is HIDDEN, never zero-scaled:** admission sets `show = false` (Cesium's default is `true`, and an unplaced primitive would claim the visual at the identity matrix), and ownership is `ready && show` — Cesium 1.138's `Model.update` has no `show` guard, so hiding a primitive costs its load nothing. - **Ground-snap clock rollback recovery.** If the wall clock moves before the sampling-window start, ground snap opens a new window while retaining the normal four-samples-per-250-ms budget. Retry timestamps more than the maximum 30-second backoff ahead of the current clock are ignored. A smaller rollback can retain a bounded retry delay of up to 30 seconds. -- Commercial and military aircraft use the same high-level FLEET model regime: 2D billboards when zoomed out, optional glTF models when closer, controlled by the DISPLAY rail `3D` toggle and `Proximity` / `All` modes. Every model is one of the project's procedural fleet models (`public/models/fleet/`, MIT, 122 GLBs, about 2 MB in all; `public/models/README.md`), chosen per aircraft by `aircraftModelSpec` (`src/data/fleetModels.js`): the first of its ICAO type's callsign rules in `types.json` (`aircraft_callsign`) its callsign matches, else its type's entry, else the model of its `classifyAircraft` class for a type the map lacks, else its ADS-B emitter category's, else the default airliner. It is drawn LIFE SIZE: the type's published length over the model's built length (`src/layers/flights/modelSpec.js`, shared by Flights, Military Flights and Local ADS-B), and a grounded aircraft stands the model's scaled clearance above the ground. An airport ground vehicle (feed type `ZVEH`) is a fire truck (`FIRE…`), pushback tug (`PUSH…`, `TUG…`), van (`DEICER…`, `SQUID…`, `SQB…`) or else a car by its callsign, and a ground station (`GRND`) is an 11.8 m radio mast; these models (catalog category `other`) are drawn at their built size, and such a contact with no altitude stands on the ground instead of at the airborne default (`src/layers/flights/records.js`). `classifyAircraft` still picks the 2D icons. The whole set loads once, up front, when a layer that draws it starts (`loadFleetModelSet`, which logs `[Fleet] N/122 models (X MB) loaded in N ms`); models are built from those bytes, never fetched mid-session, and an aircraft stays its billboard until the set has loaded. Every aircraft model draws its mesh's own colours (`aircraftModelBlend`, `src/data/aircraftModelLighting.js`): Cesium's `ColorBlendMode.HIGHLIGHT` with white, in Flights, Military Flights and Local ADS-B alike; the tracked colour (cyan, or amber in Military Flights) and the emergency red multiply into the mesh, so its paint still shows. IR boost draws them flat white (`MIX` at `1.0`). Under NVG/FLIR (map preset or Cockpit vision) models render unlit flat-white at full alpha and scene fog is disabled (fog otherwise blacks out distant models with the globe hidden); state restores on exit. -- Vessels, Transit and Rail draw fleet models under the same DISPLAY rail `3D` toggle, at the same altitude ceiling, caps and add/keep radii as the aircraft (`FLEET_MODEL_POLICY`, `src/layers/flights/policy.js`; `createFleetModelLayer`, `src/data/fleetModelInstances.js`). A vessel's model follows its AIS ship type and is drawn at its reported length and beam (AIS static dimensions A+B and C+D, now carried on vessel rows as `length` and `beam`), standing at the sea surface, heading by true heading then course. An aid to navigation is not a hull: a vessel record whose type names a buoy, beacon, mark, RACON or light, or whose MMSI is an aid-to-navigation station's (`99MIDxxxx`), is `isAidToNavigation` (`src/data/vesselTypes.js`) and is drawn as the set's `buoys` model of the IALA mark its type names (`aidToNavigationModel`, `src/data/fleetModels.js`: cardinal N/E/S/W, port or starboard hand, preferred channel by its side, safe water, isolated danger, special mark; a beacon, light, light vessel, RACON or reference point with no mark of its own is the special mark), else a red can (`DEFAULT_AID_MODEL`), at its built size and facing north whatever heading it reports. A type is an aid's when it is one of the 32 kinds an aid report names or uses a word for one (buoy, beacon, cardinal, safe water, RACON, lighthouse and so on); a vessel that works on aids (`Buoy Tender`, `Buoy Layer`) is not one. Its icon is a bone-white ringed disc (`AID_TO_NAVIGATION_STYLE`, `src/data/vesselLabels.js`) instead of a chevron, never rotated, and its card, selected card and HUD readout (`src/layers/vessels/cards.js`) show its kind alone, whole, in that colour: no speed or heading, since a fixed mark has neither. AISStream subscribes to `AidsToNavigationReport` (message 21) by default, and the server names each report's aid type code (0 to 31) as its kind (`aidToNavigationTypeName`: `20` is `Cardinal Mark N`) rather than reading it as a ship type, and its name runs on into the report's `NameExtension`. A virtual aid (the report's `VirtualAtoN` flag: a mark broadcast where nothing physical stands) carries `virtual: true` on its row, and on its vessel source record (the live-source contract's `virtual`, `src/sources/live/contract.js`, false unless a source says true; any source may set it). It keeps its disc but never gets a model (`vesselModelSpec` returns null for it, and the vessel layer gathers no model item for it), and its card and readout add `VIRTUAL` after its kind. `aisStreamRows` (`server/providers/vessels/ais-store.js`) puts every vessel ahead of every aid, so a capped request (the layer asks for 12,000 rows) never gives up a ship for a buoy. The `vessels_in_area` tool (and the brief built on it) counts ships only: it leaves aids out of its rows, counts, breakdowns and speed stats. A transit vehicle's model follows its route's GTFS `route_type` when its record carries one and that type is a kind of the vehicle's mode (`types.json` `transit.route_types`: 200 a coach, 101 a high-speed set, 106 a regional DMU, 710 a double-decker), else its layer mode (`transit.modes`: bus, trolleybus, tram, cable car, subway, monorail, rail, funicular, gondola or ferry; a vehicle of `unknown` mode keeps its icon); a fleet hint that overrules the route (a bus on a tram route) leaves the type unused. A monorail and a gondola are raised by their `transit.elevation` lifts. A train's model follows its rail category and mode (rail, metro or tram). The bundled GTFS-Realtime proxy carries no route type, so its vehicles draw their mode's model; a source that adds `routeType` reaches the finer ones. Both stand on the road or rail top they are drawn on, without the 1.5 m `GROUND_FLOOR_LIFT_M` their icons carry, and are painted in their mode or category colour where the model's `_TINT` attribute marks it. A vessel model is clipped at its waterline (one clipping plane per model, at the model origin's horizontal plane), so its hull below the water never shows through a plain globe, which Cesium does not depth-test models against. Under the NVG/FLIR styles (the Flights `irBoost` parameter) these models render unlit flat white, as aircraft models do. Each vehicle's icon stays the visual until its model is loaded, ready and placed; a model is picked as its icon is, and a vehicle drawn as its model keeps its selection card and its place in the detection overlay. +- Commercial and military aircraft use the same high-level FLEET model regime: an aircraft draws as its glTF model only within 3 km of the camera (eye to aircraft: `MODEL_ADD_M` = 3,000 m, kept to `MODEL_KEEP_M` = 3,600 m so a contact on the edge does not flicker) and as its icon farther away, controlled by the DISPLAY rail `3D` toggle and `Proximity` / `All` modes. Both modes use the same radius and differ by their caps (`MODEL_MAX` 150, `MODEL_MAX_ALL` 350). Models are drawn at their true size, with no minimum pixel size. The fleet ceiling (`MODEL_ALT_CEIL_M`, 33,600 m) is the highest contact the layers draw (`MODEL_HIGHEST_CONTACT_M`, 30 km) plus the keep radius: above it no contact can be within range, so the eligibility pass is skipped; below it only the distance decides. Every model is one of the project's procedural fleet models (`public/models/fleet/`, MIT, 122 GLBs, about 2 MB in all; `public/models/README.md`), chosen per aircraft by `aircraftModelSpec` (`src/data/fleetModels.js`): the first of its ICAO type's callsign rules in `types.json` (`aircraft_callsign`) its callsign matches, else its type's entry, else the model of its `classifyAircraft` class for a type the map lacks, else its ADS-B emitter category's, else the default airliner. It is drawn LIFE SIZE: the type's published length over the model's built length (`src/layers/flights/modelSpec.js`, shared by Flights, Military Flights and Local ADS-B), and a grounded aircraft stands the model's scaled clearance above the ground. An airport ground vehicle (feed type `ZVEH`) is a fire truck (`FIRE…`), pushback tug (`PUSH…`, `TUG…`), van (`DEICER…`, `SQUID…`, `SQB…`) or else a car by its callsign, and a ground station (`GRND`) is an 11.8 m radio mast; these models (catalog category `other`) are drawn at their built size, and such a contact with no altitude stands on the ground instead of at the airborne default (`src/layers/flights/records.js`). `classifyAircraft` still picks the 2D icons. The whole set loads once, up front, when a layer that draws it starts (`loadFleetModelSet`, which logs `[Fleet] N/122 models (X MB) loaded in N ms`); models are built from those bytes, never fetched mid-session, and an aircraft stays its billboard until the set has loaded. Every aircraft model draws its mesh's own colours (`aircraftModelBlend`, `src/data/aircraftModelLighting.js`): Cesium's `ColorBlendMode.HIGHLIGHT` with white, in Flights, Military Flights and Local ADS-B alike; the tracked colour (cyan, or amber in Military Flights) and the emergency red multiply into the mesh, so its paint still shows. IR boost draws them flat white (`MIX` at `1.0`). Under NVG/FLIR (map preset or Cockpit vision) models render unlit flat-white at full alpha and scene fog is disabled (fog otherwise blacks out distant models with the globe hidden); state restores on exit. +- Vessels, Transit and Rail draw fleet models under the same DISPLAY rail `3D` toggle, at the same altitude ceiling, caps and 3 km add/keep radii as the aircraft, at true size (`FLEET_MODEL_POLICY`, `src/layers/flights/policy.js`; `createFleetModelLayer`, `src/data/fleetModelInstances.js`). A vessel's model follows its AIS ship type and is drawn at its reported length and beam (AIS static dimensions A+B and C+D, now carried on vessel rows as `length` and `beam`), standing at the sea surface, heading by true heading then course. An aid to navigation is not a hull: a vessel record whose type names a buoy, beacon, mark, RACON or light, or whose MMSI is an aid-to-navigation station's (`99MIDxxxx`), is `isAidToNavigation` (`src/data/vesselTypes.js`) and is drawn as the set's `buoys` model of the IALA mark its type names (`aidToNavigationModel`, `src/data/fleetModels.js`: cardinal N/E/S/W, port or starboard hand, preferred channel by its side, safe water, isolated danger, special mark; a beacon, light, light vessel, RACON or reference point with no mark of its own is the special mark), else a red can (`DEFAULT_AID_MODEL`), at its built size and facing north whatever heading it reports. A type is an aid's when it is one of the 32 kinds an aid report names or uses a word for one (buoy, beacon, cardinal, safe water, RACON, lighthouse and so on); a vessel that works on aids (`Buoy Tender`, `Buoy Layer`) is not one. Its icon is a bone-white ringed disc (`AID_TO_NAVIGATION_STYLE`, `src/data/vesselLabels.js`) instead of a chevron, never rotated, and its card, selected card and HUD readout (`src/layers/vessels/cards.js`) show its kind alone, whole, in that colour: no speed or heading, since a fixed mark has neither. AISStream subscribes to `AidsToNavigationReport` (message 21) by default, and the server names each report's aid type code (0 to 31) as its kind (`aidToNavigationTypeName`: `20` is `Cardinal Mark N`) rather than reading it as a ship type, and its name runs on into the report's `NameExtension`. A virtual aid (the report's `VirtualAtoN` flag: a mark broadcast where nothing physical stands) carries `virtual: true` on its row, and on its vessel source record (the live-source contract's `virtual`, `src/sources/live/contract.js`, false unless a source says true; any source may set it). It keeps its disc but never gets a model (`vesselModelSpec` returns null for it, and the vessel layer gathers no model item for it), and its card and readout add `VIRTUAL` after its kind. `aisStreamRows` (`server/providers/vessels/ais-store.js`) puts every vessel ahead of every aid, so a capped request (the layer asks for 12,000 rows) never gives up a ship for a buoy. The `vessels_in_area` tool (and the brief built on it) counts ships only: it leaves aids out of its rows, counts, breakdowns and speed stats. A transit vehicle's model follows its route's GTFS `route_type` when its record carries one and that type is a kind of the vehicle's mode (`types.json` `transit.route_types`: 200 a coach, 101 a high-speed set, 106 a regional DMU, 710 a double-decker), else its layer mode (`transit.modes`: bus, trolleybus, tram, cable car, subway, monorail, rail, funicular, gondola or ferry; a vehicle of `unknown` mode keeps its icon); a fleet hint that overrules the route (a bus on a tram route) leaves the type unused. A monorail and a gondola are raised by their `transit.elevation` lifts. A train's model follows its rail category and mode (rail, metro or tram). The bundled GTFS-Realtime proxy carries no route type, so its vehicles draw their mode's model; a source that adds `routeType` reaches the finer ones. Both stand on the road or rail top they are drawn on, without the 1.5 m `GROUND_FLOOR_LIFT_M` their icons carry, and are painted in their mode or category colour where the model's `_TINT` attribute marks it. A vessel model is clipped at its waterline (one clipping plane per model, at the model origin's horizontal plane), so its hull below the water never shows through a plain globe, which Cesium does not depth-test models against. Under the NVG/FLIR styles (the Flights `irBoost` parameter) these models render unlit flat white, as aircraft models do. Each vehicle's icon stays the visual until its model is loaded, ready and placed; a model is picked as its icon is, and a vehicle drawn as its model keeps its selection card and its place in the detection overlay. - **Aircraft models skip Cesium's dynamic environment map (2026-10-24).** Flights, Military Flights and Local ADS-B pass `environmentMapOptions: AIRCRAFT_ENVIRONMENT_MAP_OPTIONS` (`{ enabled: false }`, `src/data/aircraftModelLighting.js`) to every drawn model. Otherwise each `Model` renders the sky around it and reads it back from the GPU (`readPixels`) when it is first placed, and again whenever it moves more than 1 km, the scene's atmosphere settings change, or (under sunlight dynamic lighting) an hour of scene time passes (`DynamicEnvironmentMapManager`, Cesium 1.138). The models are lit from Cesium's default spherical harmonics instead, with no specular environment map, so the sky's model-lighting cube map no longer reaches aircraft. `src/data/aircraftModelLighting.test.mjs` pins the option at every drawn model call; every model is built from the fleet set loaded up front, so there is no separate preload. - The DISPLAY-rail `3D` toggle is the user-facing activation path for both aircraft layers. Their small approved GLBs build their render resources without Cesium's frame-spread job queue, preventing continuous Photorealistic 3D Tiles streaming from starving model readiness; model caps, tracking, camera, and fallback billboards are unchanged. -- **The `3D` toggle DEFAULTS ON in `proximity` on a first run.** Proximity is itself the budget — models appear only below `MODEL_ALT_CEIL_M` and only for the nearest `MODEL_MAX` in view — so the default costs nothing at globe scale, and `all` remains a deliberate opt-in. A fresh boot runs NO layer-state restoration (`LayerStateCoordinator.start()` returns early with neither a share payload nor stored state), so four independent initializers decide what a first-run operator sees and must agree: `booleanOption('models3d', 'e', true)` in `src/data/layerState.js`, `_models3dEnabled = true` in BOTH flight layers, `this._models3dEnabled = true` in `src/ui/aircraftDisplay.js`, and the `active` / `visible` classes on `#models3d-toggle` / `#models3d-mode-row` in `index.html`. All four are pinned together in `src/data/layerState.test.mjs`. Explicit state still wins: because the codec omits default-valued options, `models3d: false` is now what travels in a link (`lo=…f.e.0`) and restores OFF at both aircraft layers. **Consequence for returning users:** a stored `gev:layer-state:v2` blob is a FULL options snapshot, so a session that wrote one before this change carries `models3d:false` and keeps 3D off until the operator flips it (or clears the key) — the durable snapshot is treated as the recipient's own state, by design. -- **Consequence of the flip on the recorded tracked/fleet inversion:** the 150–800 km band where surrounding contacts draw as models while the SELECTED one is still a glyph is now what an operator sees WITHOUT arming anything. The inversion itself is unchanged and still deliberate (see `src/data/trackedModelRegime.js`); only its reachability changed. +- **The `3D` toggle DEFAULTS ON in `proximity` on a first run.** Proximity is itself the budget — models appear only within 3 km of the camera and only for the nearest `MODEL_MAX` — so the default costs nothing at globe scale, and `all` remains a deliberate opt-in. A fresh boot runs NO layer-state restoration (`LayerStateCoordinator.start()` returns early with neither a share payload nor stored state), so four independent initializers decide what a first-run operator sees and must agree: `booleanOption('models3d', 'e', true)` in `src/data/layerState.js`, `_models3dEnabled = true` in BOTH flight layers, `this._models3dEnabled = true` in `src/ui/aircraftDisplay.js`, and the `active` / `visible` classes on `#models3d-toggle` / `#models3d-mode-row` in `index.html`. All four are pinned together in `src/data/layerState.test.mjs`. Explicit state still wins: because the codec omits default-valued options, `models3d: false` is now what travels in a link (`lo=…f.e.0`) and restores OFF at both aircraft layers. **Consequence for returning users:** a stored `gev:layer-state:v2` blob is a FULL options snapshot, so a session that wrote one before this change carries `models3d:false` and keeps 3D off until the operator flips it (or clears the key) — the durable snapshot is treated as the recipient's own state, by design. - Civilian and military 2D aircraft use the established distance scale: `3×` near the camera and a `0.5×` floor from 8,000 km outward. A standard 20 px ambient icon therefore remains about 10 px at globe altitude while retaining the diff --git a/scripts/track-regression.mjs b/scripts/track-regression.mjs index 4e163cd398..b859a2e1a0 100644 --- a/scripts/track-regression.mjs +++ b/scripts/track-regression.mjs @@ -3279,8 +3279,8 @@ async function main() { // these pins with it rather than stranding them on stale numbers. const reg = await import(`${window.__gevQaSourceBase || '/src'}/layers/flights/policy.js`); window.__dfRegime = { - enter: reg.MODEL_PROX_ADD_M, - exit: reg.MODEL_PROX_KEEP_M, + enter: reg.MODEL_ADD_M, + exit: reg.MODEL_KEEP_M, }; // Zooming while following is safe: the tracked-camera framer positions // the camera ONCE per selection and is deliberately read-only on normal @@ -3976,7 +3976,7 @@ async function main() { // Hand the camera back to the CLOSE follow range before releasing. The // LOADING scenario below needs BOTH an active tracked regime and a // fleet model for this contact, and the fleet only admits models within - // MODEL_PROX_ADD_M of the camera — parking just inside the enter + // MODEL_ADD_M of the camera — parking just inside the enter // ceiling satisfies the regime but sits outside that add radius, which // silently starved the fleet half into a skip. await window.__dfZoomBelow(belowH + 500); diff --git a/src/data/aircraftModelLayer.js b/src/data/aircraftModelLayer.js index b601b3179e..5396633690 100644 --- a/src/data/aircraftModelLayer.js +++ b/src/data/aircraftModelLayer.js @@ -225,10 +225,10 @@ export function createAircraftModels({ return sets ? [sets.fleet.id, sets.tracked.id] : []; } - /** The FLEET's 3D-model regime: models3d enabled AND the camera zoomed in past the altitude - * ceiling. Since 2026-08-22 the toggle DEFAULTS ON in `proximity`, which is itself the - * budget: models only appear below MODEL_ALT_CEIL_M and only for the nearest MODEL_MAX in - * view. The toggle still OWNS the fleet — an operator who wants every in-view plane arms + /** The FLEET's 3D-model regime: models3d enabled AND the camera below the altitude ceiling, + * above which no contact can be within the model radius. Since 2026-08-22 the toggle DEFAULTS + * ON in `proximity`, which is itself the budget: models only appear within MODEL_ADD_M of the + * camera and only for the nearest MODEL_MAX. The toggle still OWNS the fleet — an operator who wants every in-view plane arms * `all`, and one who wants none turns 3D off — this predicate is unchanged. The TRACKED * contact routes through here too (`_trackedModelRegimeActive`), with its place in the * fleet's cap, so selecting a contact never changes its form. */ @@ -254,20 +254,17 @@ export function createAircraftModels({ : mapCap; } - /** Active ADD radius (m) — new planes inside this range get a model. Mode-aware: 'all' reaches far. */ + /** ADD radius (m) — new planes inside this range get a model. Both modes + * share it; they differ by their caps. */ function _modelAddDistM() { - return state._models3dMode === 'all' - ? policy.MODEL_ALL_ADD_M - : policy.MODEL_PROX_ADD_M; + return policy.MODEL_ADD_M; } - /** Active KEEP radius (m) — a modeled plane keeps its model out to here (hysteresis vs ADD). */ + /** KEEP radius (m) — a modeled plane keeps its model out to here (hysteresis vs ADD). */ function _modelKeepDistM() { - return state._models3dMode === 'all' - ? policy.MODEL_ALL_KEEP_M - : policy.MODEL_PROX_KEEP_M; + return policy.MODEL_KEEP_M; } /** What a grounded model's ground sample sees through: the vertical sample @@ -585,7 +582,6 @@ export function createAircraftModels({ specKey: _specKeyFor(meta), // type-change sync compares against this bellyM: spec.bellyM, scale: spec.scale, - minPixelSize: policy.MODEL_MIN_PX, }); record.url = resolveAsset(spec.url); record.gltf = _gltfOf(spec); @@ -690,7 +686,7 @@ export function createAircraftModels({ * in, can never stall or freeze the centering (the old model-graphic-on-entity failure mode). * * The model draws exactly as the fleet would draw this contact: the same - * asset at the same scale and `minPixelSize` (`MODEL_MIN_PX`), only its + * asset at the same scale (its true size), only its * tint the tracked colour; whether it draws at all is the fleet's rule too * (`_trackedModelRegimeActive`). Selecting a contact changes its colour, * never its size or form. */ @@ -736,7 +732,6 @@ export function createAircraftModels({ specKey: _specKeyFor(meta), // type-change sync compares against this bellyM: spec.bellyM, scale: spec.scale, - minPixelSize: policy.MODEL_MIN_PX, }); record.id = icao24; record.url = resolveAsset(spec.url); diff --git a/src/data/aircraftModelLayer.test.mjs b/src/data/aircraftModelLayer.test.mjs index 5db4baa4ce..18d6d463ec 100644 --- a/src/data/aircraftModelLayer.test.mjs +++ b/src/data/aircraftModelLayer.test.mjs @@ -4,25 +4,18 @@ import { createAircraftModels } from './aircraftModelLayer.js'; import { fakeDrawPort } from '../testSupport/fakeDrawPort.mjs'; import { bindRenderer } from '../render/rendererOf.js'; import { fromDegrees } from '../geo/ellipsoid.js'; +import * as flightsPolicy from '../layers/flights/policy.js'; +// The flights layer's own model policy: its radii, ceiling and caps. const POLICY = { - MODEL_ALT_CEIL_M: 800_000, + ...flightsPolicy, MODEL_MAX: 40, - MODEL_MAX_ALL: 350, - COCKPIT_MODEL_MAX: 60, - MODEL_PROX_ADD_M: 150_000, - MODEL_PROX_KEEP_M: 185_000, - MODEL_ALL_ADD_M: 400_000, - MODEL_ALL_KEEP_M: 450_000, - MODEL_MIN_PX: 24, - TRACKED_MODEL_MIN_PX: 48, - TRACKED_MODEL_MAX_PX: 600, MODEL_HEADING_OFFSET_DEG: 0, - FLEET_DR_INTERVAL_MS: 80, - TRACKED_MODEL_MAX_LOAD_FAILS: 3, - TRACKED_MODEL_RETRY_BACKOFF_MS: 1500, }; +/** The eye's height (m): 1 km above the contacts. */ +const EYE_M = 11_000; + const SPEC = { url: 'plane.glb', scale: 1, @@ -34,9 +27,9 @@ const SPEC = { /** * A fleet of airborne contacts at `positions` (icao → ECEF), drawn by a * models layer over a fake draw port whose fleet set can be told to fail a - * write. The eye sits above them at 30 km. + * write. The eye sits at `eyeM`, by default 1 km above them (`EYE_M`). */ -function fleetFixture(positions) { +function fleetFixture(positions, { eyeM = EYE_M } = {}) { const base = fakeDrawPort(); const removes = []; let failNextUpsert = false; @@ -67,7 +60,7 @@ function fleetFixture(positions) { }; }, }; - const eye = fromDegrees(-97.71, 30.21, 30_000); + const eye = fromDegrees(-97.71, 30.21, eyeM); const viewer = {}; bindRenderer(viewer, { draw, @@ -79,7 +72,7 @@ function fleetFixture(positions) { right: { x: 1, y: 0, z: 0 }, fovy: Math.PI / 3, aspectRatio: 1, - height: 30_000, + height: eyeM, }), }, }); @@ -185,7 +178,10 @@ function fleetFixture(positions) { }; } -const near = (k) => fromDegrees(-97.71 + k * 0.01, 30.21, 10_000); +// About 0.5 km apart, within 2 km of the eye. +const near = (k) => fromDegrees(-97.71 + k * 0.005, 30.21, 10_000); +/** A contact at the eye's height, `m` metres north of it. */ +const north = (m) => fromDegrees(-97.71, 30.21 + m / 110_850, EYE_M); const far = (k) => fromDegrees(-90 + k * 0.01, 30.21, 10_000); test('the fleet tick hands contacts to ready models and back without a gap', () => { @@ -326,7 +322,7 @@ test('fleet model alpha is worked out once a fleet tick from the camera then, as const position = near(1); const f = fleetFixture(new Map([['a1', position]])); assert.equal(f.fleet().spec.recede ?? null, null, 'the set does not recede'); - const eye = fromDegrees(-97.71, 30.21, 30_000); + const eye = fromDegrees(-97.71, 30.21, EYE_M); const expected = (focusFactor) => aircraftTreatmentAlpha({ baseAlpha: 0.8, @@ -336,7 +332,7 @@ test('fleet model alpha is worked out once a fleet tick from the camera then, as eye.y - position.y, eye.z - position.z, ), - cameraHeightM: 30_000, + cameraHeightM: EYE_M, }); try { // Recede from the eye on, so the haze is not 1 here. @@ -389,3 +385,67 @@ test('a contact not there yet at the time drawn has its fleet model hidden, as o f.tick(); assert.equal(f.fleet().items.get('a1').show, true, 'drawn again'); }); + +test('aircraft draw as models only within 3 km of the camera, in either mode', () => { + for (const mode of ['proximity', 'all']) { + const positions = new Map([ + ['inside', north(2_900)], + ['outside', north(3_100)], + ]); + const f = fleetFixture(positions); + f.state._models3dMode = mode; + f.tick(); + for (const id of positions.keys()) + if (f.fleet().items.has(id)) f.draw.ready(f.fleetId, id); + f.tick(); + assert.equal(f.shown.get('inside'), false, `${mode}: a model at 2.9 km`); + assert.equal(f.fleet().items.get('inside').show, true); + assert.equal(f.shown.get('outside'), true, `${mode}: an icon at 3.1 km`); + assert.equal(f.fleet().items.has('outside'), false); + } +}); + +test('a model is kept out to about 3.6 km, then its icon takes over', () => { + const positions = new Map([['a1', north(2_000)]]); + const f = fleetFixture(positions); + f.tick(); + f.draw.ready(f.fleetId, 'a1'); + f.tick(); + assert.equal(f.shown.get('a1'), false, 'a model at 2 km'); + positions.set('a1', north(3_500)); + f.tick(); + assert.equal(f.shown.get('a1'), false, 'kept at 3.5 km'); + assert.equal(f.fleet().items.get('a1').show, true); + positions.set('a1', north(3_700)); + f.tick(); + assert.equal(f.shown.get('a1'), true, 'released at 3.7 km'); + assert.equal(f.fleet().items.has('a1'), false); + positions.set('a1', north(3_300)); + f.tick(); + assert.equal( + f.fleet().items.has('a1'), + false, + 'not taken again until it is back within 3 km', + ); +}); + +test('a camera high above the ground still models an aircraft within 3 km of it', () => { + // A plane at 30 km with the camera 2 km above it: the altitude ceiling + // sits above every contact's height plus the keep radius. + const plane = fromDegrees(-97.71, 30.21, 30_000); + const f = fleetFixture(new Map([['high', plane]]), { eyeM: 32_000 }); + f.tick(); + f.draw.ready(f.fleetId, 'high'); + f.tick(); + assert.equal(f.shown.get('high'), false, 'its model draws it'); + assert.equal( + POLICY.MODEL_ALT_CEIL_M, + POLICY.MODEL_HIGHEST_CONTACT_M + POLICY.MODEL_KEEP_M, + ); +}); + +test('models are drawn at their true size, with no minimum pixel size', () => { + const f = fleetFixture(new Map([['a1', near(1)]])); + f.tick(); + assert.equal(f.fleet().items.get('a1').minPixelSize ?? 0, 0); +}); diff --git a/src/data/cockpitModels.test.mjs b/src/data/cockpitModels.test.mjs index 0d71584fa7..1e1cfd291e 100644 --- a/src/data/cockpitModels.test.mjs +++ b/src/data/cockpitModels.test.mjs @@ -70,19 +70,24 @@ for (const layer of LAYERS) { 'the tracked-model driver uses the cockpit-aware predicate'); }); - test(`${layer.name}: Cockpit uses standard Proximity and All radii with a lower cap`, () => { - assert.equal(numericConstant(source, 'MODEL_PROX_ADD_M'), 150_000); - assert.equal(numericConstant(source, 'MODEL_PROX_KEEP_M'), 185_000); - assert.equal(numericConstant(source, 'MODEL_ALL_ADD_M'), 400_000); - assert.equal(numericConstant(source, 'MODEL_ALL_KEEP_M'), 450_000); + test(`${layer.name}: models draw within 3 km in both modes; Cockpit's AIR band keeps its own radii`, () => { + assert.equal(numericConstant(source, 'MODEL_ADD_M'), 3000); + assert.equal(numericConstant(source, 'MODEL_KEEP_M'), 3600); assert.equal(numericConstant(source, 'COCKPIT_MODEL_MAX'), 60); const add = /^([ \t]*)function _modelAddDistM\b[\s\S]*?\n\1\}/m.exec(source)?.[0]; const keep = /^([ \t]*)function _modelKeepDistM\b[\s\S]*?\n\1\}/m.exec(source)?.[0]; - assert.match(add, /(?:(?:flightState|state)\.)?_models3dMode\s*===\s*'all'\s*\?\s*(?:policy\.)?MODEL_ALL_ADD_M\s*:\s*(?:policy\.)?MODEL_PROX_ADD_M/); - assert.match(keep, /(?:(?:flightState|state)\.)?_models3dMode\s*===\s*'all'\s*\?\s*(?:policy\.)?MODEL_ALL_KEEP_M\s*:\s*(?:policy\.)?MODEL_PROX_KEEP_M/); - assert.doesNotMatch(add, /COCKPIT_MODEL_ADD_M/); - assert.doesNotMatch(keep, /COCKPIT_MODEL_KEEP_M/); + assert.match(add, /return\s+(?:policy\.)?MODEL_ADD_M;/, 'Proximity and All share the add radius'); + assert.match(keep, /return\s+(?:policy\.)?MODEL_KEEP_M;/, 'Proximity and All share the keep radius'); + + // The AIR silhouettes are icons, not models: their band stays mode-aware. + assert.equal(numericConstant(source, 'COCKPIT_AIR_PROX_ADD_M'), 150_000); + assert.equal(numericConstant(source, 'COCKPIT_AIR_PROX_KEEP_M'), 185_000); + assert.equal(numericConstant(source, 'COCKPIT_AIR_ALL_ADD_M'), 400_000); + assert.equal(numericConstant(source, 'COCKPIT_AIR_ALL_KEEP_M'), 450_000); + const near = /^([ \t]*)function _refreshCockpitNearContacts\b[\s\S]*?\n\1\}/m.exec(source)?.[0]; + assert.match(near, /all\s*\?\s*COCKPIT_AIR_ALL_ADD_M\s*:\s*COCKPIT_AIR_PROX_ADD_M/); + assert.match(near, /all\s*\?\s*COCKPIT_AIR_ALL_KEEP_M\s*:\s*COCKPIT_AIR_PROX_KEEP_M/); const cap = /^([ \t]*)function _modelCap\b[\s\S]*?\n\1\}/m.exec(source)?.[0]; assert.match(cap, /Math\.min\(\s*(?:policy\.)?COCKPIT_MODEL_MAX/, diff --git a/src/data/detectionOcclusion.js b/src/data/detectionOcclusion.js index 8ef40d4c0f..459b2cfc73 100644 --- a/src/data/detectionOcclusion.js +++ b/src/data/detectionOcclusion.js @@ -19,9 +19,8 @@ * marker the scene itself hides behind geometry. Everything else keeps its * label exactly as before, which covers contacts high above the ground * (aircraft, satellites): their markers are drawn on top of the scene by - * design, their 3D models can be scaled up to a minimum pixel size and so fill - * the very pixel being read, and a label that hid while its marker stayed on - * screen would be the worse mismatch. + * design, their 3D models can fill the very pixel being read, and a label + * that hid while its marker stayed on screen would be the worse mismatch. * * This file is plain arithmetic; it never touches the renderer. */ diff --git a/src/data/fleetModelInstances.js b/src/data/fleetModelInstances.js index 5144eee392..d19ea852fe 100644 --- a/src/data/fleetModelInstances.js +++ b/src/data/fleetModelInstances.js @@ -111,8 +111,9 @@ let instances = 0; * @param {object} options.viewer The scene host. * @param {() => object|null} [options.display] `{models3d, models3dMode, * irBoost}`. - * @param {object} options.policy `{altitudeCeilingM, minimumPixelSize, - * cap, capAll, addM, addAllM, keepM, keepAllM, intervalMs}`. + * @param {object} options.policy `{altitudeCeilingM, cap, capAll, addM, + * keepM, intervalMs}`: both 3D modes share the add/keep radii and differ + * by their caps. Models are drawn at their true size. * @param {(url: string) => string} [options.resolveAsset] * @param {boolean} [options.waterline] Clip each model at its waterline. * @param {object} [options.draw] Stands in for the viewer's draw port (tests). @@ -202,8 +203,7 @@ export function createFleetModelLayer({ function refreshEligibility(items, prefs, eye) { const all = prefs.models3dMode === 'all'; const cap = all ? policy.capAll : policy.cap; - const addM = all ? policy.addAllM : policy.addM; - const keepM = all ? policy.keepAllM : policy.keepM; + const { addM, keepM } = policy; const candidates = []; for (const [id, item] of items) { if (!item.position || item.show === false || !item.spec?.url) continue; @@ -249,7 +249,6 @@ export function createFleetModelLayer({ ...(fleetAxisScale(item.spec) ? { axisScale: fleetAxisScale(item.spec) } : {}), - minPixelSize: policy.minimumPixelSize, environmentMap: AIRCRAFT_ENVIRONMENT_MAP_OPTIONS.enabled, ...(boost ? { diff --git a/src/data/fleetModelInstances.test.mjs b/src/data/fleetModelInstances.test.mjs index 0cf79bf492..ee120eb59b 100644 --- a/src/data/fleetModelInstances.test.mjs +++ b/src/data/fleetModelInstances.test.mjs @@ -19,6 +19,7 @@ import { vesselModelSpec, } from './fleetModels.js'; import { fetchPublicFile } from '../testSupport/fleetGlb.mjs'; +import { FLEET_MODEL_POLICY } from '../layers/flights/policy.js'; import { bindFakeDraw } from '../testSupport/fakeDrawPort.mjs'; import { eastNorthUp } from '../geo/frames.js'; import { fromDegrees, toLonLatH } from '../geo/ellipsoid.js'; @@ -29,15 +30,11 @@ console.info = () => {}; const set = await loadFleetModelSet({ fetchImpl: fetchPublicFile }); console.info = realInfo; +// The layers' own policy (3 km add, about 3.6 km keep), with small caps. const POLICY = Object.freeze({ - altitudeCeilingM: 800_000, - minimumPixelSize: 16, + ...FLEET_MODEL_POLICY, cap: 2, capAll: 4, - addM: 5_000, - addAllM: 20_000, - keepM: 6_000, - keepAllM: 24_000, intervalMs: 80, }); @@ -117,7 +114,7 @@ test('the icon stays the visual until the model is ready; only the nearest are d ); const near = models.items.get('near'); assert.equal(near.scale, spec.scale, 'drawn life size'); - assert.equal(near.minPixelSize, POLICY.minimumPixelSize); + assert.equal(near.minPixelSize ?? 0, 0, 'at its true size: no pixel floor'); assert.equal(near.meta, 'near', 'picked as its vehicle'); assert.equal(near.show, false, 'hidden until ready'); @@ -158,6 +155,38 @@ test('the icon stays the visual until the model is ready; only the nearest are d assert.equal(models.disposed, true); }); +test('vehicles draw as models within 3 km in either mode, and keep them to about 3.6 km', () => { + // The camera 1 km up: a vehicle `metres` east is sqrt(1 km² + metres²) away. + const at = (km) => Math.sqrt(km * km - 1) * 1_000; + for (const mode of ['proximity', 'all']) { + const { viewer, draw } = fakeViewer(); + const layer = createFleetModelLayer({ + viewer, + display: () => ({ models3d: true, models3dMode: mode }), + policy: POLICY, + }); + const spec = transitModelSpec(set, { mode: 'tram' }); + const items = new Map([ + ['in', itemAt(at(2.9), spec, { pickId: 'in' })], + ['out', itemAt(at(3.1), spec, { pickId: 'out' })], + ]); + layer.frame(items, 0); + const models = modelSet(draw); + assert.deepEqual( + [...models.items.keys()], + ['in'], + `${mode}: 2.9 km, not 3.1 km`, + ); + items.set('in', itemAt(at(3.5), spec, { pickId: 'in' })); + layer.frame(items, 100); + assert.ok(models.items.has('in'), `${mode}: kept at 3.5 km`); + items.set('in', itemAt(at(3.7), spec, { pickId: 'in' })); + layer.frame(items, 200); + assert.equal(models.items.size, 0, `${mode}: released at 3.7 km`); + layer.destroy(); + } +}); + test('models stay off above the altitude ceiling', () => { const { viewer, draw } = fakeViewer(POLICY.altitudeCeilingM + 1); const layer = createFleetModelLayer({ diff --git a/src/layers/flights/motion.js b/src/layers/flights/motion.js index 538c123e7f..60a5b04416 100644 --- a/src/layers/flights/motion.js +++ b/src/layers/flights/motion.js @@ -50,7 +50,6 @@ import { } from '../../data/modelVisualAnchor.js'; import { FOCUS_EVIDENCE_DEV, - MODEL_MIN_PX, TRACKED_BILLBOARD_SCALE_BY_DISTANCE, DR_CORRECTION_MS, COURSE_SLEW_DT_MAX_SEC, @@ -415,11 +414,11 @@ export function createMotion({ const spec = parts.rendering._modelSpec( flightState.records.data.get(icao24), ); - // Drawn as the fleet draws it: its own size, never under MODEL_MIN_PX. + // Drawn as the fleet draws it: at its true size. const focalLengthPx = viewportHeightPx / (2 * Math.tan(pose.fovy / 2)); const projectedDiameterPx = (2 * spec.nativeRadiusM * spec.scale * focalLengthPx) / rangeM; - return Math.max(MODEL_MIN_PX, projectedDiameterPx); + return projectedDiameterPx; } const sprite = readEntityRecord(flightState._trackedEntity)?.sprite; @@ -645,9 +644,8 @@ export function createMotion({ /** Trail endpoint for the rendered tracked owner. Brackets/readouts stay on * the visual centre; only the trail moves to the model's lower-centre hardpoint. */ /** The tracked model's rendered bounding radius (m), or 0 when no model of this - * contact is drawing. Carries the scale it is drawn at, which may be - * above `scale` to satisfy its pixel floor — the trail head has to be judged - * against the size the operator SEES, not the nominal one. */ + * contact is drawing, at the scale it is drawn at — the trail head has to + * be judged against the size the operator SEES. */ /** World-space origin of the tracked model, or null when no model of this * contact is drawing. This is the centre the rendered bounding sphere is * measured from, so the trail clip and the envelope agree on one frame. */ diff --git a/src/layers/flights/policy.js b/src/layers/flights/policy.js index 839be56fef..1e35bb869d 100644 --- a/src/layers/flights/policy.js +++ b/src/layers/flights/policy.js @@ -39,18 +39,27 @@ export const EMERGENCY_TINT = rgba(EMERGENCY_TINT_CSS); export const GROUND_SCALE = 0.8; // --- 3D model rendering (B3) --------------------------------------------------------- -// When enabled, aircraft render as 3D glTF models once the camera is below MODEL_ALT_CEIL_M -// (zoomed in); higher up they stay flat billboards. Eligibility is FRUSTUM-based (on-screen), and -// the slots go to either the nearest planes ('proximity') or every in-view plane ('all'), each -// backed by a hard cap so a draw-call explosion can't tank the frame (no instancing yet). +// When enabled, an aircraft draws as its 3D glTF model only within MODEL_ADD_M of the camera +// (eye to aircraft); farther away it stays its icon. Models are drawn at their true size, with no +// minimum pixel size, so a model never balloons past its real extent. Eligibility is distance-based +// with on-screen priority, and the slots go to either the nearest planes ('proximity') or every +// in-range plane ('all'): the two modes share the radius and differ by their caps, each a hard +// bound on the frame cost (every model is its own draw call). -export const MODEL_ALT_CEIL_M = 800000; -// m: below this camera altitude, draw 3D models (raised so it's easy to trigger) +export const MODEL_ADD_M = 3000; +// model NEW planes within 3 km of the camera -export const MODEL_MIN_PX = 24; -// floor so distant models stay visible WITHOUT ballooning into a giant -// min-pixel blob (was 54 — far planes at the All radius became white -// star-bursts); ~matches the 2D icon size so the model↔billboard read is consistent +export const MODEL_KEEP_M = 3600; +// KEEP modeled planes out to 3.6 km: the hysteresis band (KEEP > ADD) stops a plane on the edge +// from releasing and reloading its model as the camera moves (the zoom/pan flicker) + +export const MODEL_HIGHEST_CONTACT_M = 30000; +// m above the ellipsoid: no aircraft the layers draw flies higher (airliners cruise near 12 km, +// the highest-flying aircraft near 21 km) + +export const MODEL_ALT_CEIL_M = MODEL_HIGHEST_CONTACT_M + MODEL_KEEP_M; +// m: above this camera altitude no contact can be within MODEL_KEEP_M, so no model is +// considered at all (the eligibility pass is skipped) // Per-mode caps. Each model is its own draw call (no instancing yet), so these bound the frame cost. @@ -58,29 +67,22 @@ export const MODEL_MAX = 150; // 'proximity' cap (the planes immediately around you) export const MODEL_MAX_ALL = 350; -// 'all' cap (everything out to ~the horizon) -// Per-mode ADD / KEEP radii. The two modes differ by RADIUS, not just cap — otherwise they look -// IDENTICAL whenever fewer than a cap's worth of planes are in range (field bug: Proximity and All -// rendered the same). 'proximity' = a tight ring; 'all' = roughly to the horizon (state-scale). Each -// band has hysteresis (KEEP > ADD) so a plane doesn't release+reload its model when it straddles the -// add edge (the zoom/pan flicker). Beyond ADD a model would force-clamp to minimumPixelSize into a -// giant floating blob (the old 422 km airport-cluster bug), so far planes stay 2D dots; the cap + -// on-screen priority then spend the model slots on planes you can actually see. - -export const MODEL_PROX_ADD_M = 150000; -// proximity: model NEW planes within 150 km - -export const MODEL_PROX_KEEP_M = 185000; -// proximity: KEEP modeled planes out to 185 km +// 'all' cap (every plane in range) export const COCKPIT_MODEL_MAX = 60; // max concurrent GLBs in cockpit (never raises the map cap) -export const MODEL_ALL_ADD_M = 400000; -// all: model NEW planes within 400 km (~to the horizon) +// Cockpit's AIR band: contacts within it draw as aircraft silhouettes, beyond +// it as compact dots. Independent of the 3D model radius; per 3D mode, each +// with its keep hysteresis. -export const MODEL_ALL_KEEP_M = 450000; -// all: KEEP modeled planes out to 450 km +export const COCKPIT_AIR_PROX_ADD_M = 150000; + +export const COCKPIT_AIR_PROX_KEEP_M = 185000; + +export const COCKPIT_AIR_ALL_ADD_M = 400000; + +export const COCKPIT_AIR_ALL_KEEP_M = 450000; export const MODEL_HEADING_OFFSET_DEG = 180; // every fleet model is nose -X: opposite the renderer's heading 0 @@ -201,18 +203,15 @@ export const FLEET_DR_INTERVAL_MS = 80; /** * The icon-to-model rules the aircraft layers follow, as the Vessels, Transit * and Rail layers take them (`createFleetModelLayer`): the same altitude - * ceiling, minimum pixel size, proximity/all caps, add/keep radii and - * eligibility cadence, so every layer turns icons into models at one distance. + * ceiling, proximity/all caps, add/keep radii and eligibility cadence, so + * every layer turns icons into models at one distance, drawn at true size. */ export const FLEET_MODEL_POLICY = Object.freeze({ altitudeCeilingM: MODEL_ALT_CEIL_M, - minimumPixelSize: MODEL_MIN_PX, cap: MODEL_MAX, capAll: MODEL_MAX_ALL, - addM: MODEL_PROX_ADD_M, - addAllM: MODEL_ALL_ADD_M, - keepM: MODEL_PROX_KEEP_M, - keepAllM: MODEL_ALL_KEEP_M, + addM: MODEL_ADD_M, + keepM: MODEL_KEEP_M, intervalMs: FLEET_DR_INTERVAL_MS, }); diff --git a/src/layers/flights/queries.js b/src/layers/flights/queries.js index 365af11db6..e6b54b5f48 100644 --- a/src/layers/flights/queries.js +++ b/src/layers/flights/queries.js @@ -345,11 +345,11 @@ export function createQueries({ /** * Live layer params. - * `models3d` toggles 3D glTF model rendering for the FLEET (altitude-gated): when on, - * surrounding aircraft become 3D models once the camera is zoomed in past MODEL_ALT_CEIL_M. + * `models3d` toggles 3D glTF model rendering for the FLEET: when on, aircraft within + * MODEL_ADD_M (3 km) of the camera become 3D models, drawn at their true size. * The TRACKED contact follows the same rule (`_trackedModelRegimeActive`), so selecting * a contact never turns its icon into a model or its model into an icon. - * `models3dMode` is 'proximity' (nearest MODEL_MAX in view) or 'all' (every in-view plane). + * `models3dMode` is 'proximity' (cap MODEL_MAX) or 'all' (cap MODEL_MAX_ALL); both use the 3 km radius. * @param {{models3d?: boolean, models3dMode?: 'proximity'|'all', selectedFlightsTrackingId?: string|null}} params */ setParams(params = {}, { origin = 'programmatic' } = {}) { diff --git a/src/layers/flights/tracking.js b/src/layers/flights/tracking.js index 8017e05170..25a60a929e 100644 --- a/src/layers/flights/tracking.js +++ b/src/layers/flights/tracking.js @@ -28,6 +28,10 @@ import { } from '../../data/trackingClickGesture.js'; import { inputFor } from '../../input/dispatcher.js'; import { + COCKPIT_AIR_ALL_ADD_M, + COCKPIT_AIR_ALL_KEEP_M, + COCKPIT_AIR_PROX_ADD_M, + COCKPIT_AIR_PROX_KEEP_M, TRAIL_MAX_POINTS, TRAIL_COLOR, CYAN_TRANSPARENT, @@ -222,11 +226,13 @@ export function createTracking({ ); distancesSquared.push([icao24, distanceSquared(eye, position)]); } + // The AIR band follows the 3D mode, not the 3D model radius. + const all = flightState._models3dMode === 'all'; const next = nextCockpitNearContacts( previous, distancesSquared, - parts.rendering._modelAddDistM(), - parts.rendering._modelKeepDistM(), + all ? COCKPIT_AIR_ALL_ADD_M : COCKPIT_AIR_PROX_ADD_M, + all ? COCKPIT_AIR_ALL_KEEP_M : COCKPIT_AIR_PROX_KEEP_M, ); flightState._cockpitNearContacts = next; for (const icao24 of previous) diff --git a/src/layers/localAdsb/index.test.mjs b/src/layers/localAdsb/index.test.mjs index 5b29e91a2f..83cd3043c7 100644 --- a/src/layers/localAdsb/index.test.mjs +++ b/src/layers/localAdsb/index.test.mjs @@ -196,13 +196,14 @@ function fakeFeeds(initial = {}) { }; } -/** A viewer whose camera looks down on (0°, 0°) from 50 km. */ +/** A viewer whose camera looks down on (0°, 0°) from 2 km: within the 3 km + * model radius of an aircraft there on the ground or at 10,000 ft. */ function modelViewer() { return fakeViewer( { scene: {} }, { - height: 50_000, - position: { x: 6_378_137 + 50_000, y: 0, z: 0 }, + height: 2_000, + position: { x: 6_378_137 + 2_000, y: 0, z: 0 }, direction: { x: -1, y: 0, z: 0 }, }, ); diff --git a/src/layers/localAdsb/models.js b/src/layers/localAdsb/models.js index 6875ef8c46..ac959da75f 100644 --- a/src/layers/localAdsb/models.js +++ b/src/layers/localAdsb/models.js @@ -11,15 +11,12 @@ import { aircraftLayerModelSpec } from '../flights/modelSpec.js'; import { fleetModelSet, loadFleetModelSet } from '../../data/fleetModels.js'; import { FLEET_DR_INTERVAL_MS, - MODEL_ALL_ADD_M, - MODEL_ALL_KEEP_M, + MODEL_ADD_M, MODEL_ALT_CEIL_M, MODEL_HEADING_OFFSET_DEG, + MODEL_KEEP_M, MODEL_MAX, MODEL_MAX_ALL, - MODEL_MIN_PX, - MODEL_PROX_ADD_M, - MODEL_PROX_KEEP_M, } from '../flights/policy.js'; import { AIRCRAFT_ENVIRONMENT_MAP_OPTIONS, @@ -173,19 +170,17 @@ export function createLocalAdsbModels({ function refreshEligibility(markers, preferences, pose) { const all = preferences.models3dMode === 'all'; const cap = all ? MODEL_MAX_ALL : MODEL_MAX; - const addM = all ? MODEL_ALL_ADD_M : MODEL_PROX_ADD_M; - const keepM = all ? MODEL_ALL_KEEP_M : MODEL_PROX_KEEP_M; const candidates = []; for (const [id, marker] of markers) { if (!marker.position) continue; const distanceSq = distanceSquared(pose.position, marker.position); - if (distanceSq > keepM * keepM) continue; + if (distanceSq > MODEL_KEEP_M * MODEL_KEEP_M) continue; candidates.push([id, distanceSq, inView(pose, marker.position)]); } candidates.sort((a, b) => a[1] - b[1]); eligible = selectModelEligible(candidates, { cap, - addDistSq: addM * addM, + addDistSq: MODEL_ADD_M * MODEL_ADD_M, isModeled: (id) => models.has(id), }); release([...models.keys()].filter((id) => !eligible.has(id))); @@ -263,7 +258,6 @@ export function createLocalAdsbModels({ roll: 0, }, scale: spec.scale, - minPixelSize: MODEL_MIN_PX, // The mesh's own colours (white, multiplied). tint: WHITE, colorBlend: aircraftModelBlend(false), diff --git a/src/layers/military/motion.js b/src/layers/military/motion.js index 2b1ffe24f0..eba23a21ad 100644 --- a/src/layers/military/motion.js +++ b/src/layers/military/motion.js @@ -44,7 +44,6 @@ import { import { displayDelayMs, followsClock, - MODEL_MIN_PX, BILLBOARD_SCALE, TRACKED_BILLBOARD_SCALE_BY_DISTANCE, DR_CORRECTION_MS, @@ -312,11 +311,11 @@ export function createMotion({ const spec = parts.rendering._modelSpec( flightState.records.data.get(icao24), ); - // Drawn as the fleet draws it: its own size, never under MODEL_MIN_PX. + // Drawn as the fleet draws it: at its true size. const focalLengthPx = viewportHeightPx / (2 * Math.tan(pose.fovy / 2)); const projectedDiameterPx = (2 * spec.nativeRadiusM * spec.scale * focalLengthPx) / rangeM; - return Math.max(MODEL_MIN_PX, projectedDiameterPx); + return projectedDiameterPx; } const sprite = readEntityRecord(flightState._trackedEntity)?.sprite; @@ -515,9 +514,8 @@ export function createMotion({ } /** The tracked model's rendered bounding radius (m), or 0 when no model of this - * contact is drawing. Carries the scale it is drawn at, which may be - * above `scale` to satisfy its pixel floor — the trail head has to be judged - * against the size the operator SEES, not the nominal one. */ + * contact is drawing, at the scale it is drawn at — the trail head has to + * be judged against the size the operator SEES. */ /** World-space origin of the tracked model, or null when no model of this * contact is drawing. This is the centre the rendered bounding sphere is * measured from, so the trail clip and the envelope agree on one frame. */ diff --git a/src/layers/military/policy.js b/src/layers/military/policy.js index 512674deb4..7d01f12ffa 100644 --- a/src/layers/military/policy.js +++ b/src/layers/military/policy.js @@ -61,21 +61,26 @@ export const MODEL_WHITE = rgba('#FFFFFF'); export const GROUND_SCALE = 0.8; // --- 3D model rendering (mirrors flights.js) ----------------------------------------- -// When enabled, military aircraft render as 3D glTF models once the camera is below -// MODEL_ALT_CEIL_M (zoomed in); higher up they stay flat billboards. Eligibility is -// FRUSTUM-based (on-screen), and the slots go to either the nearest planes ('proximity') -// or every in-view plane ('all'), each backed by a hard cap so a draw-call explosion -// can't tank the frame (no instancing yet). Each aircraft draws the fleet model of its -// type, as the flights layer does; the amber tint sets this layer apart. +// When enabled, a military aircraft draws as its 3D glTF model only within MODEL_ADD_M of the +// camera (eye to aircraft); farther away it stays its icon. Models are drawn at their true size, +// with no minimum pixel size. Eligibility is distance-based with on-screen priority, and the slots +// go to either the nearest planes ('proximity') or every in-range plane ('all'): the two modes share +// the radius and differ by their caps. Each aircraft draws the fleet model of its type, as the +// flights layer does; the amber tint sets this layer apart. -export const MODEL_ALT_CEIL_M = 800000; -// m: below this camera altitude, draw 3D models (raised so it's easy to trigger) +export const MODEL_ADD_M = 3000; +// model NEW planes within 3 km of the camera (mirror of flights.js) -export const MODEL_MIN_PX = 24; -// floor so distant models stay visible without ballooning into a min-pixel blob (mirror of flights.js) +export const MODEL_KEEP_M = 3600; +// KEEP modeled planes out to 3.6 km (hysteresis, mirror of flights.js) -// Per-mode caps + radii — mirror of flights.js. Modes differ by RADIUS (not just cap) so Proximity -// and All aren't identical when few planes are in range; on-screen planes win the cap (see flights.js). +export const MODEL_HIGHEST_CONTACT_M = 30000; +// m above the ellipsoid: no aircraft the layer draws flies higher (mirror of flights.js) + +export const MODEL_ALT_CEIL_M = MODEL_HIGHEST_CONTACT_M + MODEL_KEEP_M; +// m: above this camera altitude no contact can be within MODEL_KEEP_M (mirror of flights.js) + +// Per-mode caps — mirror of flights.js; on-screen planes win the cap (see flights.js). export const MODEL_MAX = 150; // 'proximity' cap @@ -83,24 +88,20 @@ export const MODEL_MAX = 150; export const MODEL_MAX_ALL = 350; // 'all' cap -export const MODEL_PROX_ADD_M = 150000; -// proximity: model NEW planes within 150 km - -export const MODEL_PROX_KEEP_M = 185000; -// proximity: KEEP modeled planes out to 185 km - -// Cockpit keeps the standard Display radii but lowers the GLB budget. Contacts -// inside the selected band remain AIR silhouettes when they cannot own a model; -// contacts outside the band use compact dots. - export const COCKPIT_MODEL_MAX = 60; // max concurrent GLBs in cockpit (never raises the map cap) -export const MODEL_ALL_ADD_M = 400000; -// all: model NEW planes within 400 km (~to the horizon) +// Cockpit's AIR band (mirror of flights.js): contacts inside it remain AIR +// silhouettes when they cannot own a model; contacts outside it use compact +// dots. Independent of the 3D model radius. -export const MODEL_ALL_KEEP_M = 450000; -// all: KEEP modeled planes out to 450 km +export const COCKPIT_AIR_PROX_ADD_M = 150000; + +export const COCKPIT_AIR_PROX_KEEP_M = 185000; + +export const COCKPIT_AIR_ALL_ADD_M = 400000; + +export const COCKPIT_AIR_ALL_KEEP_M = 450000; export const MODEL_HEADING_OFFSET_DEG = 180; // every fleet model is nose -X: opposite Cesium heading 0 diff --git a/src/layers/military/queries.js b/src/layers/military/queries.js index bd59490f24..75215175b0 100644 --- a/src/layers/military/queries.js +++ b/src/layers/military/queries.js @@ -249,11 +249,11 @@ export function createQueries({ /** * Live layer params. - * `models3d` toggles 3D glTF jet-model rendering for the FLEET (altitude-gated): when on, - * surrounding military aircraft become 3D models once the camera is zoomed in past - * MODEL_ALT_CEIL_M. The TRACKED contact follows the same rule (`_trackedModelRegimeActive`), + * `models3d` toggles 3D glTF jet-model rendering for the FLEET: when on, military + * aircraft within MODEL_ADD_M (3 km) of the camera become 3D models, drawn at their true + * size. The TRACKED contact follows the same rule (`_trackedModelRegimeActive`), * so selecting a contact never turns its icon into a model or its model into an icon. - * `models3dMode` is 'proximity' (nearest MODEL_MAX in view) or 'all' (every in-view plane). + * `models3dMode` is 'proximity' (cap MODEL_MAX) or 'all' (cap MODEL_MAX_ALL); both use the 3 km radius. * @param {{models3d?: boolean, models3dMode?: 'proximity'|'all', selectedMilitaryTrackingId?: string|null}} params */ setParams(params = {}, { origin = 'programmatic' } = {}) { diff --git a/src/layers/military/tracking.js b/src/layers/military/tracking.js index ef8e7d8673..f734cc3499 100644 --- a/src/layers/military/tracking.js +++ b/src/layers/military/tracking.js @@ -27,6 +27,10 @@ import { } from '../../data/trackingClickGesture.js'; import { inputFor } from '../../input/dispatcher.js'; import { + COCKPIT_AIR_ALL_ADD_M, + COCKPIT_AIR_ALL_KEEP_M, + COCKPIT_AIR_PROX_ADD_M, + COCKPIT_AIR_PROX_KEEP_M, TRAIL_MAX_POINTS, displayDelayMs, followsClock, @@ -212,11 +216,13 @@ export function createTracking({ ); distancesSquared.push([icao24, distanceSquared(eye, position)]); } + // The AIR band follows the 3D mode, not the 3D model radius. + const all = flightState._models3dMode === 'all'; const next = nextCockpitNearContacts( previous, distancesSquared, - parts.rendering._modelAddDistM(), - parts.rendering._modelKeepDistM(), + all ? COCKPIT_AIR_ALL_ADD_M : COCKPIT_AIR_PROX_ADD_M, + all ? COCKPIT_AIR_ALL_KEEP_M : COCKPIT_AIR_PROX_KEEP_M, ); flightState._cockpitNearContacts = next; for (const icao24 of previous) diff --git a/src/layers/rail/rendering.js b/src/layers/rail/rendering.js index b2c37b922e..6069611262 100644 --- a/src/layers/rail/rendering.js +++ b/src/layers/rail/rendering.js @@ -978,11 +978,7 @@ export function createRendering({ state, services, parts }) { if (now - modelCandidatesAtMs >= MODEL_CANDIDATES_MS) { modelCandidatesAtMs = now; const eye = cameraPose()?.position; - const policy = services.fleet.policy; - const keepM = - services.fleet.display?.()?.models3dMode === 'all' - ? policy.keepAllM - : policy.keepM; + const keepM = services.fleet.policy.keepM; const limitSq = keepM * keepM * 1.44; if (eye) for (const entry of state._trains.values()) { diff --git a/src/layers/vessels/rendering.js b/src/layers/vessels/rendering.js index 221306c835..a90a1c512e 100644 --- a/src/layers/vessels/rendering.js +++ b/src/layers/vessels/rendering.js @@ -614,11 +614,7 @@ export function createRendering({ ? findCamera(state.viewer)?.pose()?.position : null; if (!eye) return; - const policy = services.fleet.policy; - const keepM = - services.fleet.display?.()?.models3dMode === 'all' - ? policy.keepAllM - : policy.keepM; + const keepM = services.fleet.policy.keepM; const limitSq = keepM * keepM * 1.44; for (const record of state.records.all) { const waterline = getVisual(record).waterline; diff --git a/src/testSupport/fleetModelFakes.mjs b/src/testSupport/fleetModelFakes.mjs index daeb47e3cd..820ffb3f71 100644 --- a/src/testSupport/fleetModelFakes.mjs +++ b/src/testSupport/fleetModelFakes.mjs @@ -7,13 +7,10 @@ import { fetchPublicFile } from './fleetGlb.mjs'; /** A model policy whose eligibility is read again on every frame. */ export const FLEET_TEST_POLICY = Object.freeze({ altitudeCeilingM: 800_000, - minimumPixelSize: 16, cap: 4, capAll: 8, addM: 5_000, - addAllM: 20_000, keepM: 6_000, - keepAllM: 24_000, intervalMs: 0, }); From b041fea7a6760094032be5343e1efe18a8b5525f Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Tue, 17 Nov 2026 11:27:21 -0800 Subject: [PATCH 2/5] Deselecting a plane drawn as a model no longer flashes its icon A selected plane is drawn by its own model, and its fleet model was let go once that model drew. Deselecting showed the icon at once, and the icon stayed for about a second while a new fleet model loaded. The fleet model now stays loaded but hidden while the plane is selected, kept where the plane is. Deselecting hands the plane back to it in the same frame, and the icon shows only when there is no loaded fleet model. Military aircraft share this code. Vessels never swap models on selection, so they had no flash. --- docs/CURRENT-STATE.md | 2 +- src/data/aircraftModelLayer.js | 146 +++++++++++++++++++++------ src/data/aircraftModelLayer.test.mjs | 27 +++++ src/data/trackedModelForm.test.mjs | 102 ++++++++++++++++++- src/layers/flights/tracking.js | 7 +- src/layers/military/tracking.js | 7 +- 6 files changed, 248 insertions(+), 43 deletions(-) diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 2a62830363..d06d36b0f0 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -8014,7 +8014,7 @@ pins and share links already supply complete boxes. ### 3D Aircraft + Tracking (June 2026) -- **The TRACKED contact draws as a model exactly when the fleet would.** `_trackedModelRegimeActive` (`src/layers/flights/tracking.js`, `src/layers/military/tracking.js`) asks the fleet's own rule: the DISPLAY-rail `3D` toggle on, the camera below the fleet ceiling, and a place in the fleet pass's nearest-first cap (`_trackedModelEligible`), so selecting a contact changes its colour, never its form or size. Cockpit and TR-3B suppression are unchanged. The tracked model loads on demand from the fleet set's bytes; on-demand loading is bounded at 3 attempts per selection with a 1.5 s backoff and one console warning naming the asset (the driver runs every `scene.preUpdate`, so an unbounded catch would spin load→reject at frame rate), and the load-failure budget is per-selection state cleared by `_resetTrackedSelectionState()` on deselect / re-track / cross-layer / init / destroy. The icon stays the visual throughout a failed load. +- **The TRACKED contact draws as a model exactly when the fleet would.** `_trackedModelRegimeActive` (`src/layers/flights/tracking.js`, `src/layers/military/tracking.js`) asks the fleet's own rule: the DISPLAY-rail `3D` toggle on, the camera below the fleet ceiling, and a place in the fleet pass's nearest-first cap (`_trackedModelEligible`), so selecting a contact changes its colour, never its form or size. Cockpit and TR-3B suppression are unchanged. While a contact is selected its FLEET model stays loaded but hidden (`_keepTrackedFleetModel`, `src/data/aircraftModelLayer.js`): it draws the contact only until the tracked model is ready, and the fleet pass keeps it placed where the icon is (admitting one if the contact was an icon when selected and comes within range). Deselecting hands the contact back in the same frame (`_handBackDeselected`): to that fleet model when it is loaded, else to the icon, so a contact drawn as a model never flashes its icon while a new fleet model loads. The tracked model loads on demand from the fleet set's bytes; on-demand loading is bounded at 3 attempts per selection with a 1.5 s backoff and one console warning naming the asset (the driver runs every `scene.preUpdate`, so an unbounded catch would spin load→reject at frame rate), and the load-failure budget is per-selection state cleared by `_resetTrackedSelectionState()` on deselect / re-track / cross-layer / init / destroy. The icon stays the visual throughout a failed load. - **Grounded 3D handoff is terrain-validity gated (2026-08-23).** A ready civilian or military glTF does not own the visual until `groundSnap` (`src/data/groundSnap.js`) can answer with a MEASURED photoreal-surface height. On success the layer writes `height + the model's measured belly offset` before revealing the model. Cache movement is measured on the WGS84 surface, not across altitude, so a stationary contact keeps its snap through poll-time vertical-datum changes. Model existence or GPU readiness alone never suppresses the billboard floor, and ordinary zoom/style/deselect transitions preserve a valid snap cache. **Two states, and the difference is the whole design.** COLD — nothing has ever resolved for this icao (tiles still streaming on first sight, sample failure, backoff after a first miss): there is no evidence of where the ground is, `heightFor` returns null, the model stays hidden and the depth-test-free 2D billboard remains opaque and floored. Tiles still streaming is not a miss: no sample is taken, so it earns no retry backoff, and the first fleet tick after the tiles settle samples (2026-11-15); only a sample that finds no ground backs off (2 s, doubling to 30 s). WARM — a snap resolved and then a >`MOVE_INVALIDATE_M` (50 m) taxi move stopped it answering directly: the measurement is DEMOTED to a bounded last-known rather than deleted, and it keeps answering while the resample is outstanding, so a taxiing aircraft does not pop 3D→2D→3D across a 2–30 s retry backoff. The bound is `HELD_SNAP_MAX_DRIFT_M` = 250 m from the spot the value was measured at, past which the hold is dropped rather than stretched and the contact is COLD again. It is spatial with no timer beside it (ground under a contact that has not moved does not change; what invalidates the value is the contact MOVING) and deliberately a quarter of the billboard chain's `HELD_FLOOR_MAX_DRIFT_KM` — that hold only ever RAISES a sprite, while a held snap IS the model's placement, so its error shows in both directions. A fresh sample releases the hold, and so does a ground flip (which already calls `forget`). **A loading model is HIDDEN, never zero-scaled:** admission sets `show = false` (Cesium's default is `true`, and an unplaced primitive would claim the visual at the identity matrix), and ownership is `ready && show` — Cesium 1.138's `Model.update` has no `show` guard, so hiding a primitive costs its load nothing. - **Ground-snap clock rollback recovery.** If the wall clock moves before the sampling-window start, ground snap opens a new window while retaining the diff --git a/src/data/aircraftModelLayer.js b/src/data/aircraftModelLayer.js index 5396633690..03adf03219 100644 --- a/src/data/aircraftModelLayer.js +++ b/src/data/aircraftModelLayer.js @@ -562,12 +562,11 @@ export function createAircraftModels({ state._lastFleetTickMs = 0; } - /** Admit a fleet model for an aircraft; the icon shows until it is ready. */ + /** Admit a fleet model for an aircraft; the icon shows until it is ready. + * The selected aircraft's is admitted too, and kept loaded but hidden + * while its tracked model draws it (`_keepTrackedFleetModel`). */ function _ensureModel(icao24) { - // Never model the TRACKED aircraft — it owns a separate entity billboard, and the fleet - // tick skips it, so a model here would be orphaned + double-rendered. - if (icao24 === state._trackedIcao) return; onModelEligible(icao24); if (state._models.has(icao24)) return; // Without model sets (the renderer draws none) the icon stays. @@ -672,14 +671,106 @@ export function createAircraftModels({ ); } - /** A fleet model still drawing the tracked contact (it was a model when - * it was selected) lets go once the tracked model draws, or once the - * contact is no longer drawn as a model at all. */ + /** The tracked contact's fleet model lets go once the contact is no + * longer drawn as a model at all (out of range, 3D off, cockpit). */ function _releaseTrackedFleetModel() { if (state._trackedIcao && state._models.has(state._trackedIcao)) _releaseModel(state._trackedIcao); } + /** The tracked contact's fleet model (it was a model when it was + * selected, or was admitted since) stops drawing once the tracked model + * draws, or while the tracked icon carries the contact, but stays loaded: + * deselecting hands the contact straight back to it + * (`_handBackDeselected`), with no load and no icon in between. */ + function _hideTrackedFleetModel() { + const icao24 = state._trackedIcao; + const record = icao24 ? state._models.get(icao24) : null; + if (!record?.show) return; + showModel(record, false); + _send(state._modelSets?.fleet, icao24, record, _modelSpec(_metaOf(icao24))); + } + + /** Keep the tracked contact's fleet model loaded and placed where its icon + * is, one fleet tick at a time, so it is ready to take the contact back + * the moment it is deselected. It never shows here: it draws the contact + * only while the tracked model loads, as it did before the selection. */ + function _keepTrackedFleetModel(icao24, position, course, out) { + _ensureModel(icao24); + const record = state._models.get(icao24); + if (!record) return; + const meta = _metaOf(icao24); + const set = state._modelSets?.fleet ?? null; + _retryFailedFleetModel(set, icao24, record); + const displayPos = _modelDisplayPosition(icao24, position); + if (displayPos) placeModel(record, displayPos, _modelHeading(course, meta)); + else showModel(record, false); // nowhere safe to draw it + _send(set, icao24, record, _modelSpec(meta), out); + } + + /** + * Hand a contact just deselected back to the fleet in the same frame: to + * its fleet model when one is loaded (kept while it was selected), placed + * where its icon is and shown, else to its icon. Runs once the contact no + * longer reads as tracked. + * @param {string} icao24 + */ + function _handBackDeselected(icao24) { + const icons = state._icons; + const record = state._models.get(icao24); + if (!icons?.has(icao24)) { + if (record) _releaseModel(icao24); + return; + } + if (!record) { + icons.setShown(icao24, true); + return; + } + const pose = _pose(); + if (!pose || !_modelRegimeActive(pose) || isTr3b(icao24)) { + _releaseModel(icao24); // the icon takes it back + return; + } + const t = parts.icons._displayMs(); + const position = icons.position(icao24, t); + _driveFleetModelHandoff( + icao24, + record, + position, + icons.course(icao24, t), + () => + _treatFleetModel( + icao24, + record, + distance(pose.position, position), + pose, + ), + ); + } + + /** A fleet model's tint and alpha this tick: the contact's colour, faded + * as its icon is (focus, recession), or the IR boost's full-strength + * white. */ + function _treatFleetModel(icao24, record, cameraDistanceM, pose) { + const icons = state._icons; + _treat(record, { + // IR boost must survive the per-tick treatment write — otherwise + // any alpha change would repaint the ordinary tint over the hot + // white. Boosted models also skip the recession fade: hot targets + // stay full-strength at any range (icons keep their normal + // fade — full-opacity glyph walls read as overwhelming). + base: state._irBoost ? WHITE : rgba(_modelColor(icao24)), + alpha: state._irBoost + ? 1 + : aircraftTreatmentAlpha({ + baseAlpha: icons.alpha(icao24), + focusFactor: icons.focus(icao24), + cameraDistanceM, + cameraHeightM: pose.height, + }), + }); + } + /** Per-frame driver for the standalone tracked model. Runs every preUpdate (not the 80 ms fleet * cadence) so the centered plane moves smoothly. The tracked entity stays a pure billboard, so the * follow-camera's bounding sphere is ALWAYS ready — toggling 3D, or tracking while already zoomed @@ -713,7 +804,7 @@ export function createAircraftModels({ parts.icons._iconPosition(state._trackedIcao); if (!pos) { _hideTrackedModel(); - _releaseTrackedFleetModel(); + _hideTrackedFleetModel(); return; } const icao24 = state._trackedIcao; @@ -725,7 +816,7 @@ export function createAircraftModels({ // The icon carries it: after the load budget is spent, or until the // fleet model set has loaded. if (!_trackedModelLoadAllowed() || !spec.url) { - _releaseTrackedFleetModel(); + _hideTrackedFleetModel(); return; } const record = createModelRecord({ @@ -753,7 +844,7 @@ export function createAircraftModels({ const displayPos = _modelDisplayPosition(icao24, pos); if (!displayPos) { _hideTrackedModel(); // no ground evidence → the icon carries it - _releaseTrackedFleetModel(); + _hideTrackedFleetModel(); return; } placeModel( @@ -763,7 +854,7 @@ export function createAircraftModels({ ); showModel(record, record.ready); _send(state._modelSets.tracked, icao24, record, spec); - if (record.ready) _releaseTrackedFleetModel(); + if (record.ready) _hideTrackedFleetModel(); } /** @@ -915,8 +1006,6 @@ export function createAircraftModels({ const items = pendingItems; for (const icao24 of modelEligible) { if (isTr3b(icao24)) continue; - // The tracked contact's model is `_updateTrackedModel`'s. - if (icao24 === state._trackedIcao) continue; if (!icons.has(icao24)) continue; const position = icons.position(icao24, t); if ( @@ -939,6 +1028,17 @@ export function createAircraftModels({ } continue; } + // The tracked contact draws as `_updateTrackedModel` says; its fleet + // model is only kept ready for when it is deselected. + if (icao24 === state._trackedIcao) { + _keepTrackedFleetModel( + icao24, + position, + icons.course(icao24, t), + items, + ); + continue; + } _ensureModel(icao24); const record = state._models.get(icao24); const cameraDistanceM = distance(camPos, position); @@ -947,24 +1047,7 @@ export function createAircraftModels({ record, position, icons.course(icao24, t), - () => { - _treat(record, { - // IR boost must survive the per-tick treatment write — otherwise - // any alpha change would repaint the ordinary tint over the hot - // white. Boosted models also skip the recession fade: hot targets - // stay full-strength at any range (icons keep their normal - // fade — full-opacity glyph walls read as overwhelming). - base: state._irBoost ? WHITE : rgba(_modelColor(icao24)), - alpha: state._irBoost - ? 1 - : aircraftTreatmentAlpha({ - baseAlpha: icons.alpha(icao24), - focusFactor: icons.focus(icao24), - cameraDistanceM, - cameraHeightM: pose.height, - }), - }); - }, + () => _treatFleetModel(icao24, record, cameraDistanceM, pose), items, ); } @@ -992,6 +1075,7 @@ export function createAircraftModels({ _releaseModels, _showReleasedIcon, _releaseTrackedModel, + _handBackDeselected, _updateTrackedModel, _fleetTick, }; diff --git a/src/data/aircraftModelLayer.test.mjs b/src/data/aircraftModelLayer.test.mjs index 18d6d463ec..ed00379d05 100644 --- a/src/data/aircraftModelLayer.test.mjs +++ b/src/data/aircraftModelLayer.test.mjs @@ -449,3 +449,30 @@ test('models are drawn at their true size, with no minimum pixel size', () => { f.tick(); assert.equal(f.fleet().items.get('a1').minPixelSize ?? 0, 0); }); + +test('the selected contact keeps a loaded, hidden fleet model that takes it back on deselect', () => { + const positions = new Map([['a1', near(1)]]); + const f = fleetFixture(positions); + // Selected while an icon: the fleet pass admits its model all the same. + f.state._trackedIcao = 'a1'; + f.shown.set('a1', false); // selecting it hides its icon + f.tick(); + assert.ok(f.fleet().items.has('a1'), 'admitted and loading while selected'); + f.draw.ready(f.fleetId, 'a1'); + positions.set('a1', near(2)); + f.tick(); + const item = f.fleet().items.get('a1'); + assert.equal(item.show, false, 'never drawn while selected'); + assert.deepEqual( + item.pos, + { x: near(2).x, y: near(2).y, z: near(2).z }, + 'placed where its icon is', + ); + assert.equal(f.shown.get('a1'), false, 'the icon stays hidden'); + + // Deselected: its model draws it in the same frame, its icon never shows. + f.state._trackedIcao = null; + f.models._handBackDeselected('a1'); + assert.equal(f.fleet().items.get('a1').show, true); + assert.equal(f.shown.get('a1'), false); +}); diff --git a/src/data/trackedModelForm.test.mjs b/src/data/trackedModelForm.test.mjs index 27a137c8e4..cd5cbfe2ed 100644 --- a/src/data/trackedModelForm.test.mjs +++ b/src/data/trackedModelForm.test.mjs @@ -1176,11 +1176,10 @@ for (const fixture of LAYERS) { viewer.draw.ready(modelSet(fixture, viewer, 'tracked').spec.id, ICAO); fixture.driveTrackedModel(); - assert.equal( - fixture.ensureFleetModel(ICAO), - null, - 'once the tracked model draws, the fleet model lets go', - ); + const kept = fixture.ensureFleetModel(ICAO); + assert.ok(kept, 'once the tracked model draws, the fleet model is kept'); + assert.equal(kept.ready, true, 'loaded'); + assert.equal(kept.show, false, 'but hidden: one model draws the contact'); assert.equal( fixture.trackedBillboardColor()[3], 0, @@ -1192,6 +1191,99 @@ for (const fixture of LAYERS) { } }); + test(`${fixture.name}: deselecting hands the contact straight back to its loaded fleet model, with no icon flash`, () => { + clearTr3bRegistry(); + try { + fixture.layer.setParams({ models3d: true }); + const viewer = viewerAtHeight(30_000); + const position = Cesium.Cartesian3.fromDegrees(-97.71, 30.21, 10_668); + const icon = fixture.seed({ + viewer, + models: [ + [ + ICAO, + { + ready: true, + show: true, + modelMatrix: Cesium.Matrix4.fromTranslation(position), + }, + ], + ], + trackedModelEligible: null, + }); + fixture.driveTrackedModel(); + viewer.draw.ready(modelSet(fixture, viewer, 'tracked').spec.id, ICAO); + fixture.driveTrackedModel(); + assert.equal( + fixture.trackedModel().ready, + true, + 'the tracked model draws', + ); + icon.show = false; // as selecting it hides it + + fixture.layer.stopTracking(); + const fleetItem = modelSet(fixture, viewer, 'fleet').items.get(ICAO); + assert.equal( + fleetItem?.show, + true, + 'the kept fleet model draws the contact in the same frame', + ); + assert.equal(icon.show, false, 'and its icon never shows'); + assert.equal( + modelSet(fixture, viewer, 'tracked').items.has(ICAO), + false, + 'the tracked model is gone', + ); + } finally { + fixture.layer.setParams({ models3d: false }); + fixture.layer.stopTracking(); + } + }); + + test(`${fixture.name}: deselecting shows the icon only when no fleet model is loaded`, () => { + clearTr3bRegistry(); + try { + fixture.layer.setParams({ models3d: true }); + const viewer = viewerAtHeight(30_000); + // Selected as an icon: no fleet model at all. + let icon = fixture.seed({ + viewer, + models: [], + trackedModelEligible: null, + }); + fixture.layer.stopTracking(); + assert.equal(icon.show, true, 'no fleet model: the icon'); + + // A fleet model still loading when it is deselected. + icon = fixture.seed({ + viewer, + models: [[ICAO, { ready: false, show: false }]], + trackedModelEligible: null, + }); + fixture.layer.stopTracking(); + assert.equal(icon.show, true, 'a fleet model not loaded yet: the icon'); + assert.notEqual( + modelSet(fixture, viewer, 'fleet').items.get(ICAO)?.show, + true, + 'and the model stays hidden until it loads', + ); + + // 3D turned off meanwhile: the icon, and the fleet model goes. + icon = fixture.seed({ + viewer, + models: [[ICAO, { ready: true, show: false }]], + trackedModelEligible: null, + }); + fixture.layer.setParams({ models3d: false }); + fixture.layer.stopTracking(); + assert.equal(icon.show, true, '3D off: the icon'); + assert.equal(fixture.ensureFleetModel(ICAO), null, 'no fleet model kept'); + } finally { + fixture.layer.setParams({ models3d: false }); + fixture.layer.stopTracking(); + } + }); + test(`${fixture.name}: the tracked model draws at the fleet's scale and minimum pixel size, even up close`, () => { clearTr3bRegistry(); try { diff --git a/src/layers/flights/tracking.js b/src/layers/flights/tracking.js index 25a60a929e..7a9df41413 100644 --- a/src/layers/flights/tracking.js +++ b/src/layers/flights/tracking.js @@ -703,10 +703,11 @@ export function createTracking({ // Hand the contact back to its icon only now: settling floors a grounded // contact, and while it still read as tracked its tracked model owned the // visual, so the floor would have stepped aside. - if (flightState._icons?.has(clearedIcao)) { - flightState._icons.setShown(clearedIcao, true); + // Its fleet model, kept loaded while it was selected, takes it back in + // this frame; the icon shows only when there is no loaded one. + parts.rendering._handBackDeselected(clearedIcao); + if (flightState._icons?.has(clearedIcao)) parts.icons._settleIcon(clearedIcao, { fromCourseDeg: trackedCourseDeg }); - } parts.icons._applyIconPresentation(clearedIcao); clearTrackedSubjectContext('flights'); _emitAwarenessEvent('gev:awareness-subject-cleared', { diff --git a/src/layers/military/tracking.js b/src/layers/military/tracking.js index f734cc3499..3d2f5391c0 100644 --- a/src/layers/military/tracking.js +++ b/src/layers/military/tracking.js @@ -932,10 +932,11 @@ export function createTracking({ flightState._trackedIcao = null; // Hand the contact back to its icon only now, once it no longer reads as // tracked (the settle plans it as a fleet contact). - if (flightState._icons?.has(clearedIcao)) { - flightState._icons.setShown(clearedIcao, true); + // Its fleet model, kept loaded while it was selected, takes it back in + // this frame; the icon shows only when there is no loaded one. + parts.rendering._handBackDeselected(clearedIcao); + if (flightState._icons?.has(clearedIcao)) parts.icons._settleIcon(clearedIcao, { fromCourseDeg: trackedCourseDeg }); - } parts.icons._applyIconPresentation(clearedIcao); clearTrackedSubjectContext('military'); _emitAwarenessEvent('gev:awareness-subject-cleared', { From 1048a71d7362404529a2c3304f304cea54bee3a2 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Tue, 17 Nov 2026 11:27:34 -0800 Subject: [PATCH 3/5] Add the changelog entry for 3D models within 3 km --- changelog.d/1784-models-three-km-true-size.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog.d/1784-models-three-km-true-size.md diff --git a/changelog.d/1784-models-three-km-true-size.md b/changelog.d/1784-models-three-km-true-size.md new file mode 100644 index 0000000000..ddff9fd8ae --- /dev/null +++ b/changelog.d/1784-models-three-km-true-size.md @@ -0,0 +1,5 @@ +- Aircraft, vessels, transit and rail vehicles draw as 3D models only within + 3 km of the camera, at their true size, and as icons farther away; Proximity + and All use the same distance and differ by how many models they allow. + Deselecting a plane drawn as a model no longer flashes its icon for a second + before the model returns (Sameh Khamis, @samehkhamis, #1784). From 463946abfae59c5f23b640bc076de72661408651 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Tue, 17 Nov 2026 11:52:34 -0800 Subject: [PATCH 4/5] Bring the tracking harness's cameras within 3 km of the planes it models The tracked-model checks zoom the follow camera to within 2 km of the plane, and the grounded-model check parks the camera 2 km above the planes instead of 8 km, since models now draw only within 3 km. --- scripts/track-regression.mjs | 40 +++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/scripts/track-regression.mjs b/scripts/track-regression.mjs index b859a2e1a0..fb745e48d6 100644 --- a/scripts/track-regression.mjs +++ b/scripts/track-regression.mjs @@ -1453,9 +1453,9 @@ async function main() { // NOTE: we do NOT manually reposition the camera. Tracking follows the // plane with a calibrated viewFrom, so the follow camera lands - // in the few-km band (altitude*1.1+2500, clamped 3–30 km) — far below the - // MODEL_ALT_CEIL_M = 800 km ceiling, so _modelRegimeActive() is true and the - // standalone tracked model renders. That's the exact path the invariants + // in the few-km band (altitude*1.1+2500, clamped 3–30 km) — below the + // MODEL_ALT_CEIL_M ceiling, so _modelRegimeActive() is true; the checks below + // zoom in to within the 3 km model range so the standalone tracked model renders. That's the exact path the invariants // protect, so we exercise it rather than a synthetic setView. // ============================================================ @@ -1518,16 +1518,34 @@ async function main() { // is "tracked model not up yet", not a match. return bestD < 1000 * 1000 ? best : null; }; + // Models draw only within 3 km of the camera, and the follow camera + // frames a cruising plane from farther out: zoom in on the followed + // plane until it is within `metres`. Returns the distance reached. + window.__qaFollowWithin = async function (metres) { + const v = window.__godsEyeView.viewer; + for (let i = 0; i < 20; i++) { + const followed = window.__qaFollowed(); + const t = typeof followed?.displayPosition === 'function' ? followed.displayPosition() : null; + if (!t) return null; + const c = v.camera.positionWC; + const d = Math.hypot(c.x - t.x, c.y - t.y, c.z - t.z); + if (d <= metres) return d; + v.camera.zoomIn(d - metres * 0.8); + await new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r))); + } + return null; + }; }); - // Track a synthetic commercial plane. Tracking follows it with a - // viewFrom, so the follow camera lands in the few-km band and the standalone - // 3D model renders (model regime active below the 800 km ceiling). + // Track a synthetic commercial plane, then zoom the follow camera to + // within 2 km of it: models draw only within 3 km, so the standalone 3D + // model renders there. const trackedIcao = SYNTH.flights[0].icao; await evalPage((icao) => { window.__godsEyeView.dataManager.layers.get('flights').module.trackById(icao); }, trackedIcao); - await sleep(1500); // let the follow camera settle + the GLB load kick off + await sleep(1500); // let the follow camera settle + await evalPage(() => window.__qaFollowWithin(2000)); // Wait until the tracked Cesium.Model primitive exists, is ready & shown. const modelUp = await page.waitForFunction((icao) => { @@ -1845,7 +1863,8 @@ async function main() { await evalPage((icao) => { window.__godsEyeView.dataManager.layers.get('flights').module.trackById(icao); }, h1Icao); - await sleep(1500); // follow camera settles; tracked GLB load kicks off + await sleep(1500); // follow camera settles + await evalPage(() => window.__qaFollowWithin(2000)); // within the 3 km model range // (i) The tracked standalone model must expose its pick id (= the icao). const h1ModelUp = await page.waitForFunction((icao) => { @@ -2498,10 +2517,11 @@ async function main() { const milBB = findBB('bbb177'); if (!flBB || !milBB) return { error: `ground billboards missing (fl=${!!flBB} mil=${!!milBB})` }; const radius = (pos) => Math.hypot(pos.x, pos.y, pos.z); - // Park the camera 8 km radially above the flights plane (both in view nadir-ish). + // Park the camera 2 km radially above the flights plane (both in view + // nadir-ish, both within the 3 km model range). const p = flBB.position; const r = Math.hypot(p.x, p.y, p.z); - const k = (r + 8000) / r; + const k = (r + 2000) / r; v.camera.cancelFlight(); v.camera.setView({ destination: { x: p.x * k, y: p.y * k, z: p.z * k }, From 28baddb9234db904235024a15dcffed1ab985c4a Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Tue, 17 Nov 2026 11:56:59 -0800 Subject: [PATCH 5/5] Name the changelog entry for its pull request number --- ...-three-km-true-size.md => 1785-models-three-km-true-size.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename changelog.d/{1784-models-three-km-true-size.md => 1785-models-three-km-true-size.md} (82%) diff --git a/changelog.d/1784-models-three-km-true-size.md b/changelog.d/1785-models-three-km-true-size.md similarity index 82% rename from changelog.d/1784-models-three-km-true-size.md rename to changelog.d/1785-models-three-km-true-size.md index ddff9fd8ae..39faedf202 100644 --- a/changelog.d/1784-models-three-km-true-size.md +++ b/changelog.d/1785-models-three-km-true-size.md @@ -2,4 +2,4 @@ 3 km of the camera, at their true size, and as icons farther away; Proximity and All use the same distance and differ by how many models they allow. Deselecting a plane drawn as a model no longer flashes its icon for a second - before the model returns (Sameh Khamis, @samehkhamis, #1784). + before the model returns (Sameh Khamis, @samehkhamis, #1785).