mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Paint detection from the overlay host's camera, off Cesium
The world overlay host now hands each paint lane the eye's height from the camera port's pose (cameraHeight) beside its position. Detection reads its view scale and label budget from it instead of the viewer's Cesium camera, measures box distances with plain arithmetic, and no longer keeps the viewer, so detection.js leaves the Cesium allow-list.
This commit is contained in:
1 parent
d0ca460313
commit
fa762f808e
4 files changed
+42
-14
No files matched your search
@@ -538,6 +538,25 @@ test('callouts stop painting the moment the last detectable object goes away', (
|
||||
}
|
||||
});
|
||||
|
||||
test('the view scale reads the camera height the overlay host gives each paint', () => {
|
||||
const env = installEnvironment();
|
||||
try {
|
||||
initWorldOverlay(env.viewer);
|
||||
initDetection(env.viewer, [{ id: 'flights', getDetectableObjects: () => [] }], () => {});
|
||||
setMode('DENSE');
|
||||
const scaleAt = (height) => {
|
||||
env.viewer.camera.positionCartographic.height = height;
|
||||
env.advance(250);
|
||||
env.postRender.raise();
|
||||
return getDetectionDiagnostics().viewScale;
|
||||
};
|
||||
assert.equal(scaleAt(1000), 'street');
|
||||
assert.equal(scaleAt(10000), 'metro');
|
||||
} finally {
|
||||
env.cleanup();
|
||||
}
|
||||
});
|
||||
|
||||
test('every style paints its OWN plate token through the production callout path', () => {
|
||||
// The token table and the direct painter are both pinned elsewhere, but a
|
||||
// pin on either one still passes if the runtime stops consulting the active
|
||||
|
||||
Reference in new issue
Block a user