mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-22 19:22:18 +00:00
36 lines
842 B
JavaScript
36 lines
842 B
JavaScript
export function createControls({ state: layerState, services, parts, source }) {
|
|
const methods = {
|
|
id: 'rocket-launches',
|
|
|
|
name: 'Space Missions (30d)',
|
|
|
|
icon: '🚀',
|
|
|
|
source: 'Launch Library 2',
|
|
|
|
updateInterval: 300000,
|
|
|
|
/** Release only Space Mission camera ownership, preserving layer and selection state. */
|
|
releaseCameraOwnership() {
|
|
parts.panel.clearMissionRosterHover();
|
|
parts.replay.stopMissionReplay();
|
|
parts.selection.stopMissionZoomAnchor();
|
|
},
|
|
|
|
getStats() {
|
|
return {
|
|
count: layerState._count,
|
|
orbitMatches: layerState._orbitMatches,
|
|
lastUpdate: layerState._lastUpdate,
|
|
error: layerState._lastError,
|
|
};
|
|
},
|
|
|
|
attachDataManager(dataManager) {
|
|
layerState._dataManager = dataManager;
|
|
},
|
|
};
|
|
|
|
return { methods };
|
|
}
|