Complete the Cesium query port

The Cesium renderer now has every QueryPort member: picks and drill
picks, depth and globe picks, rays, projection, occlusion, heights now
and streamed, clamping and ray casts. Capabilities come from what the
scene supports (depth textures for pickPosition, sampleHeight,
finestHeights and rayCast), in both the conformance and app renderers.

- Picks skip unpickable and hidden items, and report each item once. A
  pick under an unpickable item stops at anything that hides the rest.
  drillPick's limit counts after that filtering, so 0 gives none.
- Height queries and ray casts see through sets not drawn with
  includeInHeightQueries, and through the sets a caller excludes, by
  their items' pick ids. The list is built once per change to the sets.
- `tiles` samples and casts run with the globe hidden for the call;
  `terrain` casts use the globe alone. A sample reports whether it came
  from tiles, terrain, the ellipsoid or a set.
- A position clampToSurface cannot read is a miss, not a failed batch.
- Terrain on an ellipsoid is height 0. Before, sampling it threw, for
  want of tile availability.

whenSettled also waits for icon images, and fails when one cannot load.
The conformance checks that pick or query settle first, because a
renderer answers from what it has loaded; the stub settles at once.
The Cesium renderer now passes 14 checks in the browser, and its
visual references are unchanged.
This commit is contained in:
Sameh Khamis committed 2026-11-05 16:22:48 -08:00
1 parent 22ce0925a2
commit 1a9bdd9b63
11 files changed
+618 -48

No files matched your search

+8
View File
@@ -6,6 +6,7 @@ import { createRequire } from 'node:module';
import { fileURLToPath } from 'node:url';
import {
billboardCollectionOf,
billboardLoadError,
cameraFlightActive,
closeRenderLoopLatch,
clusterPointCollection,
@@ -50,6 +51,11 @@ test('every private field the app reaches is still declared by the installed Ces
assert.deepEqual(missing, []);
const camera = fs.readFileSync(path.join(ENGINE, 'Scene/Camera.js'), 'utf8');
assert.match(camera, /Camera\.prototype\._updateCameraChanged = function/);
const billboard = fs.readFileSync(
path.join(ENGINE, 'Scene/Billboard.js'),
'utf8',
);
assert.match(billboard, /\n {2}loadError: \{/, 'Billboard#loadError');
});
test('the helpers read and write exactly those fields', () => {
@@ -75,6 +81,8 @@ test('the helpers read and write exactly those fields', () => {
closeRenderLoopLatch({ _cesiumWidget: widget });
assert.equal(widget._renderLoopRunning, false);
closeRenderLoopLatch({});
const error = new Error('404');
assert.equal(billboardLoadError({ loadError: error }), error);
const gl = {};
assert.equal(webglContext({ context: { _gl: gl } }), gl);
assert.equal(cameraFlightActive({ _currentFlight: {} }), true);