mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
Scope world overlays to each scene attachment
Move the world overlay into scene.services.overlay. Each attachment owns its sources, collision domains, paint lanes, canvases, observers, timers and accessible action subscribers. Keep both canvases inside the engine container, with detection beside the card root so its screen blend still reaches the scene. Release shared font measurements only after the last host detaches. Resolve retained layer publications against their attached engine, clear the outgoing source before releasing its renderer, and reconnect the shell's action subscription on attachment. Keep destroyed hosts inert and give parked engines fresh services. Bind annotation rectangles and the existing tracked bridge to their engine's overlay. The tracked bridge itself remains page-owned. Preserve Cesium's projection, card placement, arbitration, fades, hit tests, blend order and render demand. Navara keeps the same shared behaviour. No user-visible change is intended. Exercise simultaneous hosts, either teardown, stale handles, reattachment and a retained selected card on the fake and headless Cesium engines. Update QA reads and package ownership for the service. No coupling metric falls or grows: renderer lines remain 0 Cesium and 189 Navara; external Cesium import files 3; viewer lines 891; Navara kind checks 1; engine sniff calls 0; extension reads 3; ground passes 1; SDK loads 3; ScreenSpaceEventHandler files 4; engine-name lines 32. Each host now takes the page's overlay ids from the host it replaces and gives them back to a remaining host when destroyed, and the chrome's static overlay placeholders are gone. The new hosts had left the ids on those empty placeholders, so the voice pointer policy, the id selectors and the QA probes that read #world-overlay-canvas missed the drawn canvas. Checked in the browser, keyless: the overlay baselines on both engines, CCTV v2 (58 checks), military names, and the engine, voice, ground-layer and Ghost Maps switches pass. The transit script fails the same 25 checks as before.
This commit is contained in:
1 parent
26597ad25c
commit
3814221cbc
62 files changed
+3148
-2655
No files matched your search
@@ -109,8 +109,6 @@ export class StyleManager extends ShellScene {
|
||||
CelestialRing,
|
||||
initTrackedReadout,
|
||||
initWorldOverlay,
|
||||
subscribeWorldOverlayActions,
|
||||
activateWorldOverlayAction,
|
||||
initDetection,
|
||||
setDetectionStyle,
|
||||
trafficLayer,
|
||||
@@ -313,14 +311,6 @@ export class StyleManager extends ShellScene {
|
||||
});
|
||||
|
||||
this._initSceneOverlays();
|
||||
// Its focusable mirror of the painted cards, which the scene chrome
|
||||
// renders.
|
||||
const overlayActionsStore = useWorldOverlayActionsStore(applicationPinia());
|
||||
overlayActionsStore.connect({ activate: activateWorldOverlayAction });
|
||||
this._overlayActionsUnsubscribe = subscribeWorldOverlayActions((view) =>
|
||||
overlayActionsStore.publish(view),
|
||||
);
|
||||
|
||||
this._displayBindings = new DisplayBindings({
|
||||
viewer,
|
||||
services: {
|
||||
|
||||
+14
-1
@@ -1,3 +1,4 @@
|
||||
import { useWorldOverlayActionsStore } from './stores/worldOverlayActions.js';
|
||||
import { renderGovernorFor } from '../renderGovernor.js';
|
||||
import { retainsLayerSession } from '../app/layerSession.js';
|
||||
import { resolveImageryHost } from '../layers/weather/imageryHost.js';
|
||||
@@ -253,6 +254,16 @@ export class ShellScene extends ShellFacade {
|
||||
// detection and tracked-readout initialize. It stays transparent until a
|
||||
// production source explicitly registers entries.
|
||||
initWorldOverlay(engine);
|
||||
const overlayActionsStore = useWorldOverlayActionsStore(applicationPinia());
|
||||
this._overlayActionsUnsubscribe?.();
|
||||
overlayActionsStore.connect({
|
||||
activate: (...args) =>
|
||||
this.services.activateWorldOverlayAction(engine, ...args),
|
||||
});
|
||||
this._overlayActionsUnsubscribe =
|
||||
this.services.subscribeWorldOverlayActions?.(engine, (view) =>
|
||||
overlayActionsStore.publish(view),
|
||||
);
|
||||
// Initialize detection overlay BEFORE style stages so the composite
|
||||
// stage is first in the post-process pipeline. Both run on the engine,
|
||||
// Navara's too.
|
||||
@@ -415,7 +426,9 @@ export class ShellScene extends ShellFacade {
|
||||
this._layerBindings.disconnect();
|
||||
destroyTrackedReadout();
|
||||
destroyDetection();
|
||||
destroyWorldOverlay();
|
||||
destroyWorldOverlay(this._scene.engine);
|
||||
this._overlayActionsUnsubscribe?.();
|
||||
this._overlayActionsUnsubscribe = null;
|
||||
this.celestialRing?.destroy();
|
||||
this.celestialRing = null;
|
||||
this._visualSettings.destroy();
|
||||
|
||||
Vendored
+4
@@ -139,6 +139,7 @@ body {
|
||||
beneath the shared text/card canvas; both share one frame path. The root
|
||||
holds ONLY the card canvas — it is a stacking context (z-index below), and
|
||||
a canvas that blends against the scene cannot live inside one. */
|
||||
.world-overlay-root,
|
||||
#world-overlay-root {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -147,6 +148,8 @@ body {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.world-overlay-detection-surface,
|
||||
.world-overlay-canvas,
|
||||
#world-overlay-detection-surface,
|
||||
#world-overlay-canvas {
|
||||
position: absolute;
|
||||
@@ -179,6 +182,7 @@ body {
|
||||
`mix-blend-mode: screen` composites against the WebGL scene. z5 keeps it
|
||||
under the z6 root that carries the shared card canvas; do not move this
|
||||
surface inside #world-overlay-root, which would isolate the blend. */
|
||||
.world-overlay-detection-surface,
|
||||
#world-overlay-detection-surface {
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
@@ -60,9 +60,6 @@ const vToastText = {
|
||||
|
||||
<template>
|
||||
<div id="cesiumContainer"></div>
|
||||
<div id="world-overlay-root" aria-hidden="true">
|
||||
<canvas id="world-overlay-canvas"></canvas>
|
||||
</div>
|
||||
<div id="world-overlay-actions" class="world-overlay-accessibility" role="region" :aria-label="t('Visible map targets')">
|
||||
<div id="world-overlay-action-list"><UiButton v-for="item in targets?.items ?? []" :key="item.key" :aria-label="item.label" :pressed="Boolean(item.selected)" :data-overlay-action-key="item.key" :onClick="onOverlayAction(targets.owner, item.key)">{{ item.label }}</UiButton></div>
|
||||
<div id="world-overlay-status" v-overlay-status="targets" role="status" aria-live="polite" aria-atomic="true"></div>
|
||||
|
||||
Reference in new issue
Block a user