mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Draw the installations layer's named markers through the renderer's ports
The named-site dots are a draw-port point set with horizon culling instead of a raw point collection; their on-screen count tests the ellipsoid horizon and projects through the query port, and they follow the camera port's changed and moveEnd events and the frame port's preRender. Points that only change look (a selection) are restyled in place. Clicks on a dot read the draw hit; the item id is not the bare record id, so sibling layers' pick-owner checks still treat a dot click as nobody's. Code that only asks whether a click hit anything (the CCTV layer) now sees a dot click as a hit, as it already did for the site markers: a draw item's pick always resolves to its id. The named markers leave the Cesium allow-list. The site markers in rendering.js stay entities.
This commit is contained in:
1 parent
e327760074
commit
faded8a418
10 files changed
+377
-115
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { bindFakeCesiumCamera } from '../testSupport/fakeCameraPort.mjs';
|
||||
import { fakeScenePorts } from '../testSupport/fakeCesiumScene.mjs';
|
||||
import { readLayerSource } from '../testSupport/readLayerSource.mjs';
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
@@ -198,7 +199,7 @@ test('real enabled installation entities carry no native label graphics', async
|
||||
},
|
||||
},
|
||||
};
|
||||
bindFakeCesiumCamera(viewer);
|
||||
bindFakeCesiumCamera(viewer, fakeScenePorts(viewer));
|
||||
|
||||
try {
|
||||
militaryInstallationsLayer.init(viewer);
|
||||
@@ -344,7 +345,7 @@ async function runInstallationLoad({
|
||||
},
|
||||
},
|
||||
};
|
||||
bindFakeCesiumCamera(viewer);
|
||||
bindFakeCesiumCamera(viewer, fakeScenePorts(viewer));
|
||||
|
||||
const originalSetInputAction = Cesium.ScreenSpaceEventHandler.prototype.setInputAction;
|
||||
Cesium.ScreenSpaceEventHandler.prototype.setInputAction = function (action, type, modifier) {
|
||||
@@ -635,7 +636,7 @@ test('a floor that lands after the render deadline lifts the dots off the ellips
|
||||
},
|
||||
},
|
||||
};
|
||||
bindFakeCesiumCamera(viewer);
|
||||
bindFakeCesiumCamera(viewer, fakeScenePorts(viewer));
|
||||
|
||||
const heightOf = (entity) => Cesium.Cartographic.fromCartesian(
|
||||
entity.position.getValue(Cesium.JulianDate.now()),
|
||||
@@ -706,7 +707,7 @@ test('reports bounded installation requests as loading and clears on settlement'
|
||||
},
|
||||
dataSources: { add(value) { return value; }, remove() { return true; } },
|
||||
};
|
||||
bindFakeCesiumCamera(viewer);
|
||||
bindFakeCesiumCamera(viewer, fakeScenePorts(viewer));
|
||||
|
||||
try {
|
||||
militaryInstallationsLayer.init(viewer);
|
||||
@@ -771,7 +772,7 @@ test('zoom-out aborts an active installation request and returns non-loading gui
|
||||
},
|
||||
dataSources: { add(value) { return value; }, remove() { return true; } },
|
||||
};
|
||||
bindFakeCesiumCamera(viewer);
|
||||
bindFakeCesiumCamera(viewer, fakeScenePorts(viewer));
|
||||
|
||||
try {
|
||||
militaryInstallationsLayer.init(viewer);
|
||||
|
||||
Reference in new issue
Block a user