mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 18:22:25 +00:00
Read vessel, CCTV and FIRMS billboard state from Core's mirror
The three layers now add their billboards through addBillboard and write the mirrored fields through setBillboard, so selection, cards, queries, focus, view thinning and the FIRMS horizon cull read what was pushed from Core instead of from Cesium. Vessels and FIRMS state their sprites' own sizes (32 px ship artwork, the glow canvas at twice the core size), which the mirror needs. A vessel helper, iconPosition, replaces the repeated mirror-or-visual position lookups, and the vessel visibility pass writes show only when it changes, as CCTV and FIRMS already did. A billboard never given a position now has none in the mirror rather than the origin.
This commit is contained in:
1 parent
1cfff5803a
commit
47f7eeb00e
23 files changed
+152
-97
No files matched your search
@@ -79,6 +79,7 @@ import {
|
||||
IDLE_CAMERA_COLOR,
|
||||
LIVE_CAMERA_COLOR,
|
||||
} from '../layers/cctv/policy.js';
|
||||
import { mirrorBillboard } from './billboardMirror.js';
|
||||
|
||||
const ASPECT = 16 / 9;
|
||||
const toRad = (deg) => (deg * Math.PI) / 180;
|
||||
@@ -355,7 +356,7 @@ test('default COVERAGE refresh materializes the active and visible camera frustu
|
||||
test('camera icons are violet for video feeds, cyan for stills, amber when active', () => {
|
||||
const record = (id, feedType) => ({
|
||||
camera: { ...UNCLAMPED_CAMERA, id, feedType, groundElevationM: 0 },
|
||||
billboard: {},
|
||||
billboard: mirrorBillboard({}),
|
||||
coverageEntities: [],
|
||||
projection: null,
|
||||
});
|
||||
@@ -682,7 +683,7 @@ test('CCTV disable hide sweep hides record visuals and destroys viewsheds withou
|
||||
camera: { id: 'a' },
|
||||
activationDone: true,
|
||||
probeClampRangeM: 105,
|
||||
billboard: { color: 'keep-color', scale: 1.25 },
|
||||
billboard: mirrorBillboard({ color: 'keep-color', scale: 1.25 }),
|
||||
coverageEntities: [{ show: true }, { show: true }],
|
||||
projection: { planeEntity: { show: true } },
|
||||
viewshedPrimitive: viewshedA,
|
||||
@@ -691,7 +692,7 @@ test('CCTV disable hide sweep hides record visuals and destroys viewsheds withou
|
||||
camera: { id: 'b' },
|
||||
activationDone: true,
|
||||
probeClampRangeM: 146,
|
||||
billboard: { color: 'keep-color', scale: 1 },
|
||||
billboard: mirrorBillboard({ color: 'keep-color', scale: 1 }),
|
||||
projection: null,
|
||||
viewshedPrimitive: viewshedB,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user