fix(cctv): fail open before projection geometry exists

This commit is contained in:
brandonabyrd committed 2026-11-18 17:13:06 -06:00
1 parent b98b9d390f
commit 02c60c0a20
2 files changed
+6 -1

No files matched your search

+1
View File
@@ -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);
+5 -1
View File
@@ -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);
});