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

+7
View File
@@ -893,6 +893,13 @@ export function createTracking({
);
flightState._trackedEntity = holder;
entityRecord(holder).drawn = () => flightState._trackedEntity === holder;
// The draw sets a height sample under the contact sees through (its
// icons and models), for Cockpit's ground probe.
entityRecord(holder).groundSets = () => {
const sets = [...parts.rendering._groundSampleExclusions().sets];
if (trackedIcon.setId) sets.push(trackedIcon.setId);
return sets;
};
trackedIcon.show({
id: icao24,
image: _trackedBillboardImage(),