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:
German Khokhlov committed 2026-10-17 01:16:59 +04:00
1 parent 4dfcba8989
commit 443c581280
4 files changed
+71 -14

No files matched your search

+7 -2
View File
@@ -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);
}