Scope pick ownership and selection dispatch to each scene

Create pick registries and selection dispatchers for each scene attachment,
publish them through scene.services, and release their predicates and input
subscriptions before parking the renderer. Resolve layer ownership with the
attached engine so identical layer IDs in simultaneous scenes cannot overwrite
or remove one another. Re-register retained ALPR and cyclone picks on attachment,
and resolve voice pointer picks against the engine that supplied the pick.

Preserve Cesium's selection, sibling ownership, inert trails, touch expansion,
drag and long-press rules on both engines. Extract the unchanged gesture
predicates so portable picking does not acquire a native input dependency.
Exercise scene isolation, teardown and reattachment on fake and headless Cesium
engines, retaining the existing layer assertions.

No coupling count falls or grows. Cesium and Navara renderer lines remain 0 and
189; external Cesium imports 3; viewer lines 910; Navara kind checks 2; engine
sniff calls 0; extension reads 3; ground passes 1; SDK loads 3; screen-handler
files 4; engine-name lines 33.
This commit is contained in:
German Khokhlov committed 2026-11-07 16:27:43 +04:00
1 parent 52c6f68bd5
commit 4252ed0798
53 files changed
+712 -277

No files matched your search

+9 -2
View File
@@ -270,8 +270,15 @@ one application, and only the globe-bound parts move to the next engine.
unknown kind and no native extensions, draws fixtures, hides or releases them,
and checks primitives, subscriptions and service records before engine
destruction. The three self-drawing entries are named skips. This is a
display-level rehearsal; application kind registration, scene-service
singletons, queue consolidation and native debug access remain work.
display-level rehearsal; application kind registration, the remaining scene
services, queue consolidation and native debug access remain work.
- **Scene pick ownership.** Each attachment owns `scene.services.picking` and
`scene.services.selection` (`src/data/sceneServices.js`). Layers and displays
resolve these services with their attached engine; simultaneous engines do
not share owner predicates or click subscriptions. Detach releases both
services before the renderer is parked. Reattachment creates fresh services,
while retained layers register their current picks again. The overlay host,
render governor and tracked readout still have module-owned state.
- **The session owns the state.** Catalog, layer models, sources, selection,
camera mode and URL state outlive a switch. A layer that is a session model
gets `attachRenderer(viewer, { engine })` / `detachRenderer()` instead of being rebuilt,