@rubin-epo/epo-widget-lib 1.1.3 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +4 -1
- package/dist/OrbitalSim.cjs +1 -0
- package/dist/OrbitalSim.d.ts +3 -0
- package/dist/OrbitalSim.js +147 -0
- package/dist/_virtual/_commonjsHelpers.cjs +1 -0
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/index2.cjs +1 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/index3.cjs +1 -0
- package/dist/_virtual/index3.js +4 -0
- package/dist/_virtual/react-is.development.cjs +1 -0
- package/dist/_virtual/react-is.development.js +4 -0
- package/dist/_virtual/react-is.production.min.cjs +1 -0
- package/dist/_virtual/react-is.production.min.js +4 -0
- package/dist/atomic/ImageStack/styles.d.ts +4 -0
- package/dist/charts/Unit/Span.d.ts +10 -0
- package/dist/charts/Unit/StandardUnit.d.ts +12 -0
- package/dist/charts/Unit/StellarUnit.d.ts +12 -0
- package/dist/charts/Unit/Sub.d.ts +10 -0
- package/dist/charts/Unit/SvgSub.d.ts +10 -0
- package/dist/charts/Unit/TSpan.d.ts +10 -0
- package/dist/charts/Unit/index.d.ts +9 -0
- package/dist/charts/Unit/utilities.d.ts +25 -0
- package/dist/layout/Controls/index.d.ts +1 -1
- package/dist/localeStrings/en/epo-widget-lib.json +23 -0
- package/dist/localeStrings/es/epo-widget-lib.json +2 -1
- package/dist/node_modules/classnames/index.cjs +5 -0
- package/dist/node_modules/classnames/index.js +42 -0
- package/dist/node_modules/object-assign/index.cjs +5 -0
- package/dist/node_modules/object-assign/index.js +54 -0
- package/dist/node_modules/prop-types/checkPropTypes.cjs +1 -0
- package/dist/node_modules/prop-types/checkPropTypes.js +54 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.cjs +1 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +52 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.cjs +2 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +329 -0
- package/dist/node_modules/prop-types/index.cjs +1 -0
- package/dist/node_modules/prop-types/index.js +15 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.cjs +1 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
- package/dist/node_modules/prop-types/lib/has.cjs +1 -0
- package/dist/node_modules/prop-types/lib/has.js +7 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.cjs +8 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +95 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.cjs +8 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +78 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.cjs +1 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +10 -0
- package/dist/node_modules/three/examples/jsm/controls/OrbitControls.cjs +1 -0
- package/dist/node_modules/three/examples/jsm/controls/OrbitControls.js +458 -0
- package/dist/style.css +1 -0
- package/dist/widgets/ColorTool/ImageComposite/styles.d.ts +4 -0
- package/dist/widgets/ColorTool/styles.d.ts +6 -0
- package/dist/widgets/OrbitalSim/Camera.cjs +1 -0
- package/dist/widgets/OrbitalSim/Camera.d.ts +10 -0
- package/dist/widgets/OrbitalSim/Camera.js +20 -0
- package/dist/widgets/OrbitalSim/CameraController.cjs +1 -0
- package/dist/widgets/OrbitalSim/CameraController.d.ts +12 -0
- package/dist/widgets/OrbitalSim/CameraController.js +31 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.cjs +1 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.d.ts +13 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.js +60 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.module.css.cjs +1 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.module.css.js +7 -0
- package/dist/widgets/OrbitalSim/Observation.cjs +1 -0
- package/dist/widgets/OrbitalSim/Observation.d.ts +16 -0
- package/dist/widgets/OrbitalSim/Observation.js +60 -0
- package/dist/widgets/OrbitalSim/Observations.cjs +1 -0
- package/dist/widgets/OrbitalSim/Observations.d.ts +16 -0
- package/dist/widgets/OrbitalSim/Observations.js +38 -0
- package/dist/widgets/OrbitalSim/Orbital.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbital.d.ts +52 -0
- package/dist/widgets/OrbitalSim/Orbital.js +256 -0
- package/dist/widgets/OrbitalSim/OrbitalDetails.cjs +1 -0
- package/dist/widgets/OrbitalSim/OrbitalDetails.d.ts +14 -0
- package/dist/widgets/OrbitalSim/OrbitalDetails.js +56 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.cjs +1 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.js +51 -0
- package/dist/widgets/OrbitalSim/Orbitals.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbitals.d.ts +48 -0
- package/dist/widgets/OrbitalSim/Orbitals.js +147 -0
- package/dist/widgets/OrbitalSim/PlaybackSpeed.cjs +1 -0
- package/dist/widgets/OrbitalSim/PlaybackSpeed.d.ts +16 -0
- package/dist/widgets/OrbitalSim/PlaybackSpeed.js +97 -0
- package/dist/widgets/OrbitalSim/PotentialOrbits.cjs +1 -0
- package/dist/widgets/OrbitalSim/PotentialOrbits.d.ts +16 -0
- package/dist/widgets/OrbitalSim/PotentialOrbits.js +59 -0
- package/dist/widgets/OrbitalSim/Sun.cjs +1 -0
- package/dist/widgets/OrbitalSim/Sun.d.ts +11 -0
- package/dist/widgets/OrbitalSim/Sun.js +35 -0
- package/dist/widgets/OrbitalSim/chartColors.module.css.cjs +1 -0
- package/dist/widgets/OrbitalSim/chartColors.module.css.js +4 -0
- package/dist/widgets/OrbitalSim/index.d.ts +23 -0
- package/dist/widgets/OrbitalSim/orbitalUtilities.cjs +1 -0
- package/dist/widgets/OrbitalSim/orbitalUtilities.d.ts +69 -0
- package/dist/widgets/OrbitalSim/orbitalUtilities.js +142 -0
- package/dist/widgets/SupernovaThreeVector/Histogram/index.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/styles.d.ts +8 -0
- package/package.json +11 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const e = "_container_13gyh_35", l = "_label_13gyh_249", _ = "_details_13gyh_288", a = "_disabled_13gyh_330", t = "_slideoutPanel_13gyh_334", d = "_slideoutRow_13gyh_347", s = "_slideoutCol_13gyh_352", i = "_slideout_13gyh_334", o = {
|
|
2
|
+
container: e,
|
|
3
|
+
"orbital-canvas": "_orbital-canvas_13gyh_43",
|
|
4
|
+
"playback-speed-slider-header": "_playback-speed-slider-header_13gyh_48",
|
|
5
|
+
"playback-speed-title": "_playback-speed-title_13gyh_61",
|
|
6
|
+
"playback-speed-slider-label": "_playback-speed-slider-label_13gyh_72",
|
|
7
|
+
"playback-speed-slider-label-bottom": "_playback-speed-slider-label-bottom_13gyh_83",
|
|
8
|
+
"playback-speed-slider-label-top": "_playback-speed-slider-label-top_13gyh_84",
|
|
9
|
+
"playback-speed-slider": "_playback-speed-slider_13gyh_48",
|
|
10
|
+
"elapsed-time-container": "_elapsed-time-container_13gyh_126",
|
|
11
|
+
"elapsed-time-title": "_elapsed-time-title_13gyh_145",
|
|
12
|
+
"elapsed-time-inner": "_elapsed-time-inner_13gyh_156",
|
|
13
|
+
"elapsed-time-divider": "_elapsed-time-divider_13gyh_165",
|
|
14
|
+
"elapsed-time-block": "_elapsed-time-block_13gyh_172",
|
|
15
|
+
"elapsed-val": "_elapsed-val_13gyh_176",
|
|
16
|
+
"elapsed-label": "_elapsed-label_13gyh_187",
|
|
17
|
+
"padded-drawer-inner": "_padded-drawer-inner_13gyh_198",
|
|
18
|
+
"nav-item": "_nav-item_13gyh_209",
|
|
19
|
+
"md-list-tile": "_md-list-tile_13gyh_209",
|
|
20
|
+
"md-tile-addon": "_md-tile-addon_13gyh_214",
|
|
21
|
+
"md-tile-text--primary": "_md-tile-text--primary_13gyh_227",
|
|
22
|
+
"md-text--theme-primary": "_md-text--theme-primary_13gyh_228",
|
|
23
|
+
"md-text": "_md-text_13gyh_228",
|
|
24
|
+
"active-item": "_active-item_13gyh_233",
|
|
25
|
+
label: l,
|
|
26
|
+
"obs-mesh": "_obs-mesh_13gyh_260",
|
|
27
|
+
"obs-label": "_obs-label_13gyh_264",
|
|
28
|
+
"obs-answer": "_obs-answer_13gyh_271",
|
|
29
|
+
"obs-hover": "_obs-hover_13gyh_272",
|
|
30
|
+
"obs-active": "_obs-active_13gyh_277",
|
|
31
|
+
details: _,
|
|
32
|
+
"details-table": "_details-table_13gyh_299",
|
|
33
|
+
"active-details": "_active-details_13gyh_309",
|
|
34
|
+
"details-toggle": "_details-toggle_13gyh_319",
|
|
35
|
+
disabled: a,
|
|
36
|
+
slideoutPanel: t,
|
|
37
|
+
slideoutRow: d,
|
|
38
|
+
slideoutCol: s,
|
|
39
|
+
slideout: i
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
e as container,
|
|
43
|
+
o as default,
|
|
44
|
+
_ as details,
|
|
45
|
+
a as disabled,
|
|
46
|
+
l as label,
|
|
47
|
+
i as slideout,
|
|
48
|
+
s as slideoutCol,
|
|
49
|
+
t as slideoutPanel,
|
|
50
|
+
d as slideoutRow
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),h=require("react"),e=require("../../node_modules/prop-types/index.cjs"),M=require("@react-three/fiber"),$=require("./Orbital.cjs"),A=require("./PotentialOrbits.cjs"),B=require("./orbitalUtilities.cjs");function I({neos:c,activeNeo:P,activeObs:_,selectionCallback:b,activeVelocityCallback:j,playing:o,dayPerVizSec:u,stepDirection:a,frameOverride:n,defaultZoom:m,potentialOrbits:C,observations:T,refObjs:v,elapsedTime:g,setElapsedTime:O,noLabels:z,reset:q,zoomLevel:s,setZoomLevel:F,t:p}){function k(r){const{remainingInits:t}=r;return{remainingInits:t-1}}const{camera:R}=M.useThree(),[y,x]=h.useReducer(k,{remainingInits:c.length});function E(){return(v||["earth","jupiter","mars","neptune"]).map(B.getRefObjProps).map(t=>{const{orbitColor:f,objectColor:l,objectRadius:d,Ref:N,Principal_desig:U,name:w}=t;return i.jsx($.default,{type:"planet",data:t,position:[0,0,0],zoomMod:s,defaultZoom:m,playing:o,stepDirection:a,dayPerVizSec:u,frameOverride:n,selectionCallback:b,orbitColor:f,objectColor:l,objectRadius:d,reset:q,t:p},`${N}-${U||w}`)})}return M.useFrame((r,t)=>{R.zoom!==s&&F(R.zoom),o&&O(g+a*t*u)}),h.useEffect(()=>{n&&O(g+a*(1/60)*u)},[n]),i.jsxs(i.Fragment,{children:[E(),C?i.jsx(A.default,{data:c,position:[0,0,0],initialized:!0,zoomMod:s,defaultZoom:m,playing:o,stepDirection:a,dayPerVizSec:u,frameOverride:n,selectionCallback:b,activeVelocityCallback:j,observations:T,activeObs:_,t:p,initCallback:x}):c.map((r,t)=>{const{Ref:f,Principal_desig:l,name:d}=r;return i.jsx($.default,{data:r,position:[0,0,0],active:r===P,initialized:y.remainingInits<=0,zoomMod:s,defaultZoom:m,playing:o,stepDirection:a,dayPerVizSec:u,frameOverride:n,selectionCallback:b,activeVelocityCallback:j,noLabels:z,reset:q,t:p,initCallback:x},f&&(l||d)?`${f}-${l||d}`:`orbit-${t}`)})]})}I.propTypes={neos:e.default.array,activeNeo:e.default.object,activeObs:e.default.object,selectionCallback:e.default.func,playing:e.default.bool,dayPerVizSec:e.default.number,stepDirection:e.default.number,frameOverride:e.default.number,activeVelocityCallback:e.default.func,defaultZoom:e.default.number,zoomLevel:e.default.number,setZoomLevel:e.default.func,potentialOrbits:e.default.bool,observations:e.default.array,refObjs:e.default.array,elapsedTime:e.default.number,setElapsedTime:e.default.func,noLabels:e.default.bool,reset:e.default.number,t:e.default.func};exports.default=I;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default Orbitals;
|
|
3
|
+
declare function Orbitals({ neos, activeNeo, activeObs, selectionCallback, activeVelocityCallback, playing, dayPerVizSec, stepDirection, frameOverride, defaultZoom, potentialOrbits, observations, refObjs, elapsedTime, setElapsedTime, noLabels, reset, zoomLevel, setZoomLevel, t, }: {
|
|
4
|
+
neos: any;
|
|
5
|
+
activeNeo: any;
|
|
6
|
+
activeObs: any;
|
|
7
|
+
selectionCallback: any;
|
|
8
|
+
activeVelocityCallback: any;
|
|
9
|
+
playing: any;
|
|
10
|
+
dayPerVizSec: any;
|
|
11
|
+
stepDirection: any;
|
|
12
|
+
frameOverride: any;
|
|
13
|
+
defaultZoom: any;
|
|
14
|
+
potentialOrbits: any;
|
|
15
|
+
observations: any;
|
|
16
|
+
refObjs: any;
|
|
17
|
+
elapsedTime: any;
|
|
18
|
+
setElapsedTime: any;
|
|
19
|
+
noLabels: any;
|
|
20
|
+
reset: any;
|
|
21
|
+
zoomLevel: any;
|
|
22
|
+
setZoomLevel: any;
|
|
23
|
+
t: any;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare namespace Orbitals {
|
|
26
|
+
namespace propTypes {
|
|
27
|
+
let neos: PropTypes.Requireable<any[]>;
|
|
28
|
+
let activeNeo: PropTypes.Requireable<object>;
|
|
29
|
+
let activeObs: PropTypes.Requireable<object>;
|
|
30
|
+
let selectionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
31
|
+
let playing: PropTypes.Requireable<boolean>;
|
|
32
|
+
let dayPerVizSec: PropTypes.Requireable<number>;
|
|
33
|
+
let stepDirection: PropTypes.Requireable<number>;
|
|
34
|
+
let frameOverride: PropTypes.Requireable<number>;
|
|
35
|
+
let activeVelocityCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
36
|
+
let defaultZoom: PropTypes.Requireable<number>;
|
|
37
|
+
let zoomLevel: PropTypes.Requireable<number>;
|
|
38
|
+
let setZoomLevel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
|
+
let potentialOrbits: PropTypes.Requireable<boolean>;
|
|
40
|
+
let observations: PropTypes.Requireable<any[]>;
|
|
41
|
+
let refObjs: PropTypes.Requireable<any[]>;
|
|
42
|
+
let elapsedTime: PropTypes.Requireable<number>;
|
|
43
|
+
let setElapsedTime: PropTypes.Requireable<(...args: any[]) => any>;
|
|
44
|
+
let noLabels: PropTypes.Requireable<boolean>;
|
|
45
|
+
let reset: PropTypes.Requireable<number>;
|
|
46
|
+
let t: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as v, Fragment as w, jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import { useReducer as A, useEffect as B } from "react";
|
|
4
|
+
import r from "../../node_modules/prop-types/index.js";
|
|
5
|
+
import { useThree as G, useFrame as H } from "@react-three/fiber";
|
|
6
|
+
import I from "./Orbital.js";
|
|
7
|
+
import J from "./PotentialOrbits.js";
|
|
8
|
+
import { getRefObjProps as K } from "./orbitalUtilities.js";
|
|
9
|
+
function L({
|
|
10
|
+
neos: f,
|
|
11
|
+
activeNeo: P,
|
|
12
|
+
activeObs: x,
|
|
13
|
+
selectionCallback: p,
|
|
14
|
+
activeVelocityCallback: j,
|
|
15
|
+
playing: a,
|
|
16
|
+
dayPerVizSec: n,
|
|
17
|
+
stepDirection: e,
|
|
18
|
+
frameOverride: i,
|
|
19
|
+
defaultZoom: c,
|
|
20
|
+
potentialOrbits: C,
|
|
21
|
+
observations: M,
|
|
22
|
+
refObjs: T,
|
|
23
|
+
elapsedTime: g,
|
|
24
|
+
setElapsedTime: O,
|
|
25
|
+
noLabels: z,
|
|
26
|
+
reset: R,
|
|
27
|
+
zoomLevel: s,
|
|
28
|
+
setZoomLevel: F,
|
|
29
|
+
t: l
|
|
30
|
+
}) {
|
|
31
|
+
function _(o) {
|
|
32
|
+
const { remainingInits: t } = o;
|
|
33
|
+
return { remainingInits: t - 1 };
|
|
34
|
+
}
|
|
35
|
+
const { camera: h } = G(), [k, $] = A(_, {
|
|
36
|
+
remainingInits: f.length
|
|
37
|
+
});
|
|
38
|
+
function y() {
|
|
39
|
+
return (T || ["earth", "jupiter", "mars", "neptune"]).map(K).map((t) => {
|
|
40
|
+
const {
|
|
41
|
+
orbitColor: m,
|
|
42
|
+
objectColor: u,
|
|
43
|
+
objectRadius: b,
|
|
44
|
+
Ref: E,
|
|
45
|
+
Principal_desig: N,
|
|
46
|
+
name: q
|
|
47
|
+
} = t;
|
|
48
|
+
return /* @__PURE__ */ d(
|
|
49
|
+
I,
|
|
50
|
+
{
|
|
51
|
+
type: "planet",
|
|
52
|
+
data: t,
|
|
53
|
+
position: [0, 0, 0],
|
|
54
|
+
zoomMod: s,
|
|
55
|
+
defaultZoom: c,
|
|
56
|
+
playing: a,
|
|
57
|
+
stepDirection: e,
|
|
58
|
+
dayPerVizSec: n,
|
|
59
|
+
frameOverride: i,
|
|
60
|
+
selectionCallback: p,
|
|
61
|
+
orbitColor: m,
|
|
62
|
+
objectColor: u,
|
|
63
|
+
objectRadius: b,
|
|
64
|
+
reset: R,
|
|
65
|
+
t: l
|
|
66
|
+
},
|
|
67
|
+
`${E}-${N || q}`
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return H((o, t) => {
|
|
72
|
+
h.zoom !== s && F(h.zoom), a && O(g + e * t * n);
|
|
73
|
+
}), B(() => {
|
|
74
|
+
i && O(g + e * (1 / 60) * n);
|
|
75
|
+
}, [i]), /* @__PURE__ */ v(w, { children: [
|
|
76
|
+
y(),
|
|
77
|
+
C ? /* @__PURE__ */ d(
|
|
78
|
+
J,
|
|
79
|
+
{
|
|
80
|
+
data: f,
|
|
81
|
+
position: [0, 0, 0],
|
|
82
|
+
initialized: !0,
|
|
83
|
+
zoomMod: s,
|
|
84
|
+
defaultZoom: c,
|
|
85
|
+
playing: a,
|
|
86
|
+
stepDirection: e,
|
|
87
|
+
dayPerVizSec: n,
|
|
88
|
+
frameOverride: i,
|
|
89
|
+
selectionCallback: p,
|
|
90
|
+
activeVelocityCallback: j,
|
|
91
|
+
observations: M,
|
|
92
|
+
activeObs: x,
|
|
93
|
+
t: l,
|
|
94
|
+
initCallback: $
|
|
95
|
+
}
|
|
96
|
+
) : f.map((o, t) => {
|
|
97
|
+
const { Ref: m, Principal_desig: u, name: b } = o;
|
|
98
|
+
return /* @__PURE__ */ d(
|
|
99
|
+
I,
|
|
100
|
+
{
|
|
101
|
+
data: o,
|
|
102
|
+
position: [0, 0, 0],
|
|
103
|
+
active: o === P,
|
|
104
|
+
initialized: k.remainingInits <= 0,
|
|
105
|
+
zoomMod: s,
|
|
106
|
+
defaultZoom: c,
|
|
107
|
+
playing: a,
|
|
108
|
+
stepDirection: e,
|
|
109
|
+
dayPerVizSec: n,
|
|
110
|
+
frameOverride: i,
|
|
111
|
+
selectionCallback: p,
|
|
112
|
+
activeVelocityCallback: j,
|
|
113
|
+
noLabels: z,
|
|
114
|
+
reset: R,
|
|
115
|
+
t: l,
|
|
116
|
+
initCallback: $
|
|
117
|
+
},
|
|
118
|
+
m && (u || b) ? `${m}-${u || b}` : `orbit-${t}`
|
|
119
|
+
);
|
|
120
|
+
})
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
123
|
+
L.propTypes = {
|
|
124
|
+
neos: r.array,
|
|
125
|
+
activeNeo: r.object,
|
|
126
|
+
activeObs: r.object,
|
|
127
|
+
selectionCallback: r.func,
|
|
128
|
+
playing: r.bool,
|
|
129
|
+
dayPerVizSec: r.number,
|
|
130
|
+
stepDirection: r.number,
|
|
131
|
+
frameOverride: r.number,
|
|
132
|
+
activeVelocityCallback: r.func,
|
|
133
|
+
defaultZoom: r.number,
|
|
134
|
+
zoomLevel: r.number,
|
|
135
|
+
setZoomLevel: r.func,
|
|
136
|
+
potentialOrbits: r.bool,
|
|
137
|
+
observations: r.array,
|
|
138
|
+
refObjs: r.array,
|
|
139
|
+
elapsedTime: r.number,
|
|
140
|
+
setElapsedTime: r.func,
|
|
141
|
+
noLabels: r.bool,
|
|
142
|
+
reset: r.number,
|
|
143
|
+
t: r.func
|
|
144
|
+
};
|
|
145
|
+
export {
|
|
146
|
+
L as default
|
|
147
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),x=require("react"),m=require("../../node_modules/prop-types/index.cjs"),k=require("react-i18next"),N=require("@rubin-epo/epo-react-lib/HorizontalSlider"),a=require("./OrbitalSim.module.css.cjs"),g=s=>s&&s.__esModule?s:{default:s},q=g(N);function y({dayPerVizSec:s,elapsedTime:f,sliderOnChangeCallback:h,speeds:b}){const u=function(d,r){return Number.parseFloat(Number.parseFloat(d).toFixed(r))},{t}=k.useTranslation("widgets");function _(d){const r=d/365,i=Math.floor(r),c=365*(r-i);let l={},n={};return l={number:u(i),string:t("elapsed_time.interval.year",{count:i})},n={number:u(c),string:t("elapsed_time.interval.day",{count:c})},i>=1?`${l.number} ${l.string}`:c<1?t("orbit_viewer.playback.interval.secWithCount",{count:1}):`${n.number} ${n.string}`}function o(d,r){const i=f<0,c=Math.abs(f)/365.256,l=Math.floor(c),n=Math.floor(365.256*(c-l));let p={},v={};return p={number:u(i?-l:l),string:t("elapsed_time.interval.year",{count:l})},v={number:u(i?-n:n),string:t("elapsed_time.interval.day",{count:n})},d==="days"?v[r]:d==="years"?p[r]:null}const j=x.useMemo(()=>_(s),[s]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:a.default["playback-speed-slider-header"],children:[e.jsx("h4",{className:a.default["playback-speed-title"],children:t("orbital_sim.playback.time_step")}),e.jsx("div",{className:a.default["playback-speed-slider-label"],children:t("orbital_sim.playback.time_equivalence",{firstTime:t("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:j})})]}),e.jsx("div",{className:a.default["playback-speed-slider-label-top"],children:t("orbital_sim.playback.time_equivalence",{firstTime:t("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:t("orbit_viewer.playback.interval.yearWithCount",{count:1}),context:"verbose"})}),e.jsx("div",{className:a.default["playback-speed-slider-label-bottom"],children:t("orbital_sim.playback.normal_time")}),e.jsx(q.default,{className:a.default["playback-speed-slider"],isVertical:!0,min:b.min,invert:!0,max:b.max,step:b.step,value:s,onChangeCallback:h}),e.jsxs("div",{className:a.default["elapsed-time-container"],children:[e.jsx("div",{className:a.default["elapsed-time-title"],children:t("elapsed_time.title")}),e.jsxs("div",{className:a.default["elapsed-time-inner"],children:[e.jsxs("div",{className:a.default["elapsed-time-block"],children:[e.jsx("div",{className:a.default["elapsed-val"],children:o("years","number")}),e.jsx("div",{className:a.default["elapsed-time-label"],children:o("years","string")})]}),e.jsx("div",{className:a.default["elapsed-time-divider"]}),e.jsxs("div",{className:a.default["elapsed-time-block"],children:[e.jsx("div",{className:a.default["elapsed-val"],children:o("days","number")}),e.jsx("div",{className:a.default["elapsed-label"],children:o("days","string")})]})]})]})]})}y.propTypes={dayPerVizSec:m.default.number,elapsedTime:m.default.number,speeds:m.default.object,sliderOnChangeCallback:m.default.func};exports.default=y;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default PlaybackSpeed;
|
|
3
|
+
declare function PlaybackSpeed({ dayPerVizSec, elapsedTime, sliderOnChangeCallback, speeds, }: {
|
|
4
|
+
dayPerVizSec: any;
|
|
5
|
+
elapsedTime: any;
|
|
6
|
+
sliderOnChangeCallback: any;
|
|
7
|
+
speeds: any;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare namespace PlaybackSpeed {
|
|
10
|
+
namespace propTypes {
|
|
11
|
+
let dayPerVizSec: PropTypes.Requireable<number>;
|
|
12
|
+
let elapsedTime: PropTypes.Requireable<number>;
|
|
13
|
+
let speeds: PropTypes.Requireable<object>;
|
|
14
|
+
let sliderOnChangeCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as o, Fragment as _, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as g } from "react";
|
|
4
|
+
import p from "../../node_modules/prop-types/index.js";
|
|
5
|
+
import { useTranslation as C } from "react-i18next";
|
|
6
|
+
import j from "@rubin-epo/epo-react-lib/HorizontalSlider";
|
|
7
|
+
import e from "./OrbitalSim.module.css.js";
|
|
8
|
+
function x({
|
|
9
|
+
dayPerVizSec: u,
|
|
10
|
+
elapsedTime: v,
|
|
11
|
+
sliderOnChangeCallback: h,
|
|
12
|
+
speeds: b
|
|
13
|
+
}) {
|
|
14
|
+
const m = function(n, s) {
|
|
15
|
+
return Number.parseFloat(Number.parseFloat(n).toFixed(s));
|
|
16
|
+
}, { t: a } = C("widgets");
|
|
17
|
+
function k(n) {
|
|
18
|
+
const s = n / 365, i = Math.floor(s), c = 365 * (s - i);
|
|
19
|
+
let r = {}, l = {};
|
|
20
|
+
return r = {
|
|
21
|
+
number: m(i),
|
|
22
|
+
string: a("elapsed_time.interval.year", { count: i })
|
|
23
|
+
}, l = {
|
|
24
|
+
number: m(c),
|
|
25
|
+
string: a("elapsed_time.interval.day", { count: c })
|
|
26
|
+
}, i >= 1 ? `${r.number} ${r.string}` : c < 1 ? a("orbit_viewer.playback.interval.secWithCount", { count: 1 }) : `${l.number} ${l.string}`;
|
|
27
|
+
}
|
|
28
|
+
function d(n, s) {
|
|
29
|
+
const i = v < 0, c = Math.abs(v) / 365.256, r = Math.floor(c), l = Math.floor(365.256 * (c - r));
|
|
30
|
+
let y = {}, f = {};
|
|
31
|
+
return y = {
|
|
32
|
+
number: m(i ? -r : r),
|
|
33
|
+
string: a("elapsed_time.interval.year", { count: r })
|
|
34
|
+
}, f = {
|
|
35
|
+
number: m(i ? -l : l),
|
|
36
|
+
string: a("elapsed_time.interval.day", { count: l })
|
|
37
|
+
}, n === "days" ? f[s] : n === "years" ? y[s] : null;
|
|
38
|
+
}
|
|
39
|
+
const N = g(() => k(u), [u]);
|
|
40
|
+
return /* @__PURE__ */ o(_, { children: [
|
|
41
|
+
/* @__PURE__ */ o("div", { className: e["playback-speed-slider-header"], children: [
|
|
42
|
+
/* @__PURE__ */ t("h4", { className: e["playback-speed-title"], children: a("orbital_sim.playback.time_step") }),
|
|
43
|
+
/* @__PURE__ */ t("div", { className: e["playback-speed-slider-label"], children: a("orbital_sim.playback.time_equivalence", {
|
|
44
|
+
firstTime: a("orbit_viewer.playback.interval.secWithCount", {
|
|
45
|
+
count: 1
|
|
46
|
+
}),
|
|
47
|
+
secondTime: N
|
|
48
|
+
}) })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ t("div", { className: e["playback-speed-slider-label-top"], children: a("orbital_sim.playback.time_equivalence", {
|
|
51
|
+
firstTime: a("orbit_viewer.playback.interval.secWithCount", {
|
|
52
|
+
count: 1
|
|
53
|
+
}),
|
|
54
|
+
secondTime: a("orbit_viewer.playback.interval.yearWithCount", {
|
|
55
|
+
count: 1
|
|
56
|
+
}),
|
|
57
|
+
context: "verbose"
|
|
58
|
+
}) }),
|
|
59
|
+
/* @__PURE__ */ t("div", { className: e["playback-speed-slider-label-bottom"], children: a("orbital_sim.playback.normal_time") }),
|
|
60
|
+
/* @__PURE__ */ t(
|
|
61
|
+
j,
|
|
62
|
+
{
|
|
63
|
+
className: e["playback-speed-slider"],
|
|
64
|
+
isVertical: !0,
|
|
65
|
+
min: b.min,
|
|
66
|
+
invert: !0,
|
|
67
|
+
max: b.max,
|
|
68
|
+
step: b.step,
|
|
69
|
+
value: u,
|
|
70
|
+
onChangeCallback: h
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ o("div", { className: e["elapsed-time-container"], children: [
|
|
74
|
+
/* @__PURE__ */ t("div", { className: e["elapsed-time-title"], children: a("elapsed_time.title") }),
|
|
75
|
+
/* @__PURE__ */ o("div", { className: e["elapsed-time-inner"], children: [
|
|
76
|
+
/* @__PURE__ */ o("div", { className: e["elapsed-time-block"], children: [
|
|
77
|
+
/* @__PURE__ */ t("div", { className: e["elapsed-val"], children: d("years", "number") }),
|
|
78
|
+
/* @__PURE__ */ t("div", { className: e["elapsed-time-label"], children: d("years", "string") })
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ t("div", { className: e["elapsed-time-divider"] }),
|
|
81
|
+
/* @__PURE__ */ o("div", { className: e["elapsed-time-block"], children: [
|
|
82
|
+
/* @__PURE__ */ t("div", { className: e["elapsed-val"], children: d("days", "number") }),
|
|
83
|
+
/* @__PURE__ */ t("div", { className: e["elapsed-label"], children: d("days", "string") })
|
|
84
|
+
] })
|
|
85
|
+
] })
|
|
86
|
+
] })
|
|
87
|
+
] });
|
|
88
|
+
}
|
|
89
|
+
x.propTypes = {
|
|
90
|
+
dayPerVizSec: p.number,
|
|
91
|
+
elapsedTime: p.number,
|
|
92
|
+
speeds: p.object,
|
|
93
|
+
sliderOnChangeCallback: p.func
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
x as default
|
|
97
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),v=require("react"),p=require("../../node_modules/prop-types/index.cjs"),T=require("three"),_=require("./Observations.cjs"),f=require("./orbitalUtilities.cjs");function q(e){if(e&&e.__esModule)return e;const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const d=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(u,c,d.get?d:{enumerable:!0,get:()=>e[c]})}}return u.default=e,Object.freeze(u)}const b=q(T),y=({data:e,observations:u,activeObs:c,selectionCallback:d})=>{function h(r,t,n){const s=f.getFocus(r,t),i=new b.Vector3(s,0,0);return f.getCurve(r,t,i.x,i.y).getPoints(100).map(o=>f.convert2dTo3d(o,n)).flat()}function x(r){return r.map(t=>{const{a:n,e:s}=t,i=f.auToUnit(n),o=f.getMinorAxis(n,s);return h(i,o,t)})}const[j]=v.useState(()=>{let r=0;const t=[],n=[];x(e).forEach(o=>{const O=o.length-1;for(let a=0;a<o.length;a++){const g=o[a],m=a+r;n.push(g.x),n.push(g.y),n.push(g.z),t.push(m),t.push(a===O?r:m+1)}r+=o.length});const s=new b.BufferGeometry,i=new b.Float32BufferAttribute(n,3);return s.setAttribute("position",i),s.setIndex(t),s});return l.jsxs(l.Fragment,{children:[l.jsx("lineSegments",{position:[0,0,0],geometry:j,children:l.jsx("lineBasicMaterial",{attach:"material",color:"#CEB3DB"})}),u&&e&&l.jsx(_.default,{data:e[0],observations:u,selectionCallback:d,activeObs:c})]})};y.propTypes={data:p.default.array,observations:p.default.array,selectionCallback:p.default.func,activeObs:p.default.object};exports.default=y;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default PotentialOrbits;
|
|
3
|
+
declare function PotentialOrbits({ data, observations, activeObs, selectionCallback, }: {
|
|
4
|
+
data: any;
|
|
5
|
+
observations: any;
|
|
6
|
+
activeObs: any;
|
|
7
|
+
selectionCallback: any;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare namespace PotentialOrbits {
|
|
10
|
+
namespace propTypes {
|
|
11
|
+
let data: PropTypes.Requireable<any[]>;
|
|
12
|
+
let observations: PropTypes.Requireable<any[]>;
|
|
13
|
+
let selectionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
+
let activeObs: PropTypes.Requireable<object>;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as C, Fragment as v, jsx as f } from "react/jsx-runtime";
|
|
3
|
+
import { useState as B } from "react";
|
|
4
|
+
import c from "../../node_modules/prop-types/index.js";
|
|
5
|
+
import * as p from "three";
|
|
6
|
+
import T from "./Observations.js";
|
|
7
|
+
import { getCurve as E, convert2dTo3d as I, getFocus as P, auToUnit as j, getMinorAxis as w } from "./orbitalUtilities.js";
|
|
8
|
+
const A = ({
|
|
9
|
+
data: a,
|
|
10
|
+
observations: l,
|
|
11
|
+
activeObs: g,
|
|
12
|
+
selectionCallback: h
|
|
13
|
+
}) => {
|
|
14
|
+
function y(o, t, e) {
|
|
15
|
+
const n = P(o, t), s = new p.Vector3(n, 0, 0);
|
|
16
|
+
return E(o, t, s.x, s.y).getPoints(100).map((r) => I(r, e)).flat();
|
|
17
|
+
}
|
|
18
|
+
function x(o) {
|
|
19
|
+
return o.map((t) => {
|
|
20
|
+
const { a: e, e: n } = t, s = j(e), r = w(e, n);
|
|
21
|
+
return y(s, r, t);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
const [b] = B(() => {
|
|
25
|
+
let o = 0;
|
|
26
|
+
const t = [], e = [];
|
|
27
|
+
x(a).forEach((r) => {
|
|
28
|
+
const d = r.length - 1;
|
|
29
|
+
for (let i = 0; i < r.length; i++) {
|
|
30
|
+
const u = r[i], m = i + o;
|
|
31
|
+
e.push(u.x), e.push(u.y), e.push(u.z), t.push(m), t.push(i === d ? o : m + 1);
|
|
32
|
+
}
|
|
33
|
+
o += r.length;
|
|
34
|
+
});
|
|
35
|
+
const n = new p.BufferGeometry(), s = new p.Float32BufferAttribute(e, 3);
|
|
36
|
+
return n.setAttribute("position", s), n.setIndex(t), n;
|
|
37
|
+
});
|
|
38
|
+
return /* @__PURE__ */ C(v, { children: [
|
|
39
|
+
/* @__PURE__ */ f("lineSegments", { position: [0, 0, 0], geometry: b, children: /* @__PURE__ */ f("lineBasicMaterial", { attach: "material", color: "#CEB3DB" }) }),
|
|
40
|
+
l && a && /* @__PURE__ */ f(
|
|
41
|
+
T,
|
|
42
|
+
{
|
|
43
|
+
data: a[0],
|
|
44
|
+
observations: l,
|
|
45
|
+
selectionCallback: h,
|
|
46
|
+
activeObs: g
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] });
|
|
50
|
+
};
|
|
51
|
+
A.propTypes = {
|
|
52
|
+
data: c.array,
|
|
53
|
+
observations: c.array,
|
|
54
|
+
selectionCallback: c.func,
|
|
55
|
+
activeObs: c.object
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
A as default
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),t=require("../../node_modules/prop-types/index.cjs"),a=require("@react-three/drei"),r=require("./orbitalUtilities.cjs"),u=require("./OrbitalSim.module.css.cjs");function i({defaultZoom:o,zoomLevel:s,t:l}){return e.jsxs("mesh",{position:[0,0,0],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[9,16,8]}),e.jsx("meshBasicMaterial",{attach:"material",color:r.ORBITAL_COLORS.sun.objectColor}),e.jsx(a.Html,{children:e.jsx("div",{className:u.default.label,style:{fontSize:r.getLabelSize(s,o)},children:l("orbital_sim.astronomy.orbital_bodies.sun")})})]})}i.propTypes={zoomLevel:t.default.number,defaultZoom:t.default.number,t:t.default.func};exports.default=i;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
|
|
3
|
+
declare function Sun({ defaultZoom, zoomLevel, t }: any): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare namespace Sun {
|
|
5
|
+
var propTypes: {
|
|
6
|
+
zoomLevel: PropTypes.Requireable<number>;
|
|
7
|
+
defaultZoom: PropTypes.Requireable<number>;
|
|
8
|
+
t: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export default Sun;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import o from "../../node_modules/prop-types/index.js";
|
|
3
|
+
import { Html as i } from "@react-three/drei";
|
|
4
|
+
import { ORBITAL_COLORS as a, getLabelSize as l } from "./orbitalUtilities.js";
|
|
5
|
+
import n from "./OrbitalSim.module.css.js";
|
|
6
|
+
function p({ defaultZoom: r, zoomLevel: t, t: m }) {
|
|
7
|
+
return /* @__PURE__ */ s("mesh", { position: [0, 0, 0], children: [
|
|
8
|
+
/* @__PURE__ */ e("sphereGeometry", { attach: "geometry", args: [9, 16, 8] }),
|
|
9
|
+
/* @__PURE__ */ e(
|
|
10
|
+
"meshBasicMaterial",
|
|
11
|
+
{
|
|
12
|
+
attach: "material",
|
|
13
|
+
color: a.sun.objectColor
|
|
14
|
+
}
|
|
15
|
+
),
|
|
16
|
+
/* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: n.label,
|
|
20
|
+
style: {
|
|
21
|
+
fontSize: l(t, r)
|
|
22
|
+
},
|
|
23
|
+
children: m("orbital_sim.astronomy.orbital_bodies.sun")
|
|
24
|
+
}
|
|
25
|
+
) })
|
|
26
|
+
] });
|
|
27
|
+
}
|
|
28
|
+
p.propTypes = {
|
|
29
|
+
zoomLevel: o.number,
|
|
30
|
+
defaultZoom: o.number,
|
|
31
|
+
t: o.func
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
p as default
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={};exports.default=e;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
|
|
3
|
+
declare function OrbitalSim({ neos, activeNeo, activeObs, selectionCallback, paused, pov, defaultZoom, potentialOrbits, observations, noDetails, detailsSet, detailsRows, refObjs, noLabels, noControls }: any): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare namespace OrbitalSim {
|
|
5
|
+
var propTypes: {
|
|
6
|
+
neos: PropTypes.Requireable<any[]>;
|
|
7
|
+
activeNeo: PropTypes.Requireable<object>;
|
|
8
|
+
activeObs: PropTypes.Requireable<object>;
|
|
9
|
+
selectionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
+
paused: PropTypes.Requireable<boolean>;
|
|
11
|
+
pov: PropTypes.Requireable<string>;
|
|
12
|
+
defaultZoom: PropTypes.Requireable<number>;
|
|
13
|
+
potentialOrbits: PropTypes.Requireable<boolean>;
|
|
14
|
+
observations: PropTypes.Requireable<any[]>;
|
|
15
|
+
noDetails: PropTypes.Requireable<boolean>;
|
|
16
|
+
noLabels: PropTypes.Requireable<boolean>;
|
|
17
|
+
detailsSet: PropTypes.Requireable<string>;
|
|
18
|
+
detailsRows: PropTypes.Requireable<any[]>;
|
|
19
|
+
refObjs: PropTypes.Requireable<any[]>;
|
|
20
|
+
noControls: PropTypes.Requireable<boolean>;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export default OrbitalSim;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("three");function d(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=d(g),a=100,f=1,n={sun:{objectColor:"#f8da86"},mercury:{objectColor:"#dce0e3",orbitColor:"#a6a9ab"},venus:{objectColor:"#cd84ec",orbitColor:"#9c65b4"},earth:{objectColor:"#3f9ef0",orbitColor:"#3079b8"},mars:{objectColor:"#ed4c4c",orbitColor:"#b53a3a"},jupiter:{objectColor:"#f1b571",orbitColor:"#b98b57"},neptune:{objectColor:"#3cae3f",orbitColor:"#29762b"},asteroid:{objectColor:"#b1f2ef",orbitColor:"#6a6e6e",objectHighlight:"#00ffff",orbitHighlight:"#ffffff"}},C={a:1,e:.01671022,i:0,H:-3.9,Ref:"Earth",Principal_desig:"Earth",Translated_desig_key:"planets.earth",orbitColor:n.earth.orbitColor,objectColor:n.earth.objectColor,objectRadius:5},p={a:1.52366231,e:.09341233,i:1.85061,H:-1.52,Ref:"Mars",Principal_desig:"Mars",Translated_desig_key:"planets.mars",orbitColor:n.mars.orbitColor,objectColor:n.mars.objectColor,objectRadius:4},j={a:5.2028,e:.048,i:1.31,H:-25.9,Ref:"Jupiter",Principal_desig:"Jupiter",Translated_desig_key:"planets.jupiter",orbitColor:n.jupiter.orbitColor,objectColor:n.jupiter.objectColor,objectRadius:7},_={a:30.06896348,e:.00858587,i:1.76917,H:-25.9,Ref:"Neptune",Principal_desig:"Neptune",Translated_desig_key:"planets.neptune",orbitColor:n.neptune.orbitColor,objectColor:n.neptune.objectColor,objectRadius:6},m=e=>({neptune:_,earth:C,mars:p,jupiter:j})[e]||null,A=(e,t,o=0,r=0)=>new s.EllipseCurve(o,r,e,t,0,2*Math.PI,!1,0),R=e=>new s.BufferGeometry().setFromPoints(e),T=(e,t)=>{const o=e.distanceTo(t),{x:r,y:i}=e;return Math.acos((o**2+r**2-i**2)/(2*o*r))*180/Math.PI},y=(e,t)=>{const{x:o,y:r}=t.getPoint(e);return new s.Vector3(o,r,0)},b=e=>e*a,P=e=>e/a,h=(e,t)=>b(e*Math.sqrt(1-t**2)),S=e=>1496e8*e,c=e=>e*(Math.PI/180),O=(e,t)=>{const o=.000296005155*a**3;return Math.sqrt(o*(2/e-1/t))},M=(e,t)=>Math.sqrt(e**2-t**2),x=(e,t)=>{const{i:o,Peri:r,Node:i}=t,l=new s.Vector3(0,1,0),u=new s.Vector3(0,0,1);return new s.Vector3(e.x,e.y,0).applyAxisAngle(u,r?c(r+90):0).applyAxisAngle(l,c(o)).applyAxisAngle(u,i?c(i):0)},z=(e,t)=>{const i=15*(e/t);return i<=4?4:i>=15?15:i};exports.AU_TO_VIZ_SCALER=a;exports.DAY_PER_VIZ_SEC=f;exports.ORBITAL_COLORS=n;exports.auToMeters=S;exports.auToUnit=b;exports.convert2dTo3d=x;exports.degsToRads=c;exports.getAngleFromPos=T;exports.getCurve=A;exports.getFocus=M;exports.getLabelSize=z;exports.getLineGeometry=R;exports.getMinorAxis=h;exports.getPosFromArcLength=y;exports.getRefObjProps=m;exports.getVelocity=O;exports.unitToAu=P;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export const AU_TO_VIZ_SCALER: 100;
|
|
2
|
+
export const DAY_PER_VIZ_SEC: 1;
|
|
3
|
+
export namespace ORBITAL_COLORS {
|
|
4
|
+
namespace sun {
|
|
5
|
+
let objectColor: string;
|
|
6
|
+
}
|
|
7
|
+
namespace mercury {
|
|
8
|
+
let objectColor_1: string;
|
|
9
|
+
export { objectColor_1 as objectColor };
|
|
10
|
+
export let orbitColor: string;
|
|
11
|
+
}
|
|
12
|
+
namespace venus {
|
|
13
|
+
let objectColor_2: string;
|
|
14
|
+
export { objectColor_2 as objectColor };
|
|
15
|
+
let orbitColor_1: string;
|
|
16
|
+
export { orbitColor_1 as orbitColor };
|
|
17
|
+
}
|
|
18
|
+
namespace earth {
|
|
19
|
+
let objectColor_3: string;
|
|
20
|
+
export { objectColor_3 as objectColor };
|
|
21
|
+
let orbitColor_2: string;
|
|
22
|
+
export { orbitColor_2 as orbitColor };
|
|
23
|
+
}
|
|
24
|
+
namespace mars {
|
|
25
|
+
let objectColor_4: string;
|
|
26
|
+
export { objectColor_4 as objectColor };
|
|
27
|
+
let orbitColor_3: string;
|
|
28
|
+
export { orbitColor_3 as orbitColor };
|
|
29
|
+
}
|
|
30
|
+
namespace jupiter {
|
|
31
|
+
let objectColor_5: string;
|
|
32
|
+
export { objectColor_5 as objectColor };
|
|
33
|
+
let orbitColor_4: string;
|
|
34
|
+
export { orbitColor_4 as orbitColor };
|
|
35
|
+
}
|
|
36
|
+
namespace neptune {
|
|
37
|
+
let objectColor_6: string;
|
|
38
|
+
export { objectColor_6 as objectColor };
|
|
39
|
+
let orbitColor_5: string;
|
|
40
|
+
export { orbitColor_5 as orbitColor };
|
|
41
|
+
}
|
|
42
|
+
namespace asteroid {
|
|
43
|
+
let objectColor_7: string;
|
|
44
|
+
export { objectColor_7 as objectColor };
|
|
45
|
+
let orbitColor_6: string;
|
|
46
|
+
export { orbitColor_6 as orbitColor };
|
|
47
|
+
export let objectHighlight: string;
|
|
48
|
+
export let orbitHighlight: string;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export function getRefObjProps(id: any): any;
|
|
52
|
+
export function getCurve(xRadius: any, yRadius: any, aX?: number, aY?: number): THREE.EllipseCurve;
|
|
53
|
+
export function getLineGeometry(points: any): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>;
|
|
54
|
+
export function getAngleFromPos(pos: any, sunPos: any): number;
|
|
55
|
+
export function getPosFromArcLength(arcLength: any, path: any): THREE.Vector3;
|
|
56
|
+
export function auToUnit(value: any): number;
|
|
57
|
+
export function unitToAu(value: any): number;
|
|
58
|
+
export function getMinorAxis(a: any, e: any): number;
|
|
59
|
+
export function auToMeters(value: any): number;
|
|
60
|
+
export function metersToAu(value: any): number;
|
|
61
|
+
export function degsToRads(i: any): number;
|
|
62
|
+
export function radsToDegs(i: any): number;
|
|
63
|
+
export function getVelocity(radius: any, maj: any): number;
|
|
64
|
+
export function getFocus(majAxis: any, minAxis: any): number;
|
|
65
|
+
export function getDiameter(magnitude: any, albedo: any): number;
|
|
66
|
+
export function getRadius(magnitude: any): number;
|
|
67
|
+
export function convert2dTo3d(vector2D: any, orbitData: any): THREE.Vector3;
|
|
68
|
+
export function getLabelSize(zoomLevel: any, defaultZoom: any): number;
|
|
69
|
+
import * as THREE from 'three';
|