mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Move the active fires layer's cells, camera, cards and LOD onto renderer ports
Heat cells are clamped rectangle fills in one draw set per layer (firms:N:cells) instead of entities. The LOD watcher follows the camera port's pose, view rectangle and moveEnd and the frame port's preRender; cards project and horizon-test through the query port. Colours, the view change thresholds and the padded bounds are unchanged. On a viewer with no renderer bound, the layer answers projection, occlusion and preRender from the viewer's scene, as it did before. Policy, model, state, viewport, cards and lifecycle no longer import Cesium and leave the allow-list. Rendering keeps Cesium for the detection icons, which stay on the shared icon-set primitive, and loads the unbound camera and draw factories. Heat cells are no longer entities, so double-clicking one no longer makes the camera follow its centre.
This commit is contained in:
1 parent
6f82f9cc9c
commit
6e23d2aac9
18 files changed
+639
-197
No files matched your search
@@ -17,6 +17,7 @@ import { FIRE_ANCHOR_LIFT_M } from './fireAnchors.js';
|
||||
import { getLocale, setLocale } from '../i18n/index.js';
|
||||
import { reportMeshFloorCell, setMeshFloorPreferred } from './groundFloor.js';
|
||||
import { fakeInput } from '../input/testDoubles.mjs';
|
||||
import { bindFakeCesiumScene } from '../testSupport/fakeCesiumScene.mjs';
|
||||
|
||||
const NOW = Date.UTC(2026, 6, 17, 4, 0);
|
||||
const H = 3600000;
|
||||
@@ -217,6 +218,7 @@ test('real FIRMS lifecycle clears host entries on disable and destroy', async ()
|
||||
primitives: { contains() { return false; } },
|
||||
},
|
||||
};
|
||||
bindFakeCesiumScene(viewer);
|
||||
fakeInput(viewer);
|
||||
const layer = createFirmsHeatmapLayer({
|
||||
id: 'firms',
|
||||
|
||||
@@ -14,6 +14,7 @@ import { isOverlayPointVisible, normalizeOverlayEntry } from '../overlays/worldO
|
||||
import { createIconSet, ICON_CULL_LIFT } from './iconSet.js';
|
||||
import { writeHoldSegment } from './iconSegment.js';
|
||||
import { fakeInput } from '../input/testDoubles.mjs';
|
||||
import { bindFakeCesiumScene } from '../testSupport/fakeCesiumScene.mjs';
|
||||
|
||||
const AUSTIN = { lon: -97.7, lat: 30.2 };
|
||||
/** Antipode of Austin — as far behind the limb as a point on Earth can be. */
|
||||
@@ -379,6 +380,7 @@ function createHarness(rawFires) {
|
||||
mapProjection: new Cesium.GeographicProjection(),
|
||||
},
|
||||
};
|
||||
bindFakeCesiumScene(viewer);
|
||||
fakeInput(viewer);
|
||||
|
||||
const layer = createFirmsHeatmapLayer({
|
||||
|
||||
@@ -16,6 +16,7 @@ import { readLayerSource } from '../testSupport/readLayerSource.mjs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { fakeInput } from '../input/testDoubles.mjs';
|
||||
import { bindFakeCesiumScene } from '../testSupport/fakeCesiumScene.mjs';
|
||||
|
||||
const LAYER_SOURCE = readLayerSource(
|
||||
path.join(path.dirname(fileURLToPath(import.meta.url)), 'firmsHeatmap.js'),
|
||||
@@ -81,6 +82,7 @@ function harness({
|
||||
},
|
||||
dataSources: { add() {}, remove() {} },
|
||||
};
|
||||
bindFakeCesiumScene(viewer);
|
||||
const input = fakeInput(viewer);
|
||||
// The LOD rebuild (and with it the context-registration sweep) is inert
|
||||
// without a data source, so tests that drive a real refresh need one.
|
||||
|
||||
Reference in new issue
Block a user