mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Resolve annotation targets against the renderer's camera and query ports
The annotation resolver no longer imports Cesium. The view proximity gate reads the camera port's pose and the geocode bias its view rectangle. Screen-point picks go through the query port (depth pick, then ellipsoid, then the globe along the pick ray) on the renderer's canvas, and ground heights through the height gateway. It leaves the Cesium allow-list. Its tests bind a camera port over their camera doubles.
This commit is contained in:
1 parent
8d586e5ff9
commit
9fe3e7633f
7 files changed
+68
-84
No files matched your search
@@ -4,11 +4,13 @@ import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { FEATURE_SOURCE_METHODS } from '../sources/featureSource.js';
|
||||
import { createAnnotationResolver } from './resolver.js';
|
||||
import { bindFakeCesiumCamera } from '../testSupport/fakeCameraPort.mjs';
|
||||
import { createAnnotationEngine } from './annotationEngine.js';
|
||||
import { _resetRenderGovernorForTest } from '../renderGovernor.js';
|
||||
|
||||
function viewerAt(lat, lon, height = 20_000) {
|
||||
return {
|
||||
// The resolver reads the camera through the renderer's camera port.
|
||||
return bindFakeCesiumCamera({
|
||||
camera: {
|
||||
positionCartographic: {
|
||||
latitude: (lat * Math.PI) / 180,
|
||||
@@ -16,7 +18,7 @@ function viewerAt(lat, lon, height = 20_000) {
|
||||
height,
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** A resolver whose boundary lookups and geocoder record every call. */
|
||||
|
||||
Reference in new issue
Block a user