mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 17:22:19 +00:00
Draw GNSS integrity cells through the renderer's draw port
Cells are clamped rectangle fills in one draw set per layer (gnss-integrity:N), made with pickable: false so they never hide what is under them from clicks, as before. The view anchor comes from the camera port: where the line of sight meets the ellipsoid, else the middle of the view rectangle, else the point under the eye. Re-anchoring follows the camera port's moveEnd and changed events. The ray-ellipsoid intersection moves from the stub renderer into geo/ellipsoid.js for both to use, and geo/rectangle.js adds the antimeridian-aware width, height and centre of a radian rectangle. The layer leaves the allow-list; the QA script finds the cells among the scene's unpickable ground primitives.
This commit is contained in:
1 parent
3f9089eccb
commit
6f82f9cc9c
10 files changed
+418
-232
No files matched your search
@@ -2,9 +2,10 @@
|
||||
// card's info line shows them in the UI language, the HTTP form included.
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import * as Cesium from 'cesium';
|
||||
import { setLocale } from '../../i18n/index.js';
|
||||
import { createGnssIntegrityLayer } from './index.js';
|
||||
import { fakeCameraPort } from '../../testSupport/fakeCameraPort.mjs';
|
||||
import { bindFakeDraw } from '../../testSupport/fakeDrawPort.mjs';
|
||||
|
||||
async function failedLayer(message) {
|
||||
const layer = createGnssIntegrityLayer({
|
||||
@@ -20,13 +21,9 @@ async function failedLayer(message) {
|
||||
now: () => 1_000,
|
||||
monotonicNow: () => 1_000,
|
||||
});
|
||||
layer.init({
|
||||
camera: { moveEnd: new Cesium.Event(), changed: new Cesium.Event() },
|
||||
scene: {
|
||||
globe: { show: true },
|
||||
groundPrimitives: { add() {}, remove() {} },
|
||||
},
|
||||
});
|
||||
const viewer = { scene: { globe: { show: true } } };
|
||||
bindFakeDraw(viewer, { camera: fakeCameraPort().port });
|
||||
layer.init(viewer);
|
||||
layer.enable();
|
||||
await layer.update();
|
||||
return layer;
|
||||
|
||||
Reference in new issue
Block a user