refactor(satellites): Cesium rendering behind a renderer interface

Move native points, synchronous orbit primitives, tracked entities, follow and picking into the Cesium renderer. Use appClock for satellite physical epochs and isolate the unchanged CelestialRing ephemeris. Synthetic core/dense and ISS/MEO/GEO snapshots match the baseline exactly; all gates pass. The pointer-ownership source assertion follows scene.pick into render/cesium.js; registry and import-boundary assertions now reflect the migrated satellite layer.
This commit is contained in:
German Khokhlov committed 2026-10-22 22:37:09 +04:00
1 parent 83fbe6949f
commit 000ef99464
27 files changed
+459 -196

No files matched your search

+13 -3
View File
@@ -1,7 +1,13 @@
import * as Cesium from 'cesium';
import * as geo from '../../geo/index.js';
import { ISS_NORAD, ISS_OVERLAY_SOURCE_ID } from './policy.js';
export function createTesting({ state: layerState, services, parts, source }) {
export function createTesting({
state: layerState,
services,
parts,
source,
getRenderer,
}) {
/**
* Seed a single tracked satellite so tests can invoke the exact production
* pre-render callback without constructing a WebGL viewer.
@@ -27,6 +33,8 @@ export function createTesting({ state: layerState, services, parts, source }) {
// control satellite that must NOT be treated as part of it).
neighbours = [],
}) {
layerState._renderer = null;
layerState._engine = null;
layerState._viewer = viewer;
layerState._catalog = new Map([
[noradId, { name, satrec, group: 'stations' }],
@@ -168,6 +176,8 @@ export function createTesting({ state: layerState, services, parts, source }) {
overlayHost,
preservePending = false,
}) {
layerState._renderer = null;
layerState._engine = null;
layerState._viewer = viewer;
layerState._catalog = new Map([
[ISS_NORAD, { name: 'ISS (ZARYA)', satrec, group: 'stations' }],
@@ -177,7 +187,7 @@ export function createTesting({ state: layerState, services, parts, source }) {
[
ISS_NORAD,
{
primitive: { show: true, modelMatrix: new Cesium.Matrix4() },
primitive: { show: true, modelMatrix: geo.matrix4.create() },
gmstAtBake: 0,
},
],