feat(hud): render the Intel HUD from a store

IntelHUD no longer builds #intel-hud with innerHTML or writes its readouts
by id: it publishes its readouts, typing summary, REC blink, visibility,
layout variant and style colors through its publish option to the gev-hud
store, and the intel-hud application view renders them. The corners render
from mount so the panel layout controllers register them as obstacles.

The vessel layer presents the selected vessel's readout through
src/hudReadouts.js, which IntelHUD follows, instead of writing into the
HUD. The Cyber sonar state answers a HUD toggle from IntelHUD's visibility
rather than the class the view renders on its next update.
This commit is contained in:
Sameh Khamis committed 2026-10-31 22:18:50 -07:00
1 parent b96cc37ab5
commit c03b4a7643
26 files changed
+556 -243

No files matched your search

+6 -1
View File
@@ -58,6 +58,7 @@ import { useMissionReplayStore } from './stores/missionReplay.js';
import { useCelestialRingStore } from './stores/celestialRing.js';
import { useWorldOverlayActionsStore } from './stores/worldOverlayActions.js';
import { useAwarenessDirectionStore } from './stores/awarenessDirection.js';
import { useHudStore } from './stores/hud.js';
import { useDisplayStore } from './stores/display.js';
import { useLocaleStore } from './stores/locale.js';
import { useLocationStore } from './stores/location.js';
@@ -347,9 +348,11 @@ export class StyleManager extends ShellFacade {
this._lastTrafficChipUpdateAt = 0;
// Intel HUD
const hudStore = useHudStore(applicationPinia());
this.hud = new IntelHUD(viewer, {
placeSearch,
summaryService: requestServices?.summary,
publish: (view) => hudStore.publish(view),
});
this._recording.hud = this.hud;
this._cockpitCoordinator = new CockpitCoordinator({
@@ -1489,7 +1492,9 @@ export class StyleManager extends ShellFacade {
hud: {
visible: !!this.hud?.visible,
layout: this.hud?.getVariant?.() || null,
sonar: getCyberSonarControlState(),
sonar: getCyberSonarControlState(globalThis.document, {
hudActive: this.hud ? !!this.hud.visible : undefined,
}),
},
detection: this.getDetectionState(),
bloom: {