mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Read the camera through its port when applying flight snapshots
The flights snapshot renderer took the camera's ground point from the Cesium camera, built fix positions and history entries with Cesium types, and handed the scene to the mesh floor sampler itself. It now reads the ground point from the camera port's pose, asks the flights motion part for fix positions, copies and history entries, compares fix times in whole milliseconds as before, and lets the rendering part sample the mesh floor. The file no longer touches Cesium and leaves the allow-list.
This commit is contained in:
1 parent
dbd6363e43
commit
436b110547
5 files changed
+73
-35
No files matched your search
@@ -98,7 +98,29 @@ export function createRendering({
|
||||
parts.icons._floorGroundedIcons(renderTime, t, nowMs, camera.positionWC),
|
||||
});
|
||||
|
||||
/**
|
||||
* Sample the rendered mesh under the collected floor cells (see
|
||||
* meshFloorSampler.js), leaving this layer's own icons and models out of
|
||||
* the probe so it cannot land on an aircraft instead of the pavement.
|
||||
*/
|
||||
function _sampleMeshFloor(points, viewerLat, viewerLon) {
|
||||
services.meshFloor.sampleMeshFloorCells(
|
||||
flightState._viewer?.scene,
|
||||
points,
|
||||
{
|
||||
excludeObjects: [
|
||||
...parts.icons._iconIds(),
|
||||
...[...flightState._models.values()].map((record) => record.model),
|
||||
flightState._trackedModel?.model,
|
||||
].filter(Boolean),
|
||||
viewerLat,
|
||||
viewerLon,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
_sampleMeshFloor,
|
||||
_fleetBillboardColor,
|
||||
_fleetBillboardScale,
|
||||
_cockpitContactColor,
|
||||
|
||||
Reference in new issue
Block a user