mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
Keep aircraft, installation and viewshed state off Cesium objects
The aircraft layers' model spec key, IR boost and belly offset and the billboards' large-icon flag move into aircraftVisuals, one store shared by flights, military and local ADS-B. Installation markers' last drawn height and selection move into installationMarkers. The CCTV viewshed QA tag is now the viewshedCameraId record field, which qa-cctv-v2 reads through entityRecords. Test fixtures drop a placement flag nothing reads.
This commit is contained in:
1 parent
2394703c14
commit
04a70d59e9
11 files changed
+84
-40
No files matched your search
@@ -3,6 +3,7 @@ import * as Cesium from 'cesium';
|
||||
import { t } from '../../i18n/index.js';
|
||||
import { LAYER_ID, MAX_RENDERED, COLOR_BY_CLASS } from './policy.js';
|
||||
import { entityRecord } from '../../data/entityRecords.js';
|
||||
import { installationMarkers } from './markerState.js';
|
||||
|
||||
export function createRendering({
|
||||
state: layerState,
|
||||
@@ -219,13 +220,14 @@ export function createRendering({
|
||||
: null;
|
||||
if (retained) {
|
||||
// Same geometry: update the marker in place (selection, floor height).
|
||||
if (retained.gevInstallationHeightM !== surfaceHeightM) {
|
||||
retained.gevInstallationHeightM = surfaceHeightM;
|
||||
const marker = installationMarkers.write(retained);
|
||||
if (marker.heightM !== surfaceHeightM) {
|
||||
marker.heightM = surfaceHeightM;
|
||||
retained.position = displayPosition;
|
||||
entityRecord(retained).displayPosition = () => displayPosition;
|
||||
}
|
||||
if (retained.gevInstallationSelected !== selectedRecord) {
|
||||
retained.gevInstallationSelected = selectedRecord;
|
||||
if (marker.selected !== selectedRecord) {
|
||||
marker.selected = selectedRecord;
|
||||
retained.point.pixelSize = selectedRecord ? 13 : 9;
|
||||
retained.point.color = selectedRecord ? Cesium.Color.WHITE : color;
|
||||
}
|
||||
@@ -268,8 +270,10 @@ export function createRendering({
|
||||
outline.installationId = record.id;
|
||||
entityIds.push(outline.id);
|
||||
}
|
||||
entity.gevInstallationHeightM = surfaceHeightM;
|
||||
entity.gevInstallationSelected = selectedRecord;
|
||||
Object.assign(installationMarkers.write(entity), {
|
||||
heightM: surfaceHeightM,
|
||||
selected: selectedRecord,
|
||||
});
|
||||
entityRecord(entity).trackedId = `installations:${record.id}`;
|
||||
entityRecord(entity).displayPosition = () => displayPosition;
|
||||
entityRecord(entity).labelModel = {
|
||||
|
||||
Reference in new issue
Block a user