mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
refactor(space): separate satellite and mission layer components
This commit is contained in:
1 parent
61db945b21
commit
ce0568983a
44 files changed
+8767
-6095
No files matched your search
@@ -0,0 +1,73 @@
|
||||
import { createControls } from './controls.js';
|
||||
import { createCatalog } from './catalog.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 { createLifecycle } from './lifecycle.js';
|
||||
import { createIngestion } from './ingestion.js';
|
||||
import { createState } from './state.js';
|
||||
|
||||
/** Construct one layer with its own scene state and supplied application services. */
|
||||
export function createSatellitesLayer({ services, source }) {
|
||||
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.rendering = createRendering(context);
|
||||
parts.tracking = createTracking(context);
|
||||
parts.testing = createTesting(context);
|
||||
parts.interaction = createInteraction(context);
|
||||
parts.lifecycle = createLifecycle(context);
|
||||
parts.ingestion = createIngestion(context);
|
||||
return Object.assign(
|
||||
{},
|
||||
parts.controls.methods,
|
||||
parts.lifecycle.methods,
|
||||
parts.ingestion.methods,
|
||||
{
|
||||
satelliteVisualsVisible: parts.controls.satelliteVisualsVisible,
|
||||
satelliteCatalogModeChanged: parts.controls.satelliteCatalogModeChanged,
|
||||
createIssOverlayEntry: parts.labels.createIssOverlayEntry,
|
||||
orbitFrameModelMatrix: parts.orbits.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,
|
||||
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';
|
||||
Reference in new issue
Block a user