mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Starry sky and the application viewer move into the Cesium adapter
src/sky/starrySky.js and src/app/viewer.js are Cesium through and through, so they move into the adapter as src/render/cesium/starrySky.js and applicationViewer.js; the ./application/viewer export points there. The celestial ring's precise ICRF rotation reaches the shell through a Cesium-free registry (src/sky/icrf.js) that the sky provides as it loads; the application's renderer loads it, and so does ./render/cesium/unbound. Both files leave the Cesium allow-list.
This commit is contained in:
1 parent
a8a9cc73a4
commit
e6d9ec0636
17 files changed
+110
-38
No files matched your search
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @module sky/icrf
|
||||
* @description The precise ICRF-to-fixed rotation, from the renderer that
|
||||
* has the tables for it (the Cesium adapter's starry sky provides it as it
|
||||
* loads, `src/render/cesium/starrySky.js`). Cesium-free: with none
|
||||
* provided, or before its tables load, it answers null and callers fall
|
||||
* back to `temeToPseudoFixed` (`src/geo/frames.js`).
|
||||
*/
|
||||
|
||||
let provided = null;
|
||||
|
||||
/**
|
||||
* Provide the precise rotation; a later call replaces it.
|
||||
* @param {(ms: number) => ({x: object, y: object, z: object} | null)} axesAt
|
||||
*/
|
||||
export function provideIcrfToFixed(axesAt) {
|
||||
provided = axesAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* The precise ICRF-to-fixed rotation at `ms` (epoch milliseconds) as its
|
||||
* axes (the matrix's columns), or null while it is unknown.
|
||||
* @param {number} ms
|
||||
* @returns {{x: object, y: object, z: object} | null}
|
||||
*/
|
||||
export function icrfToFixedAxes(ms) {
|
||||
return provided ? provided(ms) : null;
|
||||
}
|
||||
Reference in new issue
Block a user