@rubin-epo/epo-widget-lib 2.0.2 → 2.0.4
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/dist/SortableTable.cjs +1 -0
- package/dist/SortableTable.d.ts +3 -0
- package/dist/SortableTable.js +5 -0
- package/dist/SourceSelector.cjs +1 -1
- package/dist/SourceSelector.js +6 -4
- package/dist/atomic/Blinker/Blinker.cjs +1 -1
- package/dist/atomic/Blinker/Blinker.d.ts +1 -0
- package/dist/atomic/Blinker/Blinker.js +27 -25
- package/dist/atomic/SelectionList/index.cjs +1 -0
- package/dist/{widgets/SourceSelector → atomic}/SelectionList/index.d.ts +1 -1
- package/dist/atomic/SelectionList/index.js +31 -0
- package/dist/localeStrings/en/epo-widget-lib.json +12 -3
- package/dist/localeStrings/es/epo-widget-lib.json +8 -5
- package/dist/mock-data/OrbitalSim/index.d.ts +162 -0
- package/dist/widgets/OrbitalSim/Context/OrbitalSimContext.types.d.ts +57 -0
- package/dist/widgets/OrbitalSim/Context/index.cjs +1 -1
- package/dist/widgets/OrbitalSim/Context/index.d.ts +2 -38
- package/dist/widgets/OrbitalSim/Context/index.js +61 -39
- package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.cjs +1 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.js +53 -68
- package/dist/widgets/OrbitalSim/Controls/styles.cjs +38 -32
- package/dist/widgets/OrbitalSim/Controls/styles.d.ts +1 -0
- package/dist/widgets/OrbitalSim/Controls/styles.js +53 -46
- package/dist/widgets/OrbitalSim/Observations/Observation.cjs +1 -1
- package/dist/widgets/OrbitalSim/Observations/Observation.js +11 -10
- package/dist/widgets/OrbitalSim/Observations/styles.cjs +11 -0
- package/dist/widgets/OrbitalSim/Observations/styles.d.ts +1 -0
- package/dist/widgets/OrbitalSim/Observations/styles.js +16 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.cjs +1 -1
- package/dist/widgets/OrbitalSim/OrbitalSim.js +94 -77
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.cjs +1 -1
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.js +2 -4
- package/dist/widgets/OrbitalSim/Orbitals/Orbital.cjs +1 -1
- package/dist/widgets/OrbitalSim/Orbitals/Orbital.js +41 -41
- package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.cjs +1 -1
- package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.js +19 -17
- package/dist/widgets/OrbitalSim/Orbitals/Orbitals.cjs +1 -1
- package/dist/widgets/OrbitalSim/Orbitals/Orbitals.d.ts +2 -1
- package/dist/widgets/OrbitalSim/Orbitals/Orbitals.js +41 -40
- package/dist/widgets/OrbitalSim/Orbitals/styles.cjs +15 -8
- package/dist/widgets/OrbitalSim/Orbitals/styles.js +17 -10
- package/dist/widgets/OrbitalSim/Sun.cjs +1 -1
- package/dist/widgets/OrbitalSim/Sun.js +13 -14
- package/dist/widgets/OrbitalSim/orbitalUtilities.cjs +1 -1
- package/dist/widgets/OrbitalSim/orbitalUtilities.d.ts +65 -0
- package/dist/widgets/OrbitalSim/orbitalUtilities.js +100 -57
- package/dist/widgets/OrbitalSim/styles.cjs +47 -12
- package/dist/widgets/OrbitalSim/styles.d.ts +3 -0
- package/dist/widgets/OrbitalSim/styles.js +52 -14
- package/dist/widgets/SortableTable/SortableTable.cjs +1 -0
- package/dist/widgets/SortableTable/SortableTable.d.ts +19 -0
- package/dist/widgets/SortableTable/SortableTable.js +41 -0
- package/dist/widgets/SortableTable/index.d.ts +1 -0
- package/dist/widgets/SortableTable/styles.cjs +8 -0
- package/dist/widgets/SortableTable/styles.d.ts +1 -0
- package/dist/widgets/SortableTable/styles.js +13 -0
- package/dist/widgets/SourceSelector/MovingSourceMap/index.cjs +1 -0
- package/dist/widgets/SourceSelector/MovingSourceMap/index.d.ts +13 -0
- package/dist/widgets/SourceSelector/MovingSourceMap/index.js +42 -0
- package/dist/widgets/SourceSelector/MovingSourceMap/styles.cjs +14 -0
- package/dist/widgets/SourceSelector/MovingSourceMap/styles.d.ts +2 -0
- package/dist/widgets/SourceSelector/MovingSourceMap/styles.js +20 -0
- package/dist/widgets/SourceSelector/MovingSourceSelector.cjs +1 -0
- package/dist/widgets/SourceSelector/MovingSourceSelector.d.ts +24 -0
- package/dist/widgets/SourceSelector/MovingSourceSelector.js +119 -0
- package/dist/widgets/SourceSelector/SourceSelector.cjs +1 -1
- package/dist/widgets/SourceSelector/SourceSelector.d.ts +1 -1
- package/dist/widgets/SourceSelector/SourceSelector.js +43 -42
- package/dist/widgets/SourceSelector/index.d.ts +2 -1
- package/dist/widgets/SourceSelector/mocks/index.d.ts +1 -0
- package/package.json +2 -1
- package/dist/widgets/OrbitalSim/Context/OrbitalSimContext.d.ts +0 -0
- package/dist/widgets/SourceSelector/SelectionList/index.cjs +0 -1
- package/dist/widgets/SourceSelector/SelectionList/index.js +0 -31
- /package/dist/{widgets/SourceSelector → atomic}/SelectionList/styles.cjs +0 -0
- /package/dist/{widgets/SourceSelector → atomic}/SelectionList/styles.d.ts +0 -0
- /package/dist/{widgets/SourceSelector → atomic}/SelectionList/styles.js +0 -0
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useReducer as
|
|
2
|
+
import { jsxs as A, Fragment as F, jsx as f } from "react/jsx-runtime";
|
|
3
|
+
import { useReducer as _, useEffect as E } from "react";
|
|
4
4
|
import t from "../../../node_modules/prop-types/index.js";
|
|
5
5
|
import { useThree as N, useFrame as q } from "@react-three/fiber";
|
|
6
|
-
import
|
|
6
|
+
import R from "./Orbital.js";
|
|
7
7
|
import w from "./PotentialOrbits.js";
|
|
8
8
|
import { getRefObjProps as B } from "../orbitalUtilities.js";
|
|
9
|
-
|
|
10
|
-
function H({
|
|
9
|
+
function G({
|
|
11
10
|
playing: a,
|
|
12
11
|
dayPerVizSec: n,
|
|
13
|
-
stepDirection:
|
|
12
|
+
stepDirection: i,
|
|
14
13
|
frameOverride: s,
|
|
15
14
|
defaultZoom: c,
|
|
16
|
-
potentialOrbits:
|
|
15
|
+
potentialOrbits: h,
|
|
17
16
|
elapsedTime: l,
|
|
18
17
|
setElapsedTime: d,
|
|
19
18
|
reset: j,
|
|
20
19
|
zoomLevel: m,
|
|
21
|
-
setZoomLevel:
|
|
20
|
+
setZoomLevel: C,
|
|
21
|
+
orbits: $
|
|
22
22
|
}) {
|
|
23
|
-
const {
|
|
24
|
-
neos:
|
|
25
|
-
refObjs:
|
|
26
|
-
activeNeo:
|
|
23
|
+
const {
|
|
24
|
+
neos: e,
|
|
25
|
+
refObjs: I,
|
|
26
|
+
activeNeo: P
|
|
27
27
|
} = $;
|
|
28
|
-
function
|
|
28
|
+
function k(o) {
|
|
29
29
|
const { remainingInits: r } = o;
|
|
30
30
|
return { remainingInits: r - 1 };
|
|
31
31
|
}
|
|
32
|
-
const { camera: g } = N(), [
|
|
33
|
-
remainingInits:
|
|
32
|
+
const { camera: g } = N(), [x, O] = _(k, {
|
|
33
|
+
remainingInits: e && Array.isArray(e) ? e.length : 0
|
|
34
34
|
});
|
|
35
35
|
function M() {
|
|
36
|
-
return (
|
|
36
|
+
return (I || ["earth", "jupiter", "mars", "neptune"]).map(B).map((r) => {
|
|
37
37
|
const {
|
|
38
38
|
orbitColor: u,
|
|
39
|
-
objectColor:
|
|
40
|
-
objectRadius:
|
|
39
|
+
objectColor: p,
|
|
40
|
+
objectRadius: b,
|
|
41
41
|
Ref: T,
|
|
42
|
-
Principal_desig:
|
|
43
|
-
name:
|
|
42
|
+
Principal_desig: y,
|
|
43
|
+
name: z
|
|
44
44
|
} = r;
|
|
45
45
|
return /* @__PURE__ */ f(
|
|
46
|
-
|
|
46
|
+
R,
|
|
47
47
|
{
|
|
48
48
|
type: "planet",
|
|
49
49
|
data: r,
|
|
@@ -51,62 +51,63 @@ function H({
|
|
|
51
51
|
zoomMod: m,
|
|
52
52
|
defaultZoom: c,
|
|
53
53
|
playing: a,
|
|
54
|
-
stepDirection:
|
|
54
|
+
stepDirection: i,
|
|
55
55
|
dayPerVizSec: n,
|
|
56
56
|
frameOverride: s,
|
|
57
57
|
orbitColor: u,
|
|
58
|
-
objectColor:
|
|
59
|
-
objectRadius:
|
|
58
|
+
objectColor: p,
|
|
59
|
+
objectRadius: b,
|
|
60
60
|
reset: j
|
|
61
61
|
},
|
|
62
|
-
`${T}-${
|
|
62
|
+
`${T}-${y || z}`
|
|
63
63
|
);
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
return q((o, r) => {
|
|
67
|
-
g.zoom !== m &&
|
|
67
|
+
g.zoom !== m && C(g.zoom), a && d(l + i * r * n);
|
|
68
68
|
}), E(() => {
|
|
69
|
-
s && d(l +
|
|
70
|
-
}, [s]), /* @__PURE__ */ F
|
|
69
|
+
s && d(l + i * (1 / 60) * n);
|
|
70
|
+
}, [s]), /* @__PURE__ */ A(F, { children: [
|
|
71
71
|
M(),
|
|
72
|
-
|
|
72
|
+
h ? /* @__PURE__ */ f(
|
|
73
73
|
w,
|
|
74
74
|
{
|
|
75
|
-
data:
|
|
75
|
+
data: e,
|
|
76
76
|
position: [0, 0, 0],
|
|
77
77
|
initialized: !0,
|
|
78
78
|
zoomMod: m,
|
|
79
79
|
defaultZoom: c,
|
|
80
80
|
playing: a,
|
|
81
|
-
stepDirection:
|
|
81
|
+
stepDirection: i,
|
|
82
82
|
dayPerVizSec: n,
|
|
83
83
|
frameOverride: s,
|
|
84
84
|
initCallback: O
|
|
85
85
|
}
|
|
86
|
-
) :
|
|
87
|
-
const { Ref: u, Principal_desig:
|
|
86
|
+
) : e ? e.map((o, r) => {
|
|
87
|
+
const { Ref: u, Principal_desig: p, name: b } = o;
|
|
88
88
|
return /* @__PURE__ */ f(
|
|
89
|
-
|
|
89
|
+
R,
|
|
90
90
|
{
|
|
91
|
+
type: "neo",
|
|
91
92
|
data: o,
|
|
92
93
|
position: [0, 0, 0],
|
|
93
|
-
active: o ===
|
|
94
|
-
initialized:
|
|
94
|
+
active: o === P,
|
|
95
|
+
initialized: x.remainingInits <= 0,
|
|
95
96
|
zoomMod: m,
|
|
96
97
|
defaultZoom: c,
|
|
97
98
|
playing: a,
|
|
98
|
-
stepDirection:
|
|
99
|
+
stepDirection: i,
|
|
99
100
|
dayPerVizSec: n,
|
|
100
101
|
frameOverride: s,
|
|
101
102
|
reset: j,
|
|
102
103
|
initCallback: O
|
|
103
104
|
},
|
|
104
|
-
u && (
|
|
105
|
+
u && (p || b) ? `${u}-${p || b}` : `orbit-${r}`
|
|
105
106
|
);
|
|
106
107
|
}) : null
|
|
107
108
|
] });
|
|
108
109
|
}
|
|
109
|
-
|
|
110
|
+
G.propTypes = {
|
|
110
111
|
playing: t.bool,
|
|
111
112
|
dayPerVizSec: t.number,
|
|
112
113
|
stepDirection: t.number,
|
|
@@ -121,5 +122,5 @@ H.propTypes = {
|
|
|
121
122
|
reset: t.number
|
|
122
123
|
};
|
|
123
124
|
export {
|
|
124
|
-
|
|
125
|
+
G as default
|
|
125
126
|
};
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),i=require("@rubin-epo/epo-react-lib/Button"),l=require("@rubin-epo/epo-react-lib/Slideout"),o=e=>e&&e.__esModule?e:{default:e},t=o(r),d=o(i),a=o(l),n=t.default(a.default)`
|
|
2
|
+
& > div:first-of-type {
|
|
3
|
+
display: none;
|
|
4
|
+
}
|
|
5
5
|
`,c=t.default.div`
|
|
6
6
|
padding: 2px 4px;
|
|
7
7
|
margin-top: 4px;
|
|
8
8
|
font-weight: var(--medium);
|
|
9
9
|
color: var(--black);
|
|
10
|
-
background-color: color-mix(in srgb, var(--white)
|
|
11
|
-
border: 1px solid color-mix(in srgb, var(--white)
|
|
10
|
+
background-color: color-mix(in srgb, var(--white) 75%, transparent);
|
|
11
|
+
border: 1px solid color-mix(in srgb, var(--white) 75%, transparent);;
|
|
12
12
|
border-radius: 5px;
|
|
13
13
|
color-adjust: exact;
|
|
14
|
-
|
|
14
|
+
z-index: 10000;
|
|
15
|
+
height: fit-content;
|
|
16
|
+
`,u=t.default(d.default)`
|
|
15
17
|
position: absolute;
|
|
16
18
|
top: 0;
|
|
17
19
|
left: 0;
|
|
@@ -33,9 +35,14 @@
|
|
|
33
35
|
& > * + * {
|
|
34
36
|
margin-block-start: 1em;
|
|
35
37
|
}
|
|
38
|
+
& > h3 {
|
|
39
|
+
margin: 0px;
|
|
40
|
+
text-align: center;
|
|
41
|
+
}
|
|
36
42
|
`,s=t.default.div`
|
|
37
43
|
display: flex;
|
|
38
|
-
gap:
|
|
44
|
+
gap: 10px;
|
|
45
|
+
margin: 0px;
|
|
39
46
|
`,x=t.default.div`
|
|
40
47
|
flex: 1;
|
|
41
48
|
padding: 0px 15px 0px 15px;
|
|
@@ -3,18 +3,20 @@ import o from "styled-components";
|
|
|
3
3
|
import r from "@rubin-epo/epo-react-lib/Button";
|
|
4
4
|
import t from "@rubin-epo/epo-react-lib/Slideout";
|
|
5
5
|
const a = o(t)`
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
& > div:first-of-type {
|
|
7
|
+
display: none;
|
|
8
|
+
}
|
|
9
9
|
`, d = o.div`
|
|
10
10
|
padding: 2px 4px;
|
|
11
11
|
margin-top: 4px;
|
|
12
12
|
font-weight: var(--medium);
|
|
13
13
|
color: var(--black);
|
|
14
|
-
background-color: color-mix(in srgb, var(--white)
|
|
15
|
-
border: 1px solid color-mix(in srgb, var(--white)
|
|
14
|
+
background-color: color-mix(in srgb, var(--white) 75%, transparent);
|
|
15
|
+
border: 1px solid color-mix(in srgb, var(--white) 75%, transparent);;
|
|
16
16
|
border-radius: 5px;
|
|
17
17
|
color-adjust: exact;
|
|
18
|
+
z-index: 10000;
|
|
19
|
+
height: fit-content;
|
|
18
20
|
`, l = o(r)`
|
|
19
21
|
position: absolute;
|
|
20
22
|
top: 0;
|
|
@@ -37,17 +39,22 @@ const a = o(t)`
|
|
|
37
39
|
& > * + * {
|
|
38
40
|
margin-block-start: 1em;
|
|
39
41
|
}
|
|
42
|
+
& > h3 {
|
|
43
|
+
margin: 0px;
|
|
44
|
+
text-align: center;
|
|
45
|
+
}
|
|
40
46
|
`, c = o.div`
|
|
41
47
|
display: flex;
|
|
42
|
-
gap:
|
|
43
|
-
|
|
48
|
+
gap: 10px;
|
|
49
|
+
margin: 0px;
|
|
50
|
+
`, x = o.div`
|
|
44
51
|
flex: 1;
|
|
45
52
|
padding: 0px 15px 0px 15px;
|
|
46
53
|
border: 1px solid #ccc;
|
|
47
54
|
background-color: #ccc;
|
|
48
55
|
border-radius: 15px;
|
|
49
56
|
font-weight: bold;
|
|
50
|
-
`,
|
|
57
|
+
`, s = o.div`
|
|
51
58
|
flex: 1;
|
|
52
59
|
padding: 0px 15px 0px 15px;
|
|
53
60
|
border: 1px solid #ccc;
|
|
@@ -58,8 +65,8 @@ const a = o(t)`
|
|
|
58
65
|
export {
|
|
59
66
|
l as ButtonWrapper,
|
|
60
67
|
d as Label,
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
x as SlideoutColLeft,
|
|
69
|
+
s as SlideoutColRight,
|
|
63
70
|
p as SlideoutPanel,
|
|
64
71
|
c as SlideoutRow,
|
|
65
72
|
a as SlideoutWrapper
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),o=require("@react-three/drei"),t=require("./orbitalUtilities.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),o=require("@react-three/drei"),t=require("./orbitalUtilities.cjs"),n=require("react-i18next"),l=require("./styles.cjs"),a=({defaultZoom:s,zoomLevel:r})=>{const{t:i}=n.useTranslation();return e.jsxs("mesh",{position:[0,0,0],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[9,16,8]}),e.jsx("meshBasicMaterial",{attach:"material",color:t.ORBITAL_COLORS.sun.objectColor}),e.jsx(o.Html,{children:e.jsx(l.SunLabel,{children:e.jsx("span",{style:{fontSize:t.getLabelSize(r,s)},children:i("orbital_sim.astronomy.orbital_bodies.sun")})})})]})};exports.default=a;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { Html as
|
|
4
|
-
import { ORBITAL_COLORS as a, getLabelSize as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import
|
|
7
|
-
const b = ({ defaultZoom:
|
|
8
|
-
const { t:
|
|
9
|
-
return /* @__PURE__ */
|
|
2
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { Html as s } from "@react-three/drei";
|
|
4
|
+
import { ORBITAL_COLORS as a, getLabelSize as m } from "./orbitalUtilities.js";
|
|
5
|
+
import { useTranslation as n } from "react-i18next";
|
|
6
|
+
import { SunLabel as l } from "./styles.js";
|
|
7
|
+
const b = ({ defaultZoom: o, zoomLevel: r }) => {
|
|
8
|
+
const { t: e } = n();
|
|
9
|
+
return /* @__PURE__ */ i("mesh", { position: [0, 0, 0], children: [
|
|
10
10
|
/* @__PURE__ */ t("sphereGeometry", { attach: "geometry", args: [9, 16, 8] }),
|
|
11
11
|
/* @__PURE__ */ t(
|
|
12
12
|
"meshBasicMaterial",
|
|
@@ -15,16 +15,15 @@ const b = ({ defaultZoom: e, zoomLevel: o }) => {
|
|
|
15
15
|
color: a.sun.objectColor
|
|
16
16
|
}
|
|
17
17
|
),
|
|
18
|
-
/* @__PURE__ */ t(
|
|
19
|
-
"
|
|
18
|
+
/* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(
|
|
19
|
+
"span",
|
|
20
20
|
{
|
|
21
|
-
className: n.label,
|
|
22
21
|
style: {
|
|
23
|
-
fontSize:
|
|
22
|
+
fontSize: m(r, o)
|
|
24
23
|
},
|
|
25
|
-
children:
|
|
24
|
+
children: e("orbital_sim.astronomy.orbital_bodies.sun")
|
|
26
25
|
}
|
|
27
|
-
) })
|
|
26
|
+
) }) })
|
|
28
27
|
] });
|
|
29
28
|
};
|
|
30
29
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("three");function p(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const s=p(C),c=100,j=1,r={sun:{objectColor:"#f8da86"},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"},neos:{objectColor:"#0ff",orbitColor:"#b2ffff"}},b={a:1.4700451,e:.5598234,i:6.35515,H:16.25,Ref:"Apollo",name:"Apollo",Principal_desig:"1932 HA",Translated_desig_key:"neo.apollo",orbitColor:r.neos.orbitColor,objectColor:r.neos.objectColor,objectRadius:5},d={a:.740919,e:.3221221,i:25.62023,H:16.3,Ref:"Atira",Principal_desig:"2003 CP20",Translated_desig_key:"neo.atira",orbitColor:r.neos.orbitColor,objectColor:r.neos.objectColor,objectRadius:5},g={a:1.9194158,e:.4353207,i:11.87658,H:17.7,Ref:"Amor",Principal_desig:"1932 EA1",Translated_desig_key:"neo.amor",orbitColor:r.neos.orbitColor,objectColor:r.neos.objectColor,objectRadius:5},_={a:1,e:.01671022,i:0,H:-3.9,Ref:"Earth",Principal_desig:"Earth",Translated_desig_key:"planets.earth",orbitColor:r.earth.orbitColor,objectColor:r.earth.objectColor,objectRadius:5},m={a:1.52366231,e:.09341233,i:1.85061,H:-1.52,Ref:"Mars",Principal_desig:"Mars",Translated_desig_key:"planets.mars",orbitColor:r.mars.orbitColor,objectColor:r.mars.objectColor,objectRadius:4},A={a:5.2028,e:.048,i:1.31,H:-25.9,Ref:"Jupiter",Principal_desig:"Jupiter",Translated_desig_key:"planets.jupiter",orbitColor:r.jupiter.orbitColor,objectColor:r.jupiter.objectColor,objectRadius:7},R={a:30.06896348,e:.00858587,i:1.76917,H:-25.9,Ref:"Neptune",Principal_desig:"Neptune",Translated_desig_key:"planets.neptune",orbitColor:r.neptune.orbitColor,objectColor:r.neptune.objectColor,objectRadius:6},T=e=>({neptune:R,earth:_,mars:m,jupiter:A,atira:d,apollo:b,amor:g})[e]||null,P=function(e,o){return Number.parseFloat(Number.parseFloat(e).toFixed(o))},y=(e,o,t=0,n=0)=>new s.EllipseCurve(t,n,e,o,0,2*Math.PI,!1,0),h=e=>new s.BufferGeometry().setFromPoints(e),S=(e,o)=>{const t=e.distanceTo(o),{x:n,y:i}=e;return Math.acos((t**2+n**2-i**2)/(2*t*n))*180/Math.PI},O=(e,o)=>{const{x:t,y:n}=o.getPoint(e);return new s.Vector3(t,n,0)},f=e=>e*c,M=e=>e/c,x=(e,o)=>f(e*Math.sqrt(1-o**2)),E=e=>1496e8*e,a=e=>e*(Math.PI/180),z=(e,o)=>{const t=.000296005155*c**3;return Math.sqrt(t*(2/e-1/o))},L=(e,o)=>Math.sqrt(e**2-o**2),H=(e,o)=>{const{i:t,Peri:n,Node:i}=o,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,n?a(n+90):0).applyAxisAngle(l,a(t)).applyAxisAngle(u,i?a(i):0)},V=(e,o)=>{const i=15*(e/o);return i<=4?4:i>=15?15:i};exports.AU_TO_VIZ_SCALER=c;exports.DAY_PER_VIZ_SEC=j;exports.ORBITAL_COLORS=r;exports.amor=g;exports.apollo=b;exports.atira=d;exports.auToMeters=E;exports.auToUnit=f;exports.convert2dTo3d=H;exports.degsToRads=a;exports.formatValue=P;exports.getAngleFromPos=S;exports.getCurve=y;exports.getFocus=L;exports.getLabelSize=V;exports.getLineGeometry=h;exports.getMinorAxis=x;exports.getPosFromArcLength=O;exports.getRefObjProps=T;exports.getVelocity=z;exports.unitToAu=M;
|
|
@@ -47,6 +47,71 @@ export namespace ORBITAL_COLORS {
|
|
|
47
47
|
export let objectHighlight: string;
|
|
48
48
|
export let orbitHighlight: string;
|
|
49
49
|
}
|
|
50
|
+
namespace neos {
|
|
51
|
+
let objectColor_8: string;
|
|
52
|
+
export { objectColor_8 as objectColor };
|
|
53
|
+
let orbitColor_7: string;
|
|
54
|
+
export { orbitColor_7 as orbitColor };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export namespace apollo {
|
|
58
|
+
export let a: number;
|
|
59
|
+
export let e: number;
|
|
60
|
+
export let i: number;
|
|
61
|
+
export let H: number;
|
|
62
|
+
export let Ref: string;
|
|
63
|
+
export let name: string;
|
|
64
|
+
export let Principal_desig: string;
|
|
65
|
+
export let Translated_desig_key: string;
|
|
66
|
+
import orbitColor_8 = orbitColor;
|
|
67
|
+
export { orbitColor_8 as orbitColor };
|
|
68
|
+
import objectColor_9 = objectColor;
|
|
69
|
+
export { objectColor_9 as objectColor };
|
|
70
|
+
export let objectRadius: number;
|
|
71
|
+
}
|
|
72
|
+
export namespace atira {
|
|
73
|
+
let a_1: number;
|
|
74
|
+
export { a_1 as a };
|
|
75
|
+
let e_1: number;
|
|
76
|
+
export { e_1 as e };
|
|
77
|
+
let i_1: number;
|
|
78
|
+
export { i_1 as i };
|
|
79
|
+
let H_1: number;
|
|
80
|
+
export { H_1 as H };
|
|
81
|
+
let Ref_1: string;
|
|
82
|
+
export { Ref_1 as Ref };
|
|
83
|
+
let Principal_desig_1: string;
|
|
84
|
+
export { Principal_desig_1 as Principal_desig };
|
|
85
|
+
let Translated_desig_key_1: string;
|
|
86
|
+
export { Translated_desig_key_1 as Translated_desig_key };
|
|
87
|
+
import orbitColor_9 = orbitColor;
|
|
88
|
+
export { orbitColor_9 as orbitColor };
|
|
89
|
+
import objectColor_10 = objectColor;
|
|
90
|
+
export { objectColor_10 as objectColor };
|
|
91
|
+
let objectRadius_1: number;
|
|
92
|
+
export { objectRadius_1 as objectRadius };
|
|
93
|
+
}
|
|
94
|
+
export namespace amor {
|
|
95
|
+
let a_2: number;
|
|
96
|
+
export { a_2 as a };
|
|
97
|
+
let e_2: number;
|
|
98
|
+
export { e_2 as e };
|
|
99
|
+
let i_2: number;
|
|
100
|
+
export { i_2 as i };
|
|
101
|
+
let H_2: number;
|
|
102
|
+
export { H_2 as H };
|
|
103
|
+
let Ref_2: string;
|
|
104
|
+
export { Ref_2 as Ref };
|
|
105
|
+
let Principal_desig_2: string;
|
|
106
|
+
export { Principal_desig_2 as Principal_desig };
|
|
107
|
+
let Translated_desig_key_2: string;
|
|
108
|
+
export { Translated_desig_key_2 as Translated_desig_key };
|
|
109
|
+
import orbitColor_10 = orbitColor;
|
|
110
|
+
export { orbitColor_10 as orbitColor };
|
|
111
|
+
import objectColor_11 = objectColor;
|
|
112
|
+
export { objectColor_11 as objectColor };
|
|
113
|
+
let objectRadius_2: number;
|
|
114
|
+
export { objectRadius_2 as objectRadius };
|
|
50
115
|
}
|
|
51
116
|
export function getRefObjProps(id: any): any;
|
|
52
117
|
export function formatValue(number: any, decimalPlaces: any): number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
const
|
|
1
|
+
import * as s from "three";
|
|
2
|
+
const l = 100, m = 1, t = {
|
|
3
3
|
sun: {
|
|
4
4
|
objectColor: "#f8da86"
|
|
5
5
|
},
|
|
@@ -24,8 +24,46 @@ const c = 100, g = 1, s = {
|
|
|
24
24
|
orbitColor: "#6a6e6e",
|
|
25
25
|
objectHighlight: "#00ffff",
|
|
26
26
|
orbitHighlight: "#ffffff"
|
|
27
|
+
},
|
|
28
|
+
neos: {
|
|
29
|
+
objectColor: "#0ff",
|
|
30
|
+
orbitColor: "#b2ffff"
|
|
27
31
|
}
|
|
28
|
-
},
|
|
32
|
+
}, u = {
|
|
33
|
+
a: 1.4700451,
|
|
34
|
+
e: 0.5598234,
|
|
35
|
+
i: 6.35515,
|
|
36
|
+
H: 16.25,
|
|
37
|
+
Ref: "Apollo",
|
|
38
|
+
name: "Apollo",
|
|
39
|
+
Principal_desig: "1932 HA",
|
|
40
|
+
Translated_desig_key: "neo.apollo",
|
|
41
|
+
orbitColor: t.neos.orbitColor,
|
|
42
|
+
objectColor: t.neos.objectColor,
|
|
43
|
+
objectRadius: 5
|
|
44
|
+
}, C = {
|
|
45
|
+
a: 0.740919,
|
|
46
|
+
e: 0.3221221,
|
|
47
|
+
i: 25.62023,
|
|
48
|
+
H: 16.3,
|
|
49
|
+
Ref: "Atira",
|
|
50
|
+
Principal_desig: "2003 CP20",
|
|
51
|
+
Translated_desig_key: "neo.atira",
|
|
52
|
+
orbitColor: t.neos.orbitColor,
|
|
53
|
+
objectColor: t.neos.objectColor,
|
|
54
|
+
objectRadius: 5
|
|
55
|
+
}, d = {
|
|
56
|
+
a: 1.9194158,
|
|
57
|
+
e: 0.4353207,
|
|
58
|
+
i: 11.87658,
|
|
59
|
+
H: 17.7,
|
|
60
|
+
Ref: "Amor",
|
|
61
|
+
Principal_desig: "1932 EA1",
|
|
62
|
+
Translated_desig_key: "neo.amor",
|
|
63
|
+
orbitColor: t.neos.orbitColor,
|
|
64
|
+
objectColor: t.neos.objectColor,
|
|
65
|
+
objectRadius: 5
|
|
66
|
+
}, f = {
|
|
29
67
|
a: 1,
|
|
30
68
|
e: 0.01671022,
|
|
31
69
|
i: 0,
|
|
@@ -33,9 +71,8 @@ const c = 100, g = 1, s = {
|
|
|
33
71
|
Ref: "Earth",
|
|
34
72
|
Principal_desig: "Earth",
|
|
35
73
|
Translated_desig_key: "planets.earth",
|
|
36
|
-
orbitColor:
|
|
37
|
-
objectColor:
|
|
38
|
-
// objectRadius: 6371000,
|
|
74
|
+
orbitColor: t.earth.orbitColor,
|
|
75
|
+
objectColor: t.earth.objectColor,
|
|
39
76
|
objectRadius: 5
|
|
40
77
|
}, p = {
|
|
41
78
|
a: 1.52366231,
|
|
@@ -45,10 +82,10 @@ const c = 100, g = 1, s = {
|
|
|
45
82
|
Ref: "Mars",
|
|
46
83
|
Principal_desig: "Mars",
|
|
47
84
|
Translated_desig_key: "planets.mars",
|
|
48
|
-
orbitColor:
|
|
49
|
-
objectColor:
|
|
85
|
+
orbitColor: t.mars.orbitColor,
|
|
86
|
+
objectColor: t.mars.objectColor,
|
|
50
87
|
objectRadius: 4
|
|
51
|
-
},
|
|
88
|
+
}, g = {
|
|
52
89
|
a: 5.2028,
|
|
53
90
|
e: 0.048,
|
|
54
91
|
i: 1.31,
|
|
@@ -56,11 +93,11 @@ const c = 100, g = 1, s = {
|
|
|
56
93
|
Ref: "Jupiter",
|
|
57
94
|
Principal_desig: "Jupiter",
|
|
58
95
|
Translated_desig_key: "planets.jupiter",
|
|
59
|
-
orbitColor:
|
|
60
|
-
objectColor:
|
|
96
|
+
orbitColor: t.jupiter.orbitColor,
|
|
97
|
+
objectColor: t.jupiter.objectColor,
|
|
61
98
|
// objectRadius: 69911000,
|
|
62
99
|
objectRadius: 7
|
|
63
|
-
},
|
|
100
|
+
}, j = {
|
|
64
101
|
a: 30.06896348,
|
|
65
102
|
e: 858587e-8,
|
|
66
103
|
i: 1.76917,
|
|
@@ -68,25 +105,28 @@ const c = 100, g = 1, s = {
|
|
|
68
105
|
Ref: "Neptune",
|
|
69
106
|
Principal_desig: "Neptune",
|
|
70
107
|
Translated_desig_key: "planets.neptune",
|
|
71
|
-
orbitColor:
|
|
72
|
-
objectColor:
|
|
108
|
+
orbitColor: t.neptune.orbitColor,
|
|
109
|
+
objectColor: t.neptune.objectColor,
|
|
73
110
|
// objectRadius: 24622000,
|
|
74
111
|
objectRadius: 6
|
|
75
|
-
},
|
|
76
|
-
neptune:
|
|
77
|
-
earth:
|
|
112
|
+
}, R = (o) => ({
|
|
113
|
+
neptune: j,
|
|
114
|
+
earth: f,
|
|
78
115
|
mars: p,
|
|
79
|
-
jupiter:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
116
|
+
jupiter: g,
|
|
117
|
+
atira: C,
|
|
118
|
+
apollo: u,
|
|
119
|
+
amor: d
|
|
120
|
+
})[o] || null, A = function(o, e) {
|
|
121
|
+
return Number.parseFloat(Number.parseFloat(o).toFixed(e));
|
|
122
|
+
}, h = (o, e, r = 0, n = 0) => new s.EllipseCurve(
|
|
85
123
|
r,
|
|
124
|
+
// aX
|
|
125
|
+
n,
|
|
86
126
|
// aY
|
|
87
|
-
|
|
127
|
+
o,
|
|
88
128
|
// xRadius
|
|
89
|
-
|
|
129
|
+
e,
|
|
90
130
|
// yRadius
|
|
91
131
|
0,
|
|
92
132
|
// aStartAngle
|
|
@@ -96,42 +136,45 @@ const c = 100, g = 1, s = {
|
|
|
96
136
|
// aClockwise
|
|
97
137
|
0
|
|
98
138
|
// aRotation
|
|
99
|
-
),
|
|
100
|
-
const
|
|
101
|
-
return Math.acos((
|
|
102
|
-
},
|
|
103
|
-
const { x:
|
|
104
|
-
return new
|
|
105
|
-
},
|
|
106
|
-
const
|
|
107
|
-
return Math.sqrt(
|
|
108
|
-
},
|
|
109
|
-
const { i:
|
|
110
|
-
return new
|
|
111
|
-
|
|
112
|
-
|
|
139
|
+
), P = (o) => new s.BufferGeometry().setFromPoints(o), y = (o, e) => {
|
|
140
|
+
const r = o.distanceTo(e), { x: n, y: i } = o;
|
|
141
|
+
return Math.acos((r ** 2 + n ** 2 - i ** 2) / (2 * r * n)) * 180 / Math.PI;
|
|
142
|
+
}, T = (o, e) => {
|
|
143
|
+
const { x: r, y: n } = e.getPoint(o);
|
|
144
|
+
return new s.Vector3(r, n, 0);
|
|
145
|
+
}, _ = (o) => o * l, x = (o) => o / l, M = (o, e) => _(o * Math.sqrt(1 - e ** 2)), S = (o) => 1496e8 * o, a = (o) => o * (Math.PI / 180), z = (o, e) => {
|
|
146
|
+
const r = 296005155e-12 * l ** 3;
|
|
147
|
+
return Math.sqrt(r * (2 / o - 1 / e));
|
|
148
|
+
}, H = (o, e) => Math.sqrt(o ** 2 - e ** 2), E = (o, e) => {
|
|
149
|
+
const { i: r, Peri: n, Node: i } = e, c = new s.Vector3(0, 1, 0), b = new s.Vector3(0, 0, 1);
|
|
150
|
+
return new s.Vector3(o.x, o.y, 0).applyAxisAngle(b, n ? a(n + 90) : 0).applyAxisAngle(c, a(r)).applyAxisAngle(
|
|
151
|
+
b,
|
|
152
|
+
i ? a(i) : 0
|
|
113
153
|
);
|
|
114
|
-
},
|
|
115
|
-
const
|
|
116
|
-
return
|
|
154
|
+
}, V = (o, e) => {
|
|
155
|
+
const i = 15 * (o / e);
|
|
156
|
+
return i <= 4 ? 4 : i >= 15 ? 15 : i;
|
|
117
157
|
};
|
|
118
158
|
export {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
159
|
+
l as AU_TO_VIZ_SCALER,
|
|
160
|
+
m as DAY_PER_VIZ_SEC,
|
|
161
|
+
t as ORBITAL_COLORS,
|
|
162
|
+
d as amor,
|
|
163
|
+
u as apollo,
|
|
164
|
+
C as atira,
|
|
165
|
+
S as auToMeters,
|
|
166
|
+
_ as auToUnit,
|
|
167
|
+
E as convert2dTo3d,
|
|
125
168
|
a as degsToRads,
|
|
126
|
-
|
|
127
|
-
|
|
169
|
+
A as formatValue,
|
|
170
|
+
y as getAngleFromPos,
|
|
128
171
|
h as getCurve,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
172
|
+
H as getFocus,
|
|
173
|
+
V as getLabelSize,
|
|
174
|
+
P as getLineGeometry,
|
|
175
|
+
M as getMinorAxis,
|
|
176
|
+
T as getPosFromArcLength,
|
|
177
|
+
R as getRefObjProps,
|
|
178
|
+
z as getVelocity,
|
|
136
179
|
x as unitToAu
|
|
137
180
|
};
|