mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
Extract the native FIRMS renderer and own its settle timer
Keep fire normalization, LOD, anchors, cards and selection portable while the native renderer owns ground cells, sprites, input and scene disposal. Cancel superseded/removed settle timers and unregister the original sprite collection. Preserve all ten native raster pairs exactly in dev and preview; record source/click/focus/lifecycle, legacy Metal and full regression evidence with strict comparator sensitivity checks.
This commit is contained in:
1 parent
a3152ab719
commit
a9b3125a99
25 files changed
+672
-123
No files matched your search
@@ -1,4 +1,3 @@
|
||||
import * as Cesium from 'cesium';
|
||||
import {
|
||||
FIRMS_OVERLAY_SOURCE_ID,
|
||||
FIRMS_AMBIENT_COHORT_LIMIT,
|
||||
@@ -30,6 +29,10 @@ export function createCards({
|
||||
function rebuildAmbientLabels() {
|
||||
if (!layerState._viewer) return;
|
||||
const scene = layerState._viewer.scene;
|
||||
const project = (position, result) =>
|
||||
layerState._renderer
|
||||
? layerState._renderer.project(position, result)
|
||||
: config.projectToWindow(scene, position, result);
|
||||
const now = Date.now();
|
||||
const entries = [];
|
||||
/** @type {Array<{x: number, y: number}>} Screen positions of accepted labels. */
|
||||
@@ -52,8 +55,7 @@ export function createCards({
|
||||
);
|
||||
layerState._fireByCardId.set(selectedCard.id, layerState._selectedFire);
|
||||
entries.push(selectedCard);
|
||||
const screen = Cesium.SceneTransforms.worldToWindowCoordinates(
|
||||
scene,
|
||||
const screen = project(
|
||||
components.model.firePosition(layerState._selectedFire),
|
||||
layerState.scratchWindowCoord,
|
||||
);
|
||||
@@ -82,11 +84,7 @@ export function createCards({
|
||||
// LOD, far-side cells can still project on-canvas; accepting those first
|
||||
// starves front-side cards before the host applies its authoritative cull.
|
||||
if (beyondHorizon(candidate.cullPosition || candidate.position)) continue;
|
||||
const screen = Cesium.SceneTransforms.worldToWindowCoordinates(
|
||||
scene,
|
||||
candidate.position,
|
||||
layerState.scratchWindowCoord,
|
||||
);
|
||||
const screen = project(candidate.position, layerState.scratchWindowCoord);
|
||||
if (!screen) continue; // projection failed (e.g. behind camera) — drop silently
|
||||
if (
|
||||
screen.x < -LABEL_VIEW_MARGIN_PX ||
|
||||
|
||||
Reference in new issue
Block a user