mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Answer earthquake, CCTV pick and tracked sprite reads from the app
Earthquake analyst records come from the events the layer drew, gated on its own enabled flag, instead of reading each entity's position and property bag back; the discs no longer carry the bag. CCTV coverage rays and projection planes record their camera id in a layer pick store instead of a cctvCameraId entity property, with the same ownership checks. The tracked flight, military and local ADS-B billboards record their size and distance scaling as the entity record's sprite, which the close-range camera guard and the screen annotations' tracked footprint now read in place of the billboard's property getters.
This commit is contained in:
1 parent
05904edfc9
commit
0889cd0cb7
16 files changed
+160
-96
No files matched your search
@@ -424,7 +424,6 @@ export function createScreenAnnotationRenderer(
|
||||
let bottom = painted ? painted.y + painted.h : undefined;
|
||||
|
||||
const ent = viewer.trackedEntity;
|
||||
const now = Cesium.JulianDate.now();
|
||||
const displayPosition = readEntityRecord(ent)?.displayPosition;
|
||||
const world =
|
||||
typeof displayPosition === 'function' ? displayPosition() : null;
|
||||
@@ -436,13 +435,14 @@ export function createScreenAnnotationRenderer(
|
||||
)
|
||||
: null;
|
||||
|
||||
// Billboard box — centered on the anchor, magnified by scaleByDistance.
|
||||
const bb = ent?.billboard;
|
||||
if (bb && win && Number.isFinite(win.x) && Number.isFinite(win.y)) {
|
||||
const baseW = bb.width?.getValue?.(now) ?? 28;
|
||||
const baseH = bb.height?.getValue?.(now) ?? 28;
|
||||
// Billboard box — centered on the anchor, magnified by scaleByDistance, from
|
||||
// the size the tracking layer recorded for its sprite.
|
||||
const sprite = readEntityRecord(ent)?.sprite;
|
||||
if (sprite && win && Number.isFinite(win.x) && Number.isFinite(win.y)) {
|
||||
const baseW = sprite.width ?? 28;
|
||||
const baseH = sprite.height ?? 28;
|
||||
let scale = 1;
|
||||
const sbd = bb.scaleByDistance?.getValue?.(now);
|
||||
const sbd = sprite.scaleByDistance;
|
||||
if (sbd)
|
||||
scale = nearFarValue(
|
||||
sbd,
|
||||
|
||||
Reference in new issue
Block a user