mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
fix(rail, transit): a train or vehicle a first-person view holds draws no 3D model either, since the view's eye is inside it; let go, its model draws again
The fleet models (#1714) draw nearby trains and vehicles under the 3D toggle. A held one now leaves out its model as it does its icon, as the Vessels layer does for its bridge subject: its model item is hidden, and handing the visual back to its icon keeps the icon hidden while held. Tests drive each layer with the real fleet-model layer and a stubbed glTF loader; both fail without the fix.
This commit is contained in:
1 parent
546ac22708
commit
974023510f
12 files changed
+212
-17
No files matched your search
@@ -526,7 +526,7 @@ export function createRendering({ state, services, parts }) {
|
||||
/**
|
||||
* Whether a train's icon is drawn: shown, not drawn by its model, and no
|
||||
* first-person view rides it (cockpitSubject.js). A held train keeps its
|
||||
* playback; only its icon hides.
|
||||
* playback; only its icon and model hide.
|
||||
*/
|
||||
function markerShown(entry) {
|
||||
return (
|
||||
@@ -760,7 +760,9 @@ export function createRendering({ state, services, parts }) {
|
||||
}
|
||||
item.position = entry.marker.position;
|
||||
item.headingDeg = Number.isFinite(entry.courseDeg) ? entry.courseDeg : 0;
|
||||
item.show = categoryShown(entry);
|
||||
// A train a first-person view rides draws no model: the camera is inside
|
||||
// it (cockpitSubject.js).
|
||||
item.show = categoryShown(entry) && entry.key !== state._cockpitSubjectKey;
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user