mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
Document the height gateway on the query port and tighten its scan
The application guide now describes heightsOf(viewer): draw set ids to see through, plain ECEF results, the surfaces each option reads, and that the Cesium renderer answers no height without depth textures. clampBatch answers null for a malformed position instead of throwing, and copies the positions before the query runs so the answers stay in place. The source scan also flags the query port's sampleHeightNow, sampleHeightNowMany and clampToSurface outside the gateway; the four sites that already asked the port directly are listed, and the list fails once one of them no longer needs it.
This commit is contained in:
1 parent
dd4f19967d
commit
ed8f89db74
4 files changed
+91
-26
No files matched your search
+14
-3
@@ -167,13 +167,24 @@ function createHeights(host) {
|
||||
},
|
||||
|
||||
async clampBatch(positions, { exclude } = NO_OPTIONS) {
|
||||
// Copies taken now, so a caller changing its positions while the
|
||||
// query runs cannot shift the answers.
|
||||
const at = positions.map((p) =>
|
||||
finite(p) ? { x: p.x, y: p.y, z: p.z } : null,
|
||||
);
|
||||
const valid = at.filter(Boolean);
|
||||
const port = asyncQuery();
|
||||
if (!port) return positions.map(() => null);
|
||||
if (!valid.length || !port) return at.map(() => null);
|
||||
const clamped = await port.clampToSurface(
|
||||
positions.map((p) => ({ x: p.x, y: p.y, z: p.z })),
|
||||
valid,
|
||||
portOptions({ exclude }),
|
||||
);
|
||||
return clamped.map((p) => (finite(p) ? p : null));
|
||||
let next = 0;
|
||||
return at.map((p) => {
|
||||
if (!p) return null;
|
||||
const result = clamped[next++];
|
||||
return finite(result) ? result : null;
|
||||
});
|
||||
},
|
||||
|
||||
supported() {
|
||||
|
||||
Reference in new issue
Block a user