@rubin-epo/epo-widget-lib 1.2.3 → 2.0.0
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/ColorTool.js +3 -3
- package/dist/IsochronePlot.js +3 -3
- package/dist/OrbitalSim.cjs +1 -1
- package/dist/OrbitalSim.d.ts +0 -2
- package/dist/OrbitalSim.js +6 -144
- package/dist/atomic/Blinker/Blinker.cjs +1 -1
- package/dist/atomic/Blinker/Blinker.js +35 -36
- package/dist/atomic/Blinker/Controls/styles.d.ts +0 -1
- package/dist/atomic/Blinker/styles.d.ts +0 -1
- package/dist/atomic/ElapsedTime/ElapsedTime.cjs +1 -1
- package/dist/atomic/ElapsedTime/ElapsedTime.js +18 -19
- package/dist/atomic/ElapsedTime/styles.d.ts +0 -1
- package/dist/atomic/ImageStack/index.cjs +1 -1
- package/dist/atomic/ImageStack/index.js +25 -26
- package/dist/atomic/ImageStack/styles.d.ts +0 -1
- package/dist/atomic/LiveRegion/styles.d.ts +0 -1
- package/dist/atomic/Loader/styles.d.ts +0 -1
- package/dist/atomic/PlaybackControl/PlaybackControl.cjs +1 -1
- package/dist/atomic/PlaybackControl/PlaybackControl.js +13 -14
- package/dist/atomic/PlaybackControl/styles.cjs +8 -5
- package/dist/atomic/PlaybackControl/styles.d.ts +4 -1
- package/dist/atomic/PlaybackControl/styles.js +12 -8
- package/dist/atomic/PlotWrapper/styles.d.ts +0 -1
- package/dist/charts/Base/styles.d.ts +0 -1
- package/dist/charts/Points/ErrorBar.cjs +1 -1
- package/dist/charts/Points/ErrorBar.js +33 -33
- package/dist/charts/Readout/styles.d.ts +0 -1
- package/dist/charts/ScatterPlot/styles.d.ts +1 -2
- package/dist/charts/Tooltip/styles.d.ts +7 -8
- package/dist/charts/Unit/Span.d.ts +1 -2
- package/dist/charts/Unit/StandardUnit.d.ts +2 -3
- package/dist/charts/Unit/StellarUnit.d.ts +2 -3
- package/dist/charts/Unit/Sub.d.ts +1 -2
- package/dist/charts/Unit/SvgSub.d.ts +1 -2
- package/dist/charts/Unit/TSpan.d.ts +1 -2
- package/dist/charts/Unit/index.d.ts +2 -3
- package/dist/charts/styles.d.ts +0 -1
- package/dist/hooks/useInterval.cjs +1 -1
- package/dist/hooks/useInterval.js +3 -3
- package/dist/hooks/usePrevious.cjs +1 -1
- package/dist/hooks/usePrevious.d.ts +1 -1
- package/dist/hooks/usePrevious.js +3 -3
- package/dist/layout/AspectRatio/styles.d.ts +0 -1
- package/dist/layout/Controls/styles.d.ts +2 -3
- package/dist/localeStrings/es/epo-widget-lib.json +1 -1
- package/dist/node_modules/classnames/index.cjs +2 -2
- package/dist/node_modules/classnames/index.js +30 -30
- package/dist/node_modules/three/examples/jsm/controls/OrbitControls.js +3 -3
- package/dist/style.css +1 -1
- package/dist/styles/svg.d.ts +0 -1
- package/dist/widgets/CameraFilter/CameraFilter.cjs +1 -1
- package/dist/widgets/CameraFilter/CameraFilter.js +30 -31
- package/dist/widgets/CameraFilter/styles.d.ts +1 -2
- package/dist/widgets/ColorTool/FilterControls/styles.d.ts +1 -4
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.d.ts +1 -1
- package/dist/widgets/ColorTool/ImageComposite/styles.d.ts +0 -1
- package/dist/widgets/ColorTool/lib/canvas.d.ts +1 -1
- package/dist/widgets/ColorTool/lib/utils.d.ts +2 -2
- package/dist/widgets/ColorTool/styles.d.ts +0 -1
- package/dist/widgets/FilterTool/styles.d.ts +1 -2
- package/dist/widgets/LightCurvePlot/Plot/index.js +3 -3
- package/dist/widgets/LightCurvePlot/Plot/styles.d.ts +0 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/A11Y/LightCurveLabel/styles.d.ts +0 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +45 -46
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.d.ts +0 -1
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.js +5 -5
- package/dist/widgets/LightCurvePlot/helpers.cjs +1 -1
- package/dist/widgets/LightCurvePlot/helpers.js +4 -4
- package/dist/widgets/OrbitalSim/Camera/Camera.cjs +1 -0
- package/dist/widgets/OrbitalSim/{Camera.d.ts → Camera/Camera.d.ts} +1 -2
- package/dist/widgets/OrbitalSim/{Camera.js → Camera/Camera.js} +1 -1
- package/dist/widgets/OrbitalSim/Camera/CameraController.cjs +1 -0
- package/dist/widgets/OrbitalSim/{CameraController.d.ts → Camera/CameraController.d.ts} +2 -3
- package/dist/widgets/OrbitalSim/{CameraController.js → Camera/CameraController.js} +2 -2
- package/dist/widgets/OrbitalSim/Context/OrbitalSimContext.d.ts +0 -0
- package/dist/widgets/OrbitalSim/Context/index.cjs +1 -0
- package/dist/widgets/OrbitalSim/Context/index.d.ts +66 -0
- package/dist/widgets/OrbitalSim/Context/index.js +60 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.cjs +1 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.js +20 -20
- package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.cjs +1 -0
- package/dist/widgets/OrbitalSim/{PlaybackSpeed.d.ts → Controls/PlaybackSpeed.d.ts} +4 -5
- package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.js +95 -0
- package/dist/widgets/OrbitalSim/Controls/styles.cjs +97 -0
- package/dist/widgets/OrbitalSim/Controls/styles.d.ts +13 -0
- package/dist/widgets/OrbitalSim/Controls/styles.js +114 -0
- package/dist/widgets/OrbitalSim/Observations/Observation.cjs +1 -0
- package/dist/widgets/OrbitalSim/Observations/Observation.d.ts +11 -0
- package/dist/widgets/OrbitalSim/Observations/Observation.js +50 -0
- package/dist/widgets/OrbitalSim/Observations/Observations.cjs +1 -0
- package/dist/widgets/OrbitalSim/Observations/Observations.d.ts +11 -0
- package/dist/widgets/OrbitalSim/Observations/Observations.js +34 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.cjs +1 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.d.ts +2 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.js +103 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.cjs +1 -1
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.js +6 -48
- package/dist/widgets/OrbitalSim/Orbitals/Orbital.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbitals/Orbital.d.ts +46 -0
- package/dist/widgets/OrbitalSim/Orbitals/Orbital.js +254 -0
- package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.d.ts +2 -0
- package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.js +42 -0
- package/dist/widgets/OrbitalSim/Orbitals/Orbitals.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbitals/Orbitals.d.ts +30 -0
- package/dist/widgets/OrbitalSim/Orbitals/Orbitals.js +125 -0
- package/dist/widgets/OrbitalSim/Orbitals/PotentialOrbits.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbitals/PotentialOrbits.d.ts +7 -0
- package/dist/widgets/OrbitalSim/Orbitals/PotentialOrbits.js +51 -0
- package/dist/widgets/OrbitalSim/Orbitals/styles.cjs +53 -0
- package/dist/widgets/OrbitalSim/Orbitals/styles.d.ts +9 -0
- package/dist/widgets/OrbitalSim/Orbitals/styles.js +66 -0
- package/dist/widgets/OrbitalSim/Sun.cjs +1 -1
- package/dist/widgets/OrbitalSim/Sun.d.ts +6 -9
- package/dist/widgets/OrbitalSim/Sun.js +11 -14
- package/dist/widgets/OrbitalSim/index.d.ts +2 -23
- package/dist/widgets/OrbitalSim/orbitalUtilities.cjs +1 -1
- package/dist/widgets/OrbitalSim/orbitalUtilities.d.ts +2 -0
- package/dist/widgets/OrbitalSim/orbitalUtilities.js +51 -56
- package/dist/widgets/OrbitalSim/styles.cjs +48 -0
- package/dist/widgets/OrbitalSim/styles.d.ts +5 -0
- package/dist/widgets/OrbitalSim/styles.js +56 -0
- package/dist/widgets/SourceSelector/Message/Message.cjs +1 -1
- package/dist/widgets/SourceSelector/Message/Message.js +10 -11
- package/dist/widgets/SourceSelector/Message/styles.d.ts +1 -2
- package/dist/widgets/SourceSelector/SelectionList/index.cjs +1 -1
- package/dist/widgets/SourceSelector/SelectionList/index.js +12 -13
- package/dist/widgets/SourceSelector/SelectionList/styles.d.ts +0 -1
- package/dist/widgets/SourceSelector/SourceMap/styles.d.ts +0 -1
- package/dist/widgets/SourceSelector/styles.d.ts +1 -2
- package/dist/widgets/SupernovaThreeVector/Histogram/styles.d.ts +0 -1
- package/dist/widgets/SupernovaThreeVector/Skymap/styles.d.ts +0 -1
- package/dist/widgets/SupernovaThreeVector/styles.d.ts +0 -1
- package/dist/widgets/ViewIndicator/styles.d.ts +0 -1
- package/package.json +15 -13
- package/dist/widgets/OrbitalSim/Camera.cjs +0 -1
- package/dist/widgets/OrbitalSim/CameraController.cjs +0 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.module.css.cjs +0 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.module.css.js +0 -7
- package/dist/widgets/OrbitalSim/Observation.cjs +0 -1
- package/dist/widgets/OrbitalSim/Observation.d.ts +0 -16
- package/dist/widgets/OrbitalSim/Observation.js +0 -60
- package/dist/widgets/OrbitalSim/Observations.cjs +0 -1
- package/dist/widgets/OrbitalSim/Observations.d.ts +0 -16
- package/dist/widgets/OrbitalSim/Observations.js +0 -38
- package/dist/widgets/OrbitalSim/Orbital.cjs +0 -1
- package/dist/widgets/OrbitalSim/Orbital.d.ts +0 -52
- package/dist/widgets/OrbitalSim/Orbital.js +0 -256
- package/dist/widgets/OrbitalSim/OrbitalDetails.cjs +0 -1
- package/dist/widgets/OrbitalSim/OrbitalDetails.d.ts +0 -14
- package/dist/widgets/OrbitalSim/OrbitalDetails.js +0 -56
- package/dist/widgets/OrbitalSim/Orbitals.cjs +0 -1
- package/dist/widgets/OrbitalSim/Orbitals.d.ts +0 -48
- package/dist/widgets/OrbitalSim/Orbitals.js +0 -147
- package/dist/widgets/OrbitalSim/PlaybackSpeed.cjs +0 -1
- package/dist/widgets/OrbitalSim/PlaybackSpeed.js +0 -97
- package/dist/widgets/OrbitalSim/PotentialOrbits.cjs +0 -1
- package/dist/widgets/OrbitalSim/PotentialOrbits.d.ts +0 -16
- package/dist/widgets/OrbitalSim/PotentialOrbits.js +0 -59
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as F, Fragment as _, jsx as f } from "react/jsx-runtime";
|
|
3
|
+
import { useReducer as y, useEffect as E } from "react";
|
|
4
|
+
import t from "../../../node_modules/prop-types/index.js";
|
|
5
|
+
import { useThree as N, useFrame as q } from "@react-three/fiber";
|
|
6
|
+
import C from "./Orbital.js";
|
|
7
|
+
import w from "./PotentialOrbits.js";
|
|
8
|
+
import { getRefObjProps as B } from "../orbitalUtilities.js";
|
|
9
|
+
import { useOrbitalSimContext as G } from "../Context/index.js";
|
|
10
|
+
function H({
|
|
11
|
+
playing: a,
|
|
12
|
+
dayPerVizSec: n,
|
|
13
|
+
stepDirection: e,
|
|
14
|
+
frameOverride: s,
|
|
15
|
+
defaultZoom: c,
|
|
16
|
+
potentialOrbits: R,
|
|
17
|
+
elapsedTime: l,
|
|
18
|
+
setElapsedTime: d,
|
|
19
|
+
reset: j,
|
|
20
|
+
zoomLevel: m,
|
|
21
|
+
setZoomLevel: h
|
|
22
|
+
}) {
|
|
23
|
+
const { orbits: $ } = G(), {
|
|
24
|
+
neos: i,
|
|
25
|
+
refObjs: x,
|
|
26
|
+
activeNeo: I
|
|
27
|
+
} = $;
|
|
28
|
+
function P(o) {
|
|
29
|
+
const { remainingInits: r } = o;
|
|
30
|
+
return { remainingInits: r - 1 };
|
|
31
|
+
}
|
|
32
|
+
const { camera: g } = N(), [k, O] = y(P, {
|
|
33
|
+
remainingInits: i && Array.isArray(i) ? i.length : 0
|
|
34
|
+
});
|
|
35
|
+
function M() {
|
|
36
|
+
return (x || ["earth", "jupiter", "mars", "neptune"]).map(B).map((r) => {
|
|
37
|
+
const {
|
|
38
|
+
orbitColor: u,
|
|
39
|
+
objectColor: b,
|
|
40
|
+
objectRadius: p,
|
|
41
|
+
Ref: T,
|
|
42
|
+
Principal_desig: z,
|
|
43
|
+
name: A
|
|
44
|
+
} = r;
|
|
45
|
+
return /* @__PURE__ */ f(
|
|
46
|
+
C,
|
|
47
|
+
{
|
|
48
|
+
type: "planet",
|
|
49
|
+
data: r,
|
|
50
|
+
position: [0, 0, 0],
|
|
51
|
+
zoomMod: m,
|
|
52
|
+
defaultZoom: c,
|
|
53
|
+
playing: a,
|
|
54
|
+
stepDirection: e,
|
|
55
|
+
dayPerVizSec: n,
|
|
56
|
+
frameOverride: s,
|
|
57
|
+
orbitColor: u,
|
|
58
|
+
objectColor: b,
|
|
59
|
+
objectRadius: p,
|
|
60
|
+
reset: j
|
|
61
|
+
},
|
|
62
|
+
`${T}-${z || A}`
|
|
63
|
+
);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return q((o, r) => {
|
|
67
|
+
g.zoom !== m && h(g.zoom), a && d(l + e * r * n);
|
|
68
|
+
}), E(() => {
|
|
69
|
+
s && d(l + e * (1 / 60) * n);
|
|
70
|
+
}, [s]), /* @__PURE__ */ F(_, { children: [
|
|
71
|
+
M(),
|
|
72
|
+
R ? /* @__PURE__ */ f(
|
|
73
|
+
w,
|
|
74
|
+
{
|
|
75
|
+
data: i,
|
|
76
|
+
position: [0, 0, 0],
|
|
77
|
+
initialized: !0,
|
|
78
|
+
zoomMod: m,
|
|
79
|
+
defaultZoom: c,
|
|
80
|
+
playing: a,
|
|
81
|
+
stepDirection: e,
|
|
82
|
+
dayPerVizSec: n,
|
|
83
|
+
frameOverride: s,
|
|
84
|
+
initCallback: O
|
|
85
|
+
}
|
|
86
|
+
) : i ? i.map((o, r) => {
|
|
87
|
+
const { Ref: u, Principal_desig: b, name: p } = o;
|
|
88
|
+
return /* @__PURE__ */ f(
|
|
89
|
+
C,
|
|
90
|
+
{
|
|
91
|
+
data: o,
|
|
92
|
+
position: [0, 0, 0],
|
|
93
|
+
active: o === I,
|
|
94
|
+
initialized: k.remainingInits <= 0,
|
|
95
|
+
zoomMod: m,
|
|
96
|
+
defaultZoom: c,
|
|
97
|
+
playing: a,
|
|
98
|
+
stepDirection: e,
|
|
99
|
+
dayPerVizSec: n,
|
|
100
|
+
frameOverride: s,
|
|
101
|
+
reset: j,
|
|
102
|
+
initCallback: O
|
|
103
|
+
},
|
|
104
|
+
u && (b || p) ? `${u}-${b || p}` : `orbit-${r}`
|
|
105
|
+
);
|
|
106
|
+
}) : null
|
|
107
|
+
] });
|
|
108
|
+
}
|
|
109
|
+
H.propTypes = {
|
|
110
|
+
playing: t.bool,
|
|
111
|
+
dayPerVizSec: t.number,
|
|
112
|
+
stepDirection: t.number,
|
|
113
|
+
frameOverride: t.number,
|
|
114
|
+
activeVelocityCallback: t.func,
|
|
115
|
+
defaultZoom: t.number,
|
|
116
|
+
zoomLevel: t.number,
|
|
117
|
+
setZoomLevel: t.func,
|
|
118
|
+
potentialOrbits: t.bool,
|
|
119
|
+
elapsedTime: t.number,
|
|
120
|
+
setElapsedTime: t.func,
|
|
121
|
+
reset: t.number
|
|
122
|
+
};
|
|
123
|
+
export {
|
|
124
|
+
H as default
|
|
125
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),j=require("react"),O=require("../../../node_modules/prop-types/index.cjs"),v=require("three"),q=require("../Observations/Observations.cjs"),f=require("../orbitalUtilities.cjs"),S=require("../Context/index.cjs");function T(e){if(e&&e.__esModule)return e;const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const d=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(u,r,d.get?d:{enumerable:!0,get:()=>e[r]})}}return u.default=e,Object.freeze(u)}const g=T(v),m=()=>{const{orbits:e,observations:u}=S.useOrbitalSimContext(),{neos:r}=e;function d(o,t,n){const i=f.getFocus(o,t),c=new g.Vector3(i,0,0);return f.getCurve(o,t,c.x,c.y).getPoints(100).map(s=>f.convert2dTo3d(s,n)).flat()}function x(o){return o.map(t=>{const{a:n,e:i}=t,c=f.auToUnit(n),s=f.getMinorAxis(n,i);return d(c,s,t)})}const[h]=j.useState(()=>{let o=0;const t=[],n=[];x(r).forEach(s=>{const y=s.length-1;for(let a=0;a<s.length;a++){const p=s[a],b=a+o;n.push(p.x),n.push(p.y),n.push(p.z),t.push(b),t.push(a===y?o:b+1)}o+=s.length});const i=new g.BufferGeometry,c=new g.Float32BufferAttribute(n,3);return i.setAttribute("position",c),i.setIndex(t),i});return l.jsxs(l.Fragment,{children:[l.jsx("lineSegments",{position:[0,0,0],geometry:h,children:l.jsx("lineBasicMaterial",{attach:"material",color:"#CEB3DB"})}),u&&r&&l.jsx(q.default,{data:r[0],observations:u})]})};m.propTypes={data:O.default.array};exports.default=m;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as y, Fragment as b, jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { useState as C } from "react";
|
|
4
|
+
import v from "../../../node_modules/prop-types/index.js";
|
|
5
|
+
import * as p from "three";
|
|
6
|
+
import B from "../Observations/Observations.js";
|
|
7
|
+
import { getCurve as T, convert2dTo3d as E, getFocus as I, getMinorAxis as P, auToUnit as w } from "../orbitalUtilities.js";
|
|
8
|
+
import { useOrbitalSimContext as A } from "../Context/index.js";
|
|
9
|
+
const F = () => {
|
|
10
|
+
const { orbits: l, observations: f } = A(), { neos: a } = l;
|
|
11
|
+
function g(o, t, e) {
|
|
12
|
+
const n = I(o, t), s = new p.Vector3(n, 0, 0);
|
|
13
|
+
return T(o, t, s.x, s.y).getPoints(100).map((r) => E(r, e)).flat();
|
|
14
|
+
}
|
|
15
|
+
function h(o) {
|
|
16
|
+
return o.map((t) => {
|
|
17
|
+
const { a: e, e: n } = t, s = w(e), r = P(e, n);
|
|
18
|
+
return g(s, r, t);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
const [d] = C(() => {
|
|
22
|
+
let o = 0;
|
|
23
|
+
const t = [], e = [];
|
|
24
|
+
h(a).forEach((r) => {
|
|
25
|
+
const x = r.length - 1;
|
|
26
|
+
for (let i = 0; i < r.length; i++) {
|
|
27
|
+
const c = r[i], m = i + o;
|
|
28
|
+
e.push(c.x), e.push(c.y), e.push(c.z), t.push(m), t.push(i === x ? o : m + 1);
|
|
29
|
+
}
|
|
30
|
+
o += r.length;
|
|
31
|
+
});
|
|
32
|
+
const n = new p.BufferGeometry(), s = new p.Float32BufferAttribute(e, 3);
|
|
33
|
+
return n.setAttribute("position", s), n.setIndex(t), n;
|
|
34
|
+
});
|
|
35
|
+
return /* @__PURE__ */ y(b, { children: [
|
|
36
|
+
/* @__PURE__ */ u("lineSegments", { position: [0, 0, 0], geometry: d, children: /* @__PURE__ */ u("lineBasicMaterial", { attach: "material", color: "#CEB3DB" }) }),
|
|
37
|
+
f && a && /* @__PURE__ */ u(
|
|
38
|
+
B,
|
|
39
|
+
{
|
|
40
|
+
data: a[0],
|
|
41
|
+
observations: f
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] });
|
|
45
|
+
};
|
|
46
|
+
F.propTypes = {
|
|
47
|
+
data: v.array
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
F as default
|
|
51
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),l=require("@rubin-epo/epo-react-lib/Button"),d=require("@rubin-epo/epo-react-lib/Slideout"),e=o=>o&&o.__esModule?o:{default:o},t=e(r),i=e(l),a=e(d),n=t.default(a.default)`
|
|
2
|
+
display: none;
|
|
3
|
+
opacity: 0;
|
|
4
|
+
pointer-events: none;
|
|
5
|
+
`,c=t.default.div`
|
|
6
|
+
padding: 2px 4px;
|
|
7
|
+
margin-top: 4px;
|
|
8
|
+
font-weight: var(--medium);
|
|
9
|
+
color: var(--black);
|
|
10
|
+
background-color: color-mix(in srgb, var(--white) 40%, transparent);
|
|
11
|
+
border: 1px solid color-mix(in srgb, var(--white) 40%, transparent);;
|
|
12
|
+
border-radius: 5px;
|
|
13
|
+
color-adjust: exact;
|
|
14
|
+
`,u=t.default(i.default)`
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
z-index: 3;
|
|
19
|
+
margin: var(--minPadding);
|
|
20
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
21
|
+
color: var(--white) !important;
|
|
22
|
+
background-color: var(--error);
|
|
23
|
+
}
|
|
24
|
+
`,p=t.default.div`
|
|
25
|
+
background-color: var(--neutral10);
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: 1em;
|
|
29
|
+
padding: 1em;
|
|
30
|
+
font-size: 0.75rem;
|
|
31
|
+
width: '50ch';
|
|
32
|
+
|
|
33
|
+
& > * + * {
|
|
34
|
+
margin-block-start: 1em;
|
|
35
|
+
}
|
|
36
|
+
`,s=t.default.div`
|
|
37
|
+
display: flex;
|
|
38
|
+
gap: 20px;
|
|
39
|
+
`,x=t.default.div`
|
|
40
|
+
flex: 1;
|
|
41
|
+
padding: 0px 15px 0px 15px;
|
|
42
|
+
border: 1px solid #ccc;
|
|
43
|
+
background-color: #ccc;
|
|
44
|
+
border-radius: 15px;
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
`,f=t.default.div`
|
|
47
|
+
flex: 1;
|
|
48
|
+
padding: 0px 15px 0px 15px;
|
|
49
|
+
border: 1px solid #ccc;
|
|
50
|
+
background-color: #ccc;
|
|
51
|
+
border-radius: 15px;
|
|
52
|
+
text-align: right;
|
|
53
|
+
`;exports.ButtonWrapper=u;exports.Label=c;exports.SlideoutColLeft=x;exports.SlideoutColRight=f;exports.SlideoutPanel=p;exports.SlideoutRow=s;exports.SlideoutWrapper=n;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const SlideoutWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('@rubin-epo/epo-react-lib/Slideout').SlideoutProps & {
|
|
2
|
+
children?: import('react').ReactNode | undefined;
|
|
3
|
+
}, never>> & string & Omit<import('react').FunctionComponent<import('react').PropsWithChildren<import('@rubin-epo/epo-react-lib/Slideout').SlideoutProps>>, keyof import('react').Component<any, {}, any>>;
|
|
4
|
+
export declare const Label: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
+
export declare const ButtonWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<Omit<import('react').PropsWithChildren<import('@rubin-epo/epo-react-lib/Button').ButtonProps>, "ref"> & import('react').RefAttributes<HTMLButtonElement>, never>> & string & Omit<import('react').ForwardRefExoticComponent<Omit<import('react').PropsWithChildren<import('@rubin-epo/epo-react-lib/Button').ButtonProps>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>, keyof import('react').Component<any, {}, any>>;
|
|
6
|
+
export declare const SlideoutPanel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
7
|
+
export declare const SlideoutRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
|
+
export declare const SlideoutColLeft: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
9
|
+
export declare const SlideoutColRight: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import o from "styled-components";
|
|
3
|
+
import r from "@rubin-epo/epo-react-lib/Button";
|
|
4
|
+
import t from "@rubin-epo/epo-react-lib/Slideout";
|
|
5
|
+
const a = o(t)`
|
|
6
|
+
display: none;
|
|
7
|
+
opacity: 0;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
`, d = o.div`
|
|
10
|
+
padding: 2px 4px;
|
|
11
|
+
margin-top: 4px;
|
|
12
|
+
font-weight: var(--medium);
|
|
13
|
+
color: var(--black);
|
|
14
|
+
background-color: color-mix(in srgb, var(--white) 40%, transparent);
|
|
15
|
+
border: 1px solid color-mix(in srgb, var(--white) 40%, transparent);;
|
|
16
|
+
border-radius: 5px;
|
|
17
|
+
color-adjust: exact;
|
|
18
|
+
`, l = o(r)`
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
z-index: 3;
|
|
23
|
+
margin: var(--minPadding);
|
|
24
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
25
|
+
color: var(--white) !important;
|
|
26
|
+
background-color: var(--error);
|
|
27
|
+
}
|
|
28
|
+
`, p = o.div`
|
|
29
|
+
background-color: var(--neutral10);
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: 1em;
|
|
33
|
+
padding: 1em;
|
|
34
|
+
font-size: 0.75rem;
|
|
35
|
+
width: '50ch';
|
|
36
|
+
|
|
37
|
+
& > * + * {
|
|
38
|
+
margin-block-start: 1em;
|
|
39
|
+
}
|
|
40
|
+
`, c = o.div`
|
|
41
|
+
display: flex;
|
|
42
|
+
gap: 20px;
|
|
43
|
+
`, s = o.div`
|
|
44
|
+
flex: 1;
|
|
45
|
+
padding: 0px 15px 0px 15px;
|
|
46
|
+
border: 1px solid #ccc;
|
|
47
|
+
background-color: #ccc;
|
|
48
|
+
border-radius: 15px;
|
|
49
|
+
font-weight: bold;
|
|
50
|
+
`, x = o.div`
|
|
51
|
+
flex: 1;
|
|
52
|
+
padding: 0px 15px 0px 15px;
|
|
53
|
+
border: 1px solid #ccc;
|
|
54
|
+
background-color: #ccc;
|
|
55
|
+
border-radius: 15px;
|
|
56
|
+
text-align: right;
|
|
57
|
+
`;
|
|
58
|
+
export {
|
|
59
|
+
l as ButtonWrapper,
|
|
60
|
+
d as Label,
|
|
61
|
+
s as SlideoutColLeft,
|
|
62
|
+
x as SlideoutColRight,
|
|
63
|
+
p as SlideoutPanel,
|
|
64
|
+
c as SlideoutRow,
|
|
65
|
+
a as SlideoutWrapper
|
|
66
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
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"),l=require("react-i18next"),a=require("./OrbitalSim.module.css.cjs"),n=({defaultZoom:r,zoomLevel:s})=>{const{t:i}=l.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("div",{className:a.default.label,style:{fontSize:t.getLabelSize(s,r)},children:i("orbital_sim.astronomy.orbital_bodies.sun")})})]})};exports.default=n;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
t: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
3
|
+
type SunPropTypes = {
|
|
4
|
+
zoomLevel: Number;
|
|
5
|
+
defaultZoom: Number;
|
|
6
|
+
};
|
|
7
|
+
declare const Sun: FC<SunPropTypes>;
|
|
11
8
|
export default Sun;
|
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { Html as i } from "@react-three/drei";
|
|
4
4
|
import { ORBITAL_COLORS as a, getLabelSize as l } from "./orbitalUtilities.js";
|
|
5
|
+
import { useTranslation as m } from "react-i18next";
|
|
5
6
|
import n from "./OrbitalSim.module.css.js";
|
|
6
|
-
|
|
7
|
+
const b = ({ defaultZoom: e, zoomLevel: o }) => {
|
|
8
|
+
const { t: r } = m();
|
|
7
9
|
return /* @__PURE__ */ s("mesh", { position: [0, 0, 0], children: [
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
+
/* @__PURE__ */ t("sphereGeometry", { attach: "geometry", args: [9, 16, 8] }),
|
|
11
|
+
/* @__PURE__ */ t(
|
|
10
12
|
"meshBasicMaterial",
|
|
11
13
|
{
|
|
12
14
|
attach: "material",
|
|
13
15
|
color: a.sun.objectColor
|
|
14
16
|
}
|
|
15
17
|
),
|
|
16
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(
|
|
17
19
|
"div",
|
|
18
20
|
{
|
|
19
21
|
className: n.label,
|
|
20
22
|
style: {
|
|
21
|
-
fontSize: l(
|
|
23
|
+
fontSize: l(o, e)
|
|
22
24
|
},
|
|
23
|
-
children:
|
|
25
|
+
children: r("orbital_sim.astronomy.orbital_bodies.sun")
|
|
24
26
|
}
|
|
25
27
|
) })
|
|
26
28
|
] });
|
|
27
|
-
}
|
|
28
|
-
p.propTypes = {
|
|
29
|
-
zoomLevel: o.number,
|
|
30
|
-
defaultZoom: o.number,
|
|
31
|
-
t: o.func
|
|
32
29
|
};
|
|
33
30
|
export {
|
|
34
|
-
|
|
31
|
+
b as default
|
|
35
32
|
};
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
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;
|
|
1
|
+
export { default as OrbitalSim } from './OrbitalSim';
|
|
2
|
+
export { OrbitalSimContext, OrbitalSimProvider, useOrbitalSimContext } from './Context';
|
|
@@ -1 +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
|
|
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 i=d(g),c=100,f=1,n={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"}},p={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},C={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:p,mars:C,jupiter:j})[e]||null,A=function(e,t){return Number.parseFloat(Number.parseFloat(e).toFixed(t))},R=(e,t,o=0,r=0)=>new i.EllipseCurve(o,r,e,t,0,2*Math.PI,!1,0),T=e=>new i.BufferGeometry().setFromPoints(e),y=(e,t)=>{const o=e.distanceTo(t),{x:r,y:s}=e;return Math.acos((o**2+r**2-s**2)/(2*o*r))*180/Math.PI},P=(e,t)=>{const{x:o,y:r}=t.getPoint(e);return new i.Vector3(o,r,0)},b=e=>e*c,h=e=>e/c,S=(e,t)=>b(e*Math.sqrt(1-t**2)),O=e=>1496e8*e,a=e=>e*(Math.PI/180),M=(e,t)=>{const o=.000296005155*c**3;return Math.sqrt(o*(2/e-1/t))},x=(e,t)=>Math.sqrt(e**2-t**2),z=(e,t)=>{const{i:o,Peri:r,Node:s}=t,l=new i.Vector3(0,1,0),u=new i.Vector3(0,0,1);return new i.Vector3(e.x,e.y,0).applyAxisAngle(u,r?a(r+90):0).applyAxisAngle(l,a(o)).applyAxisAngle(u,s?a(s):0)},E=(e,t)=>{const s=15*(e/t);return s<=4?4:s>=15?15:s};exports.AU_TO_VIZ_SCALER=c;exports.DAY_PER_VIZ_SEC=f;exports.ORBITAL_COLORS=n;exports.auToMeters=O;exports.auToUnit=b;exports.convert2dTo3d=z;exports.degsToRads=a;exports.formatValue=A;exports.getAngleFromPos=y;exports.getCurve=R;exports.getFocus=x;exports.getLabelSize=E;exports.getLineGeometry=T;exports.getMinorAxis=S;exports.getPosFromArcLength=P;exports.getRefObjProps=m;exports.getVelocity=M;exports.unitToAu=h;
|
|
@@ -49,6 +49,8 @@ export namespace ORBITAL_COLORS {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
export function getRefObjProps(id: any): any;
|
|
52
|
+
export function formatValue(number: any, decimalPlaces: any): number;
|
|
53
|
+
export function randomIntFromInterval(min: any, max: any): number;
|
|
52
54
|
export function getCurve(xRadius: any, yRadius: any, aX?: number, aY?: number): THREE.EllipseCurve;
|
|
53
55
|
export function getLineGeometry(points: any): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>;
|
|
54
56
|
export function getAngleFromPos(pos: any, sunPos: any): number;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
const c = 100, g = 1,
|
|
1
|
+
import * as i from "three";
|
|
2
|
+
const c = 100, g = 1, s = {
|
|
3
3
|
sun: {
|
|
4
4
|
objectColor: "#f8da86"
|
|
5
5
|
},
|
|
6
|
-
mercury: {
|
|
7
|
-
objectColor: "#dce0e3",
|
|
8
|
-
orbitColor: "#a6a9ab"
|
|
9
|
-
},
|
|
10
|
-
venus: {
|
|
11
|
-
objectColor: "#cd84ec",
|
|
12
|
-
orbitColor: "#9c65b4"
|
|
13
|
-
},
|
|
14
6
|
earth: {
|
|
15
7
|
objectColor: "#3f9ef0",
|
|
16
8
|
orbitColor: "#3079b8"
|
|
@@ -33,7 +25,7 @@ const c = 100, g = 1, i = {
|
|
|
33
25
|
objectHighlight: "#00ffff",
|
|
34
26
|
orbitHighlight: "#ffffff"
|
|
35
27
|
}
|
|
36
|
-
},
|
|
28
|
+
}, b = {
|
|
37
29
|
a: 1,
|
|
38
30
|
e: 0.01671022,
|
|
39
31
|
i: 0,
|
|
@@ -41,11 +33,11 @@ const c = 100, g = 1, i = {
|
|
|
41
33
|
Ref: "Earth",
|
|
42
34
|
Principal_desig: "Earth",
|
|
43
35
|
Translated_desig_key: "planets.earth",
|
|
44
|
-
orbitColor:
|
|
45
|
-
objectColor:
|
|
36
|
+
orbitColor: s.earth.orbitColor,
|
|
37
|
+
objectColor: s.earth.objectColor,
|
|
46
38
|
// objectRadius: 6371000,
|
|
47
39
|
objectRadius: 5
|
|
48
|
-
},
|
|
40
|
+
}, p = {
|
|
49
41
|
a: 1.52366231,
|
|
50
42
|
e: 0.09341233,
|
|
51
43
|
i: 1.85061,
|
|
@@ -53,10 +45,10 @@ const c = 100, g = 1, i = {
|
|
|
53
45
|
Ref: "Mars",
|
|
54
46
|
Principal_desig: "Mars",
|
|
55
47
|
Translated_desig_key: "planets.mars",
|
|
56
|
-
orbitColor:
|
|
57
|
-
objectColor:
|
|
48
|
+
orbitColor: s.mars.orbitColor,
|
|
49
|
+
objectColor: s.mars.objectColor,
|
|
58
50
|
objectRadius: 4
|
|
59
|
-
},
|
|
51
|
+
}, f = {
|
|
60
52
|
a: 5.2028,
|
|
61
53
|
e: 0.048,
|
|
62
54
|
i: 1.31,
|
|
@@ -64,11 +56,11 @@ const c = 100, g = 1, i = {
|
|
|
64
56
|
Ref: "Jupiter",
|
|
65
57
|
Principal_desig: "Jupiter",
|
|
66
58
|
Translated_desig_key: "planets.jupiter",
|
|
67
|
-
orbitColor:
|
|
68
|
-
objectColor:
|
|
59
|
+
orbitColor: s.jupiter.orbitColor,
|
|
60
|
+
objectColor: s.jupiter.objectColor,
|
|
69
61
|
// objectRadius: 69911000,
|
|
70
62
|
objectRadius: 7
|
|
71
|
-
},
|
|
63
|
+
}, C = {
|
|
72
64
|
a: 30.06896348,
|
|
73
65
|
e: 858587e-8,
|
|
74
66
|
i: 1.76917,
|
|
@@ -76,23 +68,25 @@ const c = 100, g = 1, i = {
|
|
|
76
68
|
Ref: "Neptune",
|
|
77
69
|
Principal_desig: "Neptune",
|
|
78
70
|
Translated_desig_key: "planets.neptune",
|
|
79
|
-
orbitColor:
|
|
80
|
-
objectColor:
|
|
71
|
+
orbitColor: s.neptune.orbitColor,
|
|
72
|
+
objectColor: s.neptune.objectColor,
|
|
81
73
|
// objectRadius: 24622000,
|
|
82
74
|
objectRadius: 6
|
|
83
75
|
}, j = (e) => ({
|
|
84
|
-
neptune:
|
|
85
|
-
earth:
|
|
86
|
-
mars:
|
|
87
|
-
jupiter:
|
|
88
|
-
})[e] || null, m = (e,
|
|
89
|
-
t
|
|
76
|
+
neptune: C,
|
|
77
|
+
earth: b,
|
|
78
|
+
mars: p,
|
|
79
|
+
jupiter: f
|
|
80
|
+
})[e] || null, m = function(e, t) {
|
|
81
|
+
return Number.parseFloat(Number.parseFloat(e).toFixed(t));
|
|
82
|
+
}, h = (e, t, o = 0, r = 0) => new i.EllipseCurve(
|
|
83
|
+
o,
|
|
90
84
|
// aX
|
|
91
85
|
r,
|
|
92
86
|
// aY
|
|
93
87
|
e,
|
|
94
88
|
// xRadius
|
|
95
|
-
|
|
89
|
+
t,
|
|
96
90
|
// yRadius
|
|
97
91
|
0,
|
|
98
92
|
// aStartAngle
|
|
@@ -102,41 +96,42 @@ const c = 100, g = 1, i = {
|
|
|
102
96
|
// aClockwise
|
|
103
97
|
0
|
|
104
98
|
// aRotation
|
|
105
|
-
),
|
|
106
|
-
const
|
|
107
|
-
return Math.acos((
|
|
108
|
-
},
|
|
109
|
-
const { x:
|
|
110
|
-
return new
|
|
111
|
-
},
|
|
112
|
-
const
|
|
113
|
-
return Math.sqrt(
|
|
114
|
-
},
|
|
115
|
-
const { i:
|
|
116
|
-
return new
|
|
117
|
-
|
|
99
|
+
), _ = (e) => new i.BufferGeometry().setFromPoints(e), R = (e, t) => {
|
|
100
|
+
const o = e.distanceTo(t), { x: r, y: n } = e;
|
|
101
|
+
return Math.acos((o ** 2 + r ** 2 - n ** 2) / (2 * o * r)) * 180 / Math.PI;
|
|
102
|
+
}, A = (e, t) => {
|
|
103
|
+
const { x: o, y: r } = t.getPoint(e);
|
|
104
|
+
return new i.Vector3(o, r, 0);
|
|
105
|
+
}, d = (e) => e * c, x = (e) => e / c, y = (e, t) => d(e * Math.sqrt(1 - t ** 2)), P = (e) => 1496e8 * e, a = (e) => e * (Math.PI / 180), T = (e, t) => {
|
|
106
|
+
const o = 296005155e-12 * c ** 3;
|
|
107
|
+
return Math.sqrt(o * (2 / e - 1 / t));
|
|
108
|
+
}, M = (e, t) => Math.sqrt(e ** 2 - t ** 2), S = (e, t) => {
|
|
109
|
+
const { i: o, Peri: r, Node: n } = t, l = new i.Vector3(0, 1, 0), u = new i.Vector3(0, 0, 1);
|
|
110
|
+
return new i.Vector3(e.x, e.y, 0).applyAxisAngle(u, r ? a(r + 90) : 0).applyAxisAngle(l, a(o)).applyAxisAngle(
|
|
111
|
+
u,
|
|
118
112
|
n ? a(n) : 0
|
|
119
113
|
);
|
|
120
|
-
},
|
|
121
|
-
const n = 15 * (e /
|
|
114
|
+
}, z = (e, t) => {
|
|
115
|
+
const n = 15 * (e / t);
|
|
122
116
|
return n <= 4 ? 4 : n >= 15 ? 15 : n;
|
|
123
117
|
};
|
|
124
118
|
export {
|
|
125
119
|
c as AU_TO_VIZ_SCALER,
|
|
126
120
|
g as DAY_PER_VIZ_SEC,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
121
|
+
s as ORBITAL_COLORS,
|
|
122
|
+
P as auToMeters,
|
|
123
|
+
d as auToUnit,
|
|
124
|
+
S as convert2dTo3d,
|
|
131
125
|
a as degsToRads,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
126
|
+
m as formatValue,
|
|
127
|
+
R as getAngleFromPos,
|
|
128
|
+
h as getCurve,
|
|
129
|
+
M as getFocus,
|
|
130
|
+
z as getLabelSize,
|
|
131
|
+
_ as getLineGeometry,
|
|
137
132
|
y as getMinorAxis,
|
|
138
|
-
|
|
133
|
+
A as getPosFromArcLength,
|
|
139
134
|
j as getRefObjProps,
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
T as getVelocity,
|
|
136
|
+
x as unitToAu
|
|
142
137
|
};
|