feat(app): detection and readout on Navara

The shell creates detection and the tracked readout on the engine, so the
Navara mode has them too (before: not created without a viewer). Detection
reads the camera height from the engine. The tracked readout follows
engine.camera.following(): a follow's plain-data label
(FollowOptions.label: { id, model, position }, the readout card's model
and anchor) or, on Cesium, the followed Entity and its gevLabelModel as
before (Cesium layers keep publishing the same). refreshTrackedReadout
takes a follow handle too. A bare viewer without a registered engine
(tests) is still read for its trackedEntity.

In the app on Navara: "[Detection] Initialized", "[TrackedReadout]
Initialized", and a follow with a label paints its card.
This commit is contained in:
German Khokhlov committed 2026-10-16 21:14:59 +04:00
1 parent 7d5a484796
commit e1be2eac19
7 files changed
+129 -20

No files matched your search

+8 -6
View File
@@ -415,8 +415,9 @@ export class StyleManager extends ShellFacade {
// Full-globe sun/moon ring. It is a crisp screen-space overlay above the
// Cesium canvas but below the HUD/detection/readout z ladder.
// Viewer-bound modules (the ring, detection, tracked readout, cockpit)
// are not created without a viewer (the experimental Navara engine).
// Viewer-bound modules (the ring, cockpit) are not created without a
// viewer (the experimental Navara engine); detection and the tracked
// readout are the engine's.
this.celestialRing = viewer
? new CelestialRing(viewer, {
enabled: false,
@@ -482,10 +483,11 @@ export class StyleManager extends ShellFacade {
initWorldOverlay(engine);
// Initialize detection overlay BEFORE style stages so the composite
// stage is first in the post-process pipeline
if (viewer) {
// stage is first in the post-process pipeline. Both run on the engine
// (the Navara mode too: its layers arrive with Tasks 10a-13a).
{
initDetection(
viewer,
engine,
[
trafficLayer,
flightsLayer,
@@ -501,7 +503,7 @@ export class StyleManager extends ShellFacade {
this._updateDetectionButton(modeLabel);
},
);
initTrackedReadout(viewer);
initTrackedReadout(engine);
}
setDetectionStyle(this.activeStyle);
this._applyDetectionDensityFromUi();