mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 18:22:25 +00:00
Builds on the ISS 3D model (PR #1690) and brings it onto main's renderer seam: the station models are items of a `models` draw set, posed by heading, pitch and roll from the station's flight axes (`headingPitchRollOfAxes`), with the camera, canvas and clicks read from the renderer's ports; no satellites file reaches Cesium. The joint drivers write column-major matrices into node poses the model part keeps, for a renderer that can pose nodes; until the draw contract has that member the models draw rigid. - ISS joints take their angles from NASA's ISSLive telemetry, relayed by the server behind ISS_TELEMETRY_ENABLED. - STATION and LIVE sections of Context replace the floating command panel and player; both collapse like the Radio section. - Cockpit rides the ISS from mounts on its model; the LIVE page in the Cockpit briefing. - Tiangong as a second station model, with computed joints. - Installations: a label-box click selects the site.
104 lines
4.7 KiB
JavaScript
104 lines
4.7 KiB
JavaScript
import { createControls } from './controls.js';
|
|
import { createCatalog } from './catalog.js';
|
|
import { createCockpitSubject } from './cockpitSubject.js';
|
|
import { createLabels } from './labels.js';
|
|
import { createOrbits } from './orbits.js';
|
|
import { createRendering } from './rendering.js';
|
|
import { createTracking } from './tracking.js';
|
|
import { createTesting } from './testing.js';
|
|
import { createInteraction } from './interaction.js';
|
|
import { issStationDescription } from './issStation.js';
|
|
import { createStationPanel } from './stationPanel.js';
|
|
import { createIssModel } from './issModel.js';
|
|
import { createTiangongModel } from './tiangongModel.js';
|
|
import { tiangongStationDescription } from './tiangongStation.js';
|
|
import { createLifecycle } from './lifecycle.js';
|
|
import { createIngestion } from './ingestion.js';
|
|
import { createRecords } from './records.js';
|
|
import { createState } from './state.js';
|
|
|
|
/** Construct one layer with its own scene state and supplied application services. */
|
|
export function createSatellitesLayer({
|
|
services,
|
|
source,
|
|
resolveAsset = (url) => url,
|
|
}) {
|
|
if (typeof source?.readGroup !== 'function')
|
|
throw new TypeError('A satellites source is required');
|
|
const state = createState({ services });
|
|
const parts = {};
|
|
const context = { state, services, parts, source };
|
|
parts.controls = createControls(context);
|
|
parts.catalog = createCatalog(context);
|
|
parts.labels = createLabels(context);
|
|
parts.orbits = createOrbits(context);
|
|
parts.records = createRecords(context);
|
|
parts.rendering = createRendering(context);
|
|
// The stations drawn as models up close; the other parts ask
|
|
// stationModels.js which station an entry belongs to.
|
|
parts.issModel = createIssModel({ ...context, resolveAsset });
|
|
parts.tiangongModel = createTiangongModel({ ...context, resolveAsset });
|
|
parts.stationModels = [parts.issModel, parts.tiangongModel];
|
|
parts.stationPanel = createStationPanel({
|
|
...context,
|
|
stations: [
|
|
issStationDescription(context),
|
|
tiangongStationDescription(context),
|
|
],
|
|
});
|
|
parts.tracking = createTracking(context);
|
|
parts.testing = createTesting(context);
|
|
parts.interaction = createInteraction(context);
|
|
parts.lifecycle = createLifecycle(context);
|
|
parts.ingestion = createIngestion(context);
|
|
parts.cockpit = createCockpitSubject(context);
|
|
return Object.assign(
|
|
{},
|
|
parts.controls.methods,
|
|
parts.cockpit.methods,
|
|
parts.stationPanel.methods,
|
|
parts.lifecycle.methods,
|
|
parts.ingestion.methods,
|
|
{
|
|
satelliteVisualsVisible: parts.controls.satelliteVisualsVisible,
|
|
satelliteCatalogModeChanged: parts.controls.satelliteCatalogModeChanged,
|
|
createIssOverlayEntry: parts.labels.createIssOverlayEntry,
|
|
orbitFrameModelMatrix: parts.rendering.orbitFrameModelMatrix,
|
|
_setTrackedSatelliteRefreshStateForTest:
|
|
parts.testing._setTrackedSatelliteRefreshStateForTest,
|
|
_setSatelliteTrackingRefreshOutcomeForTest:
|
|
parts.testing._setSatelliteTrackingRefreshOutcomeForTest,
|
|
_trackedFrameCartesianForTest:
|
|
parts.testing._trackedFrameCartesianForTest,
|
|
_runSatellitePreRenderForTest:
|
|
parts.testing._runSatellitePreRenderForTest,
|
|
_setDenseCatalogStateForTest: parts.testing._setDenseCatalogStateForTest,
|
|
_clearDenseCatalogStateForTest:
|
|
parts.testing._clearDenseCatalogStateForTest,
|
|
_catalogGroupForTest: parts.testing._catalogGroupForTest,
|
|
_setSatelliteLabelLifecycleStateForTest:
|
|
parts.testing._setSatelliteLabelLifecycleStateForTest,
|
|
_trackIssForTest: parts.testing._trackIssForTest,
|
|
_pendingSatelliteTrackingRestoreForTest:
|
|
parts.testing._pendingSatelliteTrackingRestoreForTest,
|
|
_applyPendingSatelliteTrackingRestoreForTest:
|
|
parts.testing._applyPendingSatelliteTrackingRestoreForTest,
|
|
_removeSatelliteTrackingCandidateForTest:
|
|
parts.testing._removeSatelliteTrackingCandidateForTest,
|
|
_clearSatelliteLabelLifecycleForTest:
|
|
parts.testing._clearSatelliteLabelLifecycleForTest,
|
|
applySatellitePointFocusDeemphasis:
|
|
parts.rendering.applySatellitePointFocusDeemphasis,
|
|
getNextIssPass: parts.orbits.getNextIssPass,
|
|
getNextSatellitePass: parts.orbits.getNextSatellitePass,
|
|
resolveSatelliteForPass: parts.orbits.resolveSatelliteForPass,
|
|
getAnalystRecords: parts.records.getAnalystRecords,
|
|
scoreSatelliteNameMatch: parts.orbits.scoreSatelliteNameMatch,
|
|
findSatelliteOrbitTrackInTle: parts.orbits.findSatelliteOrbitTrackInTle,
|
|
getSatelliteOrbitTrack: parts.orbits.getSatelliteOrbitTrack,
|
|
},
|
|
);
|
|
}
|
|
export { ISS_OVERLAY_SOURCE_ID, ISS_OVERLAY_SOURCE_OPTIONS } from './policy.js';
|
|
export { createSatelliteSource } from './source.js';
|