Give a viewer of its own a query port, as it has draw and camera ports

The Cesium query port moves out of createCesiumPorts into its own module,
unchanged, so it can also be built over a caller's viewer with no
renderer bound. findQuery and queryOf find the bound renderer's query port
or, for such a viewer, one the Cesium adapter's factory builds, as findDraw
and findCamera do. It picks the sets drawn through findDraw on that viewer
and its height samples see through them, so a layer can exclude its own
sets; it projects, casts rays and picks the ellipsoid as the renderer's
does. A renderer bound later answers new callers.

The camera factory and the caller's unbound export load it, and the
factory walk checks that every public entry reaching a findQuery or queryOf
caller loads it, or is a Cesium-free entry whose caller does.
This commit is contained in:
Sameh Khamis committed 2026-11-06 22:25:07 -08:00
1 parent ee6b9e49aa
commit 784561a6ae
10 files changed
+654 -308

No files matched your search

+3 -1
View File
@@ -12,9 +12,11 @@ import { cameraFlightActive } from './internals.js';
import { createCesiumFollow } from './follow.js';
import { createCesiumControls } from './cameraControls.js';
import { cameraOf, findCamera, provideUnboundCamera } from '../rendererOf.js';
// Loads the factories an unbound viewer gets its credits and draw ports from.
// Loads the factories an unbound viewer gets its credits, draw and query
// ports from.
import './credits.js';
import './draw.js';
import './query.js';
/**
* `cameraOf` and `findCamera`, for code that already reaches Cesium: