mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
Keep the satellites layer's Cesium objects in its rendering part
The point collection and its dots, the baked orbit rings, the tracked entity, the frame number, the focus publish and the pick decoding now live in rendering.js, behind small helpers that take ECEF positions and render-contract colours. The catalog, controls, ingestion, lifecycle, orbits, policy, records, state, testing and tracking parts no longer import Cesium or touch the viewer, scene or primitives, and leave the allow-list. Point styles are [r, g, b, a] colours, converted once per style; geodetic conversions use the geo helpers; the per-frame tick runs through the frame port. What the layer draws and how it follows is unchanged.
This commit is contained in:
1 parent
d928c30337
commit
4fd1a850f1
19 files changed
+646
-281
No files matched your search
@@ -1,5 +1,3 @@
|
||||
import * as Cesium from 'cesium';
|
||||
|
||||
export function createState({ services }) {
|
||||
const { setOverlayEntries, setOverlaySourceVisible, clearOverlaySource } =
|
||||
services.overlays;
|
||||
@@ -25,8 +23,8 @@ export function createState({ services }) {
|
||||
|
||||
state._detectionObjects = new Map();
|
||||
|
||||
// noradId → { primitive, gmstAtBake }
|
||||
// primitive is a one-instance Cesium.Primitive holding the ring baked in ECEF
|
||||
// noradId → { primitive, gmstAtBake }, owned by the rendering part:
|
||||
// primitive is a one-instance primitive holding the ring baked in ECEF
|
||||
// at gmstAtBake; the preRender tick re-aligns it to current GMST by updating
|
||||
// its modelMatrix (rigid Z-rotation — no geometry rebuild, WS-D1).
|
||||
|
||||
@@ -62,8 +60,6 @@ export function createState({ services }) {
|
||||
|
||||
state._activeFocusCount = 0;
|
||||
|
||||
state._scratchFocusScreen = new Cesium.Cartesian2();
|
||||
|
||||
state._enabled = false;
|
||||
|
||||
// Click-to-track state
|
||||
@@ -88,7 +84,7 @@ export function createState({ services }) {
|
||||
|
||||
state._clickSubscription = null;
|
||||
|
||||
/** @type {Cesium.Event.RemoveCallback|null} trackedEntityChanged listener disposer (cross-layer untrack) */
|
||||
/** @type {(() => void)|null} follow-changed listener disposer (cross-layer untrack) */
|
||||
|
||||
state._trackedEntityChangedRemove = null;
|
||||
|
||||
@@ -140,25 +136,20 @@ export function createState({ services }) {
|
||||
|
||||
// Per-frame cache for the tracked satellite (WS-D2): dot, host readout, camera, and
|
||||
// getTrackedInfo all read one SGP4 sample per rendered frame, keyed on
|
||||
// scene.frameState.frameNumber, so they never diverge in epoch.
|
||||
// the rendered-frame number, so they never diverge in epoch.
|
||||
|
||||
state._trackedFrameNumber = -1;
|
||||
|
||||
state._trackedFrameGeo = null;
|
||||
// { longitude, latitude, altitude } or null
|
||||
|
||||
state._trackedFrameCartesian = new Cesium.Cartesian3();
|
||||
// The matching ECEF sample; the rendering part creates it.
|
||||
state._trackedFrameCartesian = null;
|
||||
|
||||
/** Optional deterministic clock used only by the production-frame test seam. */
|
||||
|
||||
state._trackedFrameNowForTest = null;
|
||||
|
||||
// Scratch variables
|
||||
|
||||
state._scratchCartesian = new Cesium.Cartesian3();
|
||||
|
||||
state._scratchRingRotation = new Cesium.Matrix3();
|
||||
|
||||
/** Update the explicit model only when the rounded altitude line changes. */
|
||||
/** Epoch of the last shared-context refresh for the tracked satellite. */
|
||||
|
||||
|
||||
Reference in new issue
Block a user