Ground snapping and mesh floor sampling through the renderer ports, off the Cesium list

src/services/groundSnap.js and src/services/meshFloorSampler.js no longer
reach Cesium. Whether the surface has streamed comes from the globe port
(the snap waits for the 'tiles' and 'surface' settle kinds; the sampler
runs only with the globe hidden and 'surface' settled), the camera height
gate from camera.pose(), heights from the query port, and the maths from
src/geo/ellipsoid.js. The raw exclusion path is gone: callers see through
their own draw sets by id. Cockpit's ground probe names the tracked
contact's icon and model sets, which the flights and military layers keep
on its entity record (groundSets), instead of the tracked holder object.

Probing is unchanged: at the caller's point, up to eight readings per cell
about 17 m apart, a read answering from the nearest one.

The application operations entry is now Cesium-free: a viewer with no
renderer bound needs ./render/cesium/unbound loaded first. Tests that used
to get the adapter's factories through ground snapping load it themselves.
This commit is contained in:
Sameh Khamis committed 2026-11-09 01:55:36 -08:00
1 parent 9d4e438e63
commit f53f691a80
20 files changed
+296 -199

No files matched your search

+5 -2
View File
@@ -123,8 +123,8 @@ const DRAW_FROM_CALLER = new Set([
// Its moving and still vehicle icons draw through `drawOf`; it projects,
// culls, follows and samples floors through the ports.
'./layers/transit',
// Not Cesium-free (its legacy mesh floor sampler is), but its layer draws
// and reads the view through the ports alone.
// Its layer draws and reads the view through the ports alone, and its mesh
// floor sampler asks the camera, globe and query ports.
'./layers/transit/standalone',
]);
@@ -153,6 +153,9 @@ const CAMERA_FROM_CALLER = new Set([
// renderer the application gives it (`rendering.js`, which draws the box
// preview through `drawOf`) is Cesium-free too.
'./layers/recent-imagery',
// Its ground snap, mesh floor sampler, annotation resolver and location
// framing ask the camera, globe and query ports; it loads no factory.
'./application/operations',
]);
const pkg = JSON.parse(readFileSync(path.join(root, 'package.json'), 'utf8'));