Treat contacts with the Cyber sonar sweep on Navara behind an optional render.setContactSonar capability

The sprite and point mover shaders rate each contact by its anchor against the sweep with the cyberSonar.js sampler maths; the engine sonar scene feeds the theme, settings and shared sweep angle each drawn frame and keeps the fleet cadence only while the sweep runs over contacts.
This commit is contained in:
German Khokhlov committed 2026-11-03 21:49:56 +04:00
1 parent c2d7a6dbb0
commit 1a3f6f2486
16 files changed
+1040 -6

No files matched your search

+4 -1
View File
@@ -1,6 +1,7 @@
import { LayerLifecycle } from '../data/lifecycle.js';
import { LayerPresentation } from './layerPresentation.js';
import { createCyberSonarScene } from '../cyberSonarScene.js';
import { createCyberSonarEngineScene } from '../cyberSonarEngine.js';
import { panelAwareVisibility } from './embed.js';
import { attachScenePart, currentSceneOf } from './sceneParts.js';
@@ -104,9 +105,11 @@ export function createApplicationData({
nextCatalog.weatherClock,
);
styleManager.attachDataManager(dataManager);
// The sonar scene draws on the viewer; the Navara engine has none.
// The sonar treats contacts on the viewer, or through an engine
// that draws it (render.setContactSonar, Navara).
if (next.viewer)
release(createCyberSonarScene(next.viewer, dataManager));
else release(createCyberSonarEngineScene(next.engine, dataManager));
if (!binding) return;
// A teardown or switch during the attachment must not wait for slow
// layer attachments: it ends this wait, and the detach releases the