mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 18:22:25 +00:00
fix(cctv): fail open before projection geometry exists
This commit is contained in:
1 parent
b98b9d390f
commit
02c60c0a20
2 files changed
+6
-1
No files matched your search
@@ -256,6 +256,7 @@ export function createFrames({ state: layerState, services, parts, source }) {
|
||||
const camera = findCamera(viewer);
|
||||
if (typeof camera?.visiblePoints !== 'function') return true;
|
||||
const placed = record?.frustumPositions;
|
||||
if (!placed) return true;
|
||||
const points = _scratchPoints;
|
||||
points.length = 0;
|
||||
if (record?.position) points.push(record.position);
|
||||
|
||||
@@ -448,6 +448,10 @@ test('what cannot be judged counts as visible', () => {
|
||||
const flat = lookingDown();
|
||||
flat.scene.mode = Cesium.SceneMode.SCENE2D;
|
||||
assert.equal(framesFor(flat).projectionInView(record), true);
|
||||
const noGeometry = { camera: { id: 'plane' }, projection: record.projection };
|
||||
const noGeometry = {
|
||||
camera: { id: 'plane' },
|
||||
projection: record.projection,
|
||||
position: point(180, 0, 20),
|
||||
};
|
||||
assert.equal(framesFor(lookingDown()).projectionInView(noGeometry), true);
|
||||
});
|
||||
Reference in new issue
Block a user