Check annotation visibility and frame marks through the renderer's ports

The annotation engine no longer imports Cesium. The camera assist tests
whether a fresh mark is in view against the frustum planes of the camera
port's view-projection, with the same one-metre sphere Cesium's culling
volume used, and asks the query port whether it is behind the globe. The
view-projection is in world coordinates, so the test now also holds when
the camera has a reference frame of its own. Framing uses the camera port
and the geo helpers for spheres, angles and distances. It leaves the
Cesium allow-list.

The window.__CESIUM__ dev hook the QA scripts read moves to the
application viewer module, which every app boot loads before the viewer
is made. A new test covers the assist: marks in view, off the frustum,
behind the globe, and a camera that cannot answer.
This commit is contained in:
Sameh Khamis committed 2026-11-07 04:13:56 -08:00
1 parent 9fe3e7633f
commit f509c688e8
4 files changed
+124 -39

No files matched your search

+5
View File
@@ -2,6 +2,11 @@ import * as Cesium from 'cesium';
import { applyModelAtmosphereWorkaround } from './atmosphereCompat.js';
import { StarrySky } from '../sky/starrySky.js';
// Dev convenience: expose the app's Cesium instance for console/preview probing
// (single shared module instance — avoids dual-Cesium state bugs when testing).
if (typeof window !== 'undefined' && !window.__CESIUM__)
window.__CESIUM__ = Cesium;
/** Cesium.Viewer options of the standard globe viewer. */
export function applicationViewerOptions(creditContainer) {
return {