mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Draw FIRMS detections from a GPU icon set
This commit is contained in:
1 parent
8aaf5564d7
commit
c9f1fcd425
11 files changed
+318
-322
No files matched your search
@@ -28,17 +28,9 @@ export function createLifecycle({
|
||||
layerState._viewer = viewer;
|
||||
if (!layerState._dataSource) this.init(viewer);
|
||||
if (layerState._dataSource) layerState._dataSource.show = true;
|
||||
if (layerState._billboards) {
|
||||
// The camera can have moved anywhere while the layer was off: moveEnd
|
||||
// was not being listened to, and the preRender watcher is inert while
|
||||
// disabled AND while the (untimed) refetch below is in flight. So the
|
||||
// retained per-sprite show flags describe the OLD viewpoint. Re-cull
|
||||
// BEFORE the collection becomes visible — otherwise re-enabling at a
|
||||
// new location flashes far-side fires through the planet (and keeps
|
||||
// near-side ones hidden) until the fetch resolves.
|
||||
components.rendering.refreshHorizonCulling();
|
||||
layerState._billboards.show = true;
|
||||
}
|
||||
// The GPU culls the far side each frame, so retained rows are right
|
||||
// for wherever the camera went while the layer was off.
|
||||
if (layerState._icons) layerState._icons.show = true;
|
||||
overlayHost.setVisible(FIRMS_OVERLAY_SOURCE_ID, true);
|
||||
components.viewport.installLodWatcher();
|
||||
components.viewport.installMoveEndWatcher();
|
||||
@@ -63,7 +55,7 @@ export function createLifecycle({
|
||||
layerState._enabled = false;
|
||||
components.selection.clearFireSelection();
|
||||
if (layerState._dataSource) layerState._dataSource.show = false;
|
||||
if (layerState._billboards) layerState._billboards.show = false;
|
||||
if (layerState._icons) layerState._icons.show = false;
|
||||
overlayHost.clearSource(FIRMS_OVERLAY_SOURCE_ID);
|
||||
overlayHost.setVisible(FIRMS_OVERLAY_SOURCE_ID, false);
|
||||
clearSelectedEntityContextForLayer(id);
|
||||
@@ -110,7 +102,6 @@ export function createLifecycle({
|
||||
layerState._labelLodDistance = 0;
|
||||
layerState._pickIndexById.clear();
|
||||
layerState._fireByCardId.clear();
|
||||
layerState._cullPositions.length = 0;
|
||||
layerState._camSnapValid = false;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user