mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
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:
1 parent
481df0b093
commit
45302e9fbf
19 files changed
+260
-40
No files matched your search
@@ -75,6 +75,8 @@ const ONE_DEGREE = Math.PI / 180;
|
||||
* @param {() => number} options.sceneTime Scene time, epoch ms.
|
||||
* @param {(reason: string) => void} options.requestRender
|
||||
* @param {(error: Error) => void} options.report
|
||||
* @param {boolean} [options.thresholds] `cameraChangeThreshold`: each
|
||||
* `changed` listener's own threshold (default true).
|
||||
*/
|
||||
export function createStubCamera({
|
||||
viewport,
|
||||
@@ -83,6 +85,7 @@ export function createStubCamera({
|
||||
requestRender,
|
||||
report,
|
||||
drawnPosition = () => null,
|
||||
thresholds = true,
|
||||
}) {
|
||||
// Local frame values; world values are `frame` applied to them.
|
||||
let frame = IDENTITY;
|
||||
@@ -95,7 +98,7 @@ export function createStubCamera({
|
||||
const near = 1;
|
||||
const far = 5e8;
|
||||
|
||||
const events = createCameraEvents({ pose, report });
|
||||
const events = createCameraEvents({ pose, report, thresholds });
|
||||
const { emit, on, stepChanged } = events;
|
||||
const commandHooks = [];
|
||||
const holds = new Map();
|
||||
|
||||
Reference in new issue
Block a user