mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(vessels, transit, rail): fleet models keep their cards and detection, stand on the floor, clip ships at the waterline and follow NVG/FLIR
- a vehicle drawn as a model keeps its selected card and stays in the detection overlay - transit and rail models drop the 1.5 m floor lift their icons carry - vessel models are clipped below the waterline - models switch to an unlit white look under NVG/FLIR and back - unknown transit modes keep their icon - aircraft model specs are cached per set; no key-array copies per frame
This commit is contained in:
1 parent
058ed0ffeb
commit
a44c42eb94
11 files changed
+342
-89
No files matched your search
@@ -24,14 +24,16 @@ export function createSelection({ state, services, parts }) {
|
||||
* (the tracked-aircraft readout uses the same), so the anchor moves with the
|
||||
* sprite at frame rate, through poll arrivals, settling, a late floor and a
|
||||
* reset alike, with no per-frame work here. Null when there is nothing to
|
||||
* anchor to: a hidden or removed marker draws no card.
|
||||
* anchor to: a hidden or removed marker draws no card, unless the vehicle's
|
||||
* 3D model is drawing it in the marker's place.
|
||||
* @param {object} entry
|
||||
* @returns {() => Cesium.Cartesian3|null}
|
||||
*/
|
||||
function anchorFor(entry) {
|
||||
return () => {
|
||||
const marker = entry.marker;
|
||||
const p = marker?.show !== false ? marker?.position : null;
|
||||
const drawn = marker?.show !== false || entry.modelOwnsVisual === true;
|
||||
const p = drawn ? marker?.position : null;
|
||||
return p &&
|
||||
Number.isFinite(p.x) &&
|
||||
Number.isFinite(p.y) &&
|
||||
|
||||
Reference in new issue
Block a user