Bound drillPick's work, pick before styles, and put changed thresholds behind a capability

The query contract now says picks answer against the scene as drawn before
effects, and that a drillPick limit bounds the work as well as the answer:
the renderer stops at `limit` hits and looks through at most
max(limit, 16) things under the pointer. The Cesium query port passes that
depth to Cesium's drill (a pick looking under something unpickable stays
unbounded), a click's drill caches one pass per depth, and the stub counts
unpickable items toward the depth.

CameraPose says fovy and aspectRatio describe the nearest centred
perspective frustum, the exact projection being in matrices().

A changed listener's own threshold is now the capability
cameraChangeThreshold; without it every listener fires at 0.5. The Cesium
and stub cameras have it, measured per listener without touching Cesium's
shared percentageChanged.

Conformance: draw.drillPick checks limit 0, never the surface, nothing over
the bare globe, an unpickable cover, nearest first and a bounded prefix;
query.pickBeforeStyles picks an icon under a mirroring style; the threshold
trace is skipped without its capability.
This commit is contained in:
Sameh Khamis committed 2026-11-08 12:37:04 -08:00
1 parent 481df0b093
commit 45302e9fbf
19 files changed
+260 -40

No files matched your search

+16 -2
View File
@@ -9,7 +9,9 @@
* - `lookAt` orbits the target (the user can still rotate and zoom about it);
* `release` returns to the world frame.
* - `changed` fires when the view has moved by more than the listener's own
* `threshold` (default 0.5) since it last fired, measured per listener:
* `threshold` (`cameraChangeThreshold`; default 0.5, and 0.5 for every
* listener without the capability) since it last fired, measured per
* listener, without changing what any other listener is measured by:
* heading and roll each by their change over π since they last fired; the
* view by the larger of the direction's turn over half the vertical field
* of view and the eye's travel over its height, since the view last
@@ -45,7 +47,13 @@ export interface CameraPose {
direction: Vec3;
up: Vec3;
right: Vec3;
/** Vertical field of view, radians. */
/**
* Vertical field of view, radians. `fovy` and `aspectRatio` describe a
* centred perspective frustum. Where the renderer's frustum is off-centre or
* orthographic reports the nearest centred one here and its exact
* projection only in `matrices()`; code that culls or projects exactly
* reads `matrices()`.
*/
fovy: number;
aspectRatio: number;
near: number;
@@ -259,6 +267,12 @@ export interface CameraPort {
*/
followFrame?(): Float64Array;
readonly controls: CameraControls;
/**
* `threshold` (`cameraChangeThreshold`): the fraction of change, as the
* header measures it, that fires this `changed` listener; ignored for the
* other events, and without the capability (every listener then fires at
* 0.5).
*/
on(event: CameraEvent, cb: () => void, options?: { threshold?: number }): Off;
/** Runs before each camera command, so an owner can yield to another. */
onCommand(cb: (command: CameraCommand) => void): Off;