mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Ask heights through the gateway at the flight sites, and load the camera factory from ground snapping
The camera ground guard, place and landmark flights and imported-file flights read terrain and surface heights through heightsOf, the one place the app's height queries go, rather than asking the query port themselves. With the annotation resolver off the allow-list, ground snapping, which the application operations entry also reaches and which stays listed, loads the Cesium camera factory for a viewer with no renderer bound. The height docs say what the Cesium renderer answers without depth textures: no surface or tiles height, and terrain from the loaded tiles.
This commit is contained in:
1 parent
f509c688e8
commit
8c024f5ea7
6 files changed
+34
-22
No files matched your search
@@ -4,7 +4,8 @@ import { rangeForBoundingSphere } from '../data/cameraFraming.js';
|
||||
import { cancelCameraArrival } from '../data/cameraArrival.js';
|
||||
import { distance, fromDegrees, toLonLatH } from '../geo/index.js';
|
||||
import { sphereFromPoints } from '../geo/sphere.js';
|
||||
import { findCamera, findQuery } from '../render/rendererOf.js';
|
||||
import { heightsOf } from '../queries/heights.js';
|
||||
import { findCamera } from '../render/rendererOf.js';
|
||||
|
||||
/**
|
||||
* Fly synchronously to a footprint, `[lon, lat, height]` points (degrees,
|
||||
@@ -30,9 +31,9 @@ export function flyToFootprint(
|
||||
height: 0,
|
||||
};
|
||||
const { lat, lon } = center;
|
||||
const terrain =
|
||||
findQuery(viewer)?.sampleHeightNow({ lon, lat }, { against: 'terrain' }) ??
|
||||
null;
|
||||
const terrain = viewer
|
||||
? heightsOf(viewer).now({ lon, lat }, { against: 'terrain' })
|
||||
: null;
|
||||
const cached = ground?.cachedGroundFloor?.(lat, lon);
|
||||
const height =
|
||||
Number.isFinite(terrain) && terrain > 0
|
||||
|
||||
Reference in new issue
Block a user