mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +00:00
refactor(data): focus projects through the engine; readout follows a tracked visual's follow
Task 10b foundation. - focusDeemphasis projects through the engine registered for the scene it is given (engineFromViewer(scene).projector), as iconOrientation already does, else Cesium's SceneTransforms. On Cesium the engine projector is SceneTransforms, so nothing changes there; on Navara the aircraft renderer's scene adapter is registered with the engine. Test with a fake engine. - refreshTrackedReadout accepts a layer's tracked visual that names its follow handle (gevFollowHandle): engines without tracked entities republish the card through it. Test.
This commit is contained in:
1 parent
4dfcba8989
commit
443c581280
4 files changed
+71
-14
No files matched your search
@@ -241,8 +241,13 @@ function syncActiveEntity() {
|
||||
* @param {Object} entity Entity whose model changed.
|
||||
*/
|
||||
export function refreshTrackedReadout(entity) {
|
||||
// A follow handle stands for its label subject.
|
||||
const subject = _labelSubjects.get(entity) ?? entity;
|
||||
// A follow handle stands for its label subject; so does a layer's tracked
|
||||
// visual that names its follow handle (gevFollowHandle, an engine without
|
||||
// tracked entities: the Navara aircraft renderer).
|
||||
const subject =
|
||||
_labelSubjects.get(entity) ??
|
||||
_labelSubjects.get(entity?.gevFollowHandle) ??
|
||||
entity;
|
||||
if (subject && subject === activeEntity()) publishEntity(subject);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user