Draw the satellites layer through the renderer ports

The satellite dots, the tracked satellite's dot and the orbit rings now go
through the draw port instead of a raw point collection, an entity and
primitives, so the layer's rendering no longer drives Cesium and leaves the
Cesium allow-list.

- Dots are one points set, patched in place and sent once per frame.
- The tracked dot is its own set, drawn at the sample the follow camera
  framed (or after the frame's own sample when no camera read it).
- Rings are geodesic lines with a behind-the-globe colour, turned about the
  pole by the sidereal angle in the layer each second, since the port has no
  inertial frame. The orbit frame matrix is a plain 16-number array, and
  the launches layer now receives plain ECEF orbit positions.
- Clicks match the draw hit against the layer's own sets.
- The focus pass projects every dot in one batched call.
- Depth-fail lines in the Cesium draw port honour pickable: false.
This commit is contained in:
Sameh Khamis committed 2026-11-08 13:06:52 -08:00
1 parent 1bff078097
commit d513034f3d
17 files changed
+845 -415

No files matched your search

+10 -11
View File
@@ -21,7 +21,7 @@ export function createInteraction({
// Cross-layer untrack (H2, mirror of flights): if ANOTHER layer (flights,
// military, …) grabs the follow-camera, drop our tracking so the orbit ring /
// tracked entity don't orphan — without touching viewer.trackedEntity (the
// tracked dot don't orphan — without touching viewer.trackedEntity (the
// new owner controls it). Guarded so our OWN switch (viewer.trackedEntity
// briefly undefined mid-_trackSatellite) doesn't self-clear.
if (!layerState._trackedEntityChangedRemove) {
@@ -46,18 +46,17 @@ export function createInteraction({
layerState._clickSubscription = inputFor(viewer).onClick((event) => {
if (!layerState._enabled) return;
const picked = event.pick;
const hit = event.drawHit;
if (picked) {
// Clicking tracked entity itself — ignore
if (parts.rendering._pickIsTrackedEntity(picked)) return;
// Clicking the tracked satellite's own dot — ignore
if (parts.rendering._hitIsTracked(hit)) return;
// Check if it's a satellite point (id is NORAD catalog number)
const noradId = parts.rendering._pickedPointId(picked);
if (noradId !== null && layerState._catalog.has(noradId)) {
parts.tracking._cancelPendingTrackingRestore();
parts.tracking._trackSatellite(noradId, { origin: 'user' });
return;
}
// A satellite dot (its item id is the NORAD catalog number)
const noradId = parts.rendering._hitPointId(hit);
if (noradId !== null && layerState._catalog.has(noradId)) {
parts.tracking._cancelPendingTrackingRestore();
parts.tracking._trackSatellite(noradId, { origin: 'user' });
return;
}
// A pick that belongs to a sibling layer (plane, vessel, station, CCTV