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
@@ -3,6 +3,7 @@ import {
|
||||
isTrackingClickGesture,
|
||||
} from '../../data/trackingClickGesture.js';
|
||||
import * as Cesium from 'cesium';
|
||||
import { cctvPicks } from './pickState.js';
|
||||
|
||||
export function createSelection({
|
||||
state: layerState,
|
||||
@@ -207,7 +208,7 @@ export function createSelection({
|
||||
|
||||
/**
|
||||
* Extracts a camera ID from a Cesium pick result by checking billboard IDs,
|
||||
* primitive IDs, and entity cctvCameraId properties.
|
||||
* primitive IDs, and the camera ids the layer keeps for its coverage entities.
|
||||
* @param {Object|null} picked - Result from scene.pick().
|
||||
* @returns {string|null} Camera ID, or null if the pick is not a CCTV entity.
|
||||
*/
|
||||
@@ -215,17 +216,13 @@ export function createSelection({
|
||||
function extractPickedCameraId(picked) {
|
||||
if (!picked) return null;
|
||||
|
||||
const entity = picked.id?.properties
|
||||
const entity = cctvPicks.read(picked.id)
|
||||
? picked.id
|
||||
: picked.primitive?.id?.properties
|
||||
: cctvPicks.read(picked.primitive?.id)
|
||||
? picked.primitive.id
|
||||
: null;
|
||||
const maybeProp = entity?.properties?.cctvCameraId;
|
||||
if (maybeProp) {
|
||||
const value =
|
||||
typeof maybeProp.getValue === 'function'
|
||||
? maybeProp.getValue(Cesium.JulianDate.now())
|
||||
: maybeProp;
|
||||
const value = cctvPicks.read(entity)?.cameraId;
|
||||
if (value !== undefined) {
|
||||
const record =
|
||||
typeof value === 'string' ? layerState._recordById.get(value) : null;
|
||||
const ownsCoverageEntity = Boolean(
|
||||
|
||||
Reference in new issue
Block a user