mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Move Cockpit onto the camera and frame ports
Cockpit now places its eye with the geo maths and moves the camera through the camera port on the frame port's preUpdate, so cockpitCamera.js and cockpitController.js no longer load Cesium and leave the allow-list. Whether the aircraft still draws comes from a trackedEntityDrawn service, which the application shell answers from the viewer's entities. The mesh floor probe accepts the viewer as well as its scene.
This commit is contained in:
1 parent
b47aa5f3de
commit
2a9a2d5be8
11 files changed
+433
-159
No files matched your search
@@ -87,7 +87,8 @@ export function createMeshFloorSampler({
|
||||
* layer poll (never per contact, never per frame). Synchronous — Cesium's
|
||||
* sampleHeight is a CPU-side query against loaded tiles.
|
||||
*
|
||||
* @param {Cesium.Scene|undefined} scene - The scene (skipped when absent/torn down).
|
||||
* @param {Cesium.Scene|object|undefined} host - The scene, or the viewer
|
||||
* whose scene it is (skipped when absent/torn down).
|
||||
* @param {Array<{lat: number, lon: number}>} points - Contact/waypoint coords.
|
||||
* @param {object} [options]
|
||||
* @param {Array<object>} [options.excludeObjects] - Own billboards/models to
|
||||
@@ -97,10 +98,11 @@ export function createMeshFloorSampler({
|
||||
* Viewer subpoint (computed once by the caller's poll).
|
||||
*/
|
||||
function sampleMeshFloorCells(
|
||||
scene,
|
||||
host,
|
||||
points,
|
||||
{ excludeObjects = [], viewerLat, viewerLon } = {},
|
||||
) {
|
||||
const scene = host?.scene ?? host;
|
||||
if (!meshFloorPreferred()) return;
|
||||
// Without depth-texture support every probe throws: nothing to latch.
|
||||
if (!scene || !heightsFor(scene).supported().surface) return;
|
||||
|
||||
Reference in new issue
Block a user