mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +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.
26 lines
970 B
JavaScript
26 lines
970 B
JavaScript
import { defineStore } from 'pinia';
|
|
import { markRaw, shallowRef } from 'vue';
|
|
import { createOwners } from './owners.js';
|
|
|
|
/**
|
|
* The STATION section in Context as its view renders it: the selected
|
|
* station's controls (Automatic or Manual, the moving parts by hand), where
|
|
* its joint angles come from right now, and a zoom to it. The satellites
|
|
* layer's station panel presents it (`gev-station` store) and answers its
|
|
* controls through act(): `setStationMode`, `chooseStation`, `slideStation`,
|
|
* `resumeStationArm`, `zoomStation`.
|
|
*/
|
|
export const useStationStore = defineStore('gev-station', () => {
|
|
/** The presented section; null while no station is selected. */
|
|
const view = shallowRef(null);
|
|
|
|
/** @param {?object} next A fresh presentation; every publish re-renders. */
|
|
function publish(next) {
|
|
view.value = next && markRaw(next);
|
|
}
|
|
|
|
const { connect, detach, act } = createOwners();
|
|
|
|
return { view, publish, connect, detach, act };
|
|
});
|