@johnmorrisdotca/wakusei-planets 0.35.0 → 0.36.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/CHANGELOG.md +9 -0
- package/NOTICE.md +16 -0
- package/README.md +3 -3
- package/dist/data/orbiters.d.ts +368 -0
- package/dist/data/orbiters.js +370 -0
- package/dist/orbiter-facts.d.ts +480 -0
- package/dist/orbiter-facts.js +189 -0
- package/dist/orbiters.d.ts +256 -0
- package/dist/orbiters.js +275 -0
- package/dist/scene/textures.d.ts +2 -2
- package/dist/space/element.d.ts +80 -4
- package/dist/space/element.js +350 -21
- package/dist/space/frame.d.ts +14 -0
- package/dist/space/frame.js +16 -0
- package/dist/space/index.d.ts +3 -1
- package/dist/space/index.js +3 -1
- package/dist/space/regions.d.ts +111 -0
- package/dist/space/regions.js +84 -0
- package/dist/space/scene.d.ts +99 -8
- package/dist/space/scene.js +268 -15
- package/dist/space/travel.d.ts +256 -0
- package/dist/space/travel.js +597 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { Vec3 } from "../vec.ts";
|
|
2
|
+
import { type ScaleMode } from "./scale.ts";
|
|
3
|
+
import type { TravelView } from "./travel.ts";
|
|
4
|
+
/**
|
|
5
|
+
* The stages a view steps out through from the Sun, nearest first: each has an `id`, a name in English and Japanese for a button or a step, and the bodies whose orbits make it. The inner planets are Mercury
|
|
6
|
+
* to Mars; the asteroid belt is Vesta, Ceres and Pallas, whose orbits reach its outer edge; the outer planets are Jupiter to Neptune; the Kuiper belt is Pluto and the dwarf planets out to Eris; the whole
|
|
7
|
+
* system is every orbit the space view draws, Sedna's and Halley's among them.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { SUN_REGIONS } from "@johnmorrisdotca/wakusei-planets/space";
|
|
12
|
+
*
|
|
13
|
+
* console.log(SUN_REGIONS.map((region) => `${region.id}: ${region.name.en} / ${region.name.ja}`).join("\n"));
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const SUN_REGIONS: readonly [{
|
|
17
|
+
readonly id: "inner-planets";
|
|
18
|
+
readonly name: {
|
|
19
|
+
readonly en: "Inner planets";
|
|
20
|
+
readonly ja: "内太陽系";
|
|
21
|
+
};
|
|
22
|
+
readonly bodies: readonly ["mercury", "venus", "earth", "mars"];
|
|
23
|
+
}, {
|
|
24
|
+
readonly id: "asteroid-belt";
|
|
25
|
+
readonly name: {
|
|
26
|
+
readonly en: "Asteroid belt";
|
|
27
|
+
readonly ja: "小惑星帯";
|
|
28
|
+
};
|
|
29
|
+
readonly bodies: readonly ["vesta", "ceres", "pallas"];
|
|
30
|
+
}, {
|
|
31
|
+
readonly id: "outer-planets";
|
|
32
|
+
readonly name: {
|
|
33
|
+
readonly en: "Outer planets";
|
|
34
|
+
readonly ja: "外太陽系";
|
|
35
|
+
};
|
|
36
|
+
readonly bodies: readonly ["jupiter", "saturn", "uranus", "neptune"];
|
|
37
|
+
}, {
|
|
38
|
+
readonly id: "kuiper-belt";
|
|
39
|
+
readonly name: {
|
|
40
|
+
readonly en: "Kuiper belt";
|
|
41
|
+
readonly ja: "カイパーベルト";
|
|
42
|
+
};
|
|
43
|
+
readonly bodies: readonly ["pluto", "orcus", "haumea", "quaoar", "makemake", "gonggong", "eris"];
|
|
44
|
+
}, {
|
|
45
|
+
readonly id: "whole-system";
|
|
46
|
+
readonly name: {
|
|
47
|
+
readonly en: "Whole solar system";
|
|
48
|
+
readonly ja: "太陽系全体";
|
|
49
|
+
};
|
|
50
|
+
readonly bodies: readonly ["earth", "mercury", "venus", "mars", "jupiter", "saturn", "uranus", "neptune", "pluto", "ceres", "orcus", "haumea", "quaoar", "makemake", "gonggong", "eris", "sedna", "vesta", "pallas", "chiron", "pholus", "halley"];
|
|
51
|
+
}];
|
|
52
|
+
/**
|
|
53
|
+
* The `id` of one of the stages in `SUN_REGIONS`.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* import type { SunRegion } from "@johnmorrisdotca/wakusei-planets/space";
|
|
58
|
+
*
|
|
59
|
+
* const stage: SunRegion = "asteroid-belt";
|
|
60
|
+
* console.log(stage);
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export type SunRegion = (typeof SUN_REGIONS)[number]["id"];
|
|
64
|
+
/**
|
|
65
|
+
* The orbit lines of a stage as the space view draws them at `ms`: one line of points for each of its bodies, in the scene's unit (Earth radii from the Earth's centre) for the scale asked, from `planetOrbit`
|
|
66
|
+
* and the same mapping that places the bodies.
|
|
67
|
+
*
|
|
68
|
+
* @param region - The stage's `id`.
|
|
69
|
+
* @param mode - The scale.
|
|
70
|
+
* @param ms - The moment, in milliseconds since the Unix epoch.
|
|
71
|
+
* @param count - How many segments each orbit is cut into.
|
|
72
|
+
* @returns One line for each body of the stage.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* import { regionOrbits } from "@johnmorrisdotca/wakusei-planets/space";
|
|
77
|
+
*
|
|
78
|
+
* const lines = regionOrbits("inner-planets", "compressed", Date.UTC(2026, 10, 11));
|
|
79
|
+
* console.log(lines.length, lines[0]!.length);
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export declare function regionOrbits(region: SunRegion, mode: ScaleMode, ms: number, count?: number): Vec3[][];
|
|
83
|
+
/**
|
|
84
|
+
* The view that fits a region: the camera looks at `centre` along `forward` with `up` up (pass the view's own, so stepping out or in does not swing the picture), from the nearest distance at which every point
|
|
85
|
+
* of `orbits` is inside the picture with `margin` of its half width and height to spare (0.9 when left out). `reach` is how far the farthest point is from the centre: give it to the `TravelBody` of the
|
|
86
|
+
* centre so `travelPose` makes the move a straight pull back or push in.
|
|
87
|
+
*
|
|
88
|
+
* @param input - The centre's place, the orbit lines, the picture's width over its height, the direction to look along and its up, and optionally the field of view in degrees (35) and the margin.
|
|
89
|
+
* @returns The camera, and the region's `reach`.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* import { frameAt, placeSun, regionOrbits, regionView } from "@johnmorrisdotca/wakusei-planets/space";
|
|
94
|
+
*
|
|
95
|
+
* const ms = Date.UTC(2026, 10, 11);
|
|
96
|
+
* const sun = placeSun("compressed", frameAt(ms).sun);
|
|
97
|
+
* const view = regionView({ centre: sun, orbits: regionOrbits("outer-planets", "compressed", ms), aspect: 16 / 9, forward: [0, -0.6, -0.8], up: [0, 0.8, -0.6] });
|
|
98
|
+
* console.log(view.reach.toFixed(0), view.fov);
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export declare function regionView(input: {
|
|
102
|
+
centre: Vec3;
|
|
103
|
+
orbits: readonly (readonly Vec3[])[];
|
|
104
|
+
aspect: number;
|
|
105
|
+
forward: Vec3;
|
|
106
|
+
up: Vec3;
|
|
107
|
+
fov?: number;
|
|
108
|
+
margin?: number;
|
|
109
|
+
}): TravelView & {
|
|
110
|
+
reach: number;
|
|
111
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { cross, dot, length, sub, unit } from "../vec.js";
|
|
2
|
+
import { frameAt, planetOrbit, SPACE_DWARFS, SPACE_MINORS, SPACE_PLANETS } from "./frame.js";
|
|
3
|
+
import { placeAround, placeSun } from "./scale.js";
|
|
4
|
+
/**
|
|
5
|
+
* The stages a view steps out through from the Sun, nearest first: each has an `id`, a name in English and Japanese for a button or a step, and the bodies whose orbits make it. The inner planets are Mercury
|
|
6
|
+
* to Mars; the asteroid belt is Vesta, Ceres and Pallas, whose orbits reach its outer edge; the outer planets are Jupiter to Neptune; the Kuiper belt is Pluto and the dwarf planets out to Eris; the whole
|
|
7
|
+
* system is every orbit the space view draws, Sedna's and Halley's among them.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { SUN_REGIONS } from "@johnmorrisdotca/wakusei-planets/space";
|
|
12
|
+
*
|
|
13
|
+
* console.log(SUN_REGIONS.map((region) => `${region.id}: ${region.name.en} / ${region.name.ja}`).join("\n"));
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export const SUN_REGIONS = [
|
|
17
|
+
{ id: "inner-planets", name: { en: "Inner planets", ja: "内太陽系" }, bodies: ["mercury", "venus", "earth", "mars"] },
|
|
18
|
+
{ id: "asteroid-belt", name: { en: "Asteroid belt", ja: "小惑星帯" }, bodies: ["vesta", "ceres", "pallas"] },
|
|
19
|
+
{ id: "outer-planets", name: { en: "Outer planets", ja: "外太陽系" }, bodies: ["jupiter", "saturn", "uranus", "neptune"] },
|
|
20
|
+
{ id: "kuiper-belt", name: { en: "Kuiper belt", ja: "カイパーベルト" }, bodies: ["pluto", "orcus", "haumea", "quaoar", "makemake", "gonggong", "eris"] },
|
|
21
|
+
{ id: "whole-system", name: { en: "Whole solar system", ja: "太陽系全体" }, bodies: ["earth", ...SPACE_PLANETS, ...SPACE_DWARFS, ...SPACE_MINORS] },
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* The orbit lines of a stage as the space view draws them at `ms`: one line of points for each of its bodies, in the scene's unit (Earth radii from the Earth's centre) for the scale asked, from `planetOrbit`
|
|
25
|
+
* and the same mapping that places the bodies.
|
|
26
|
+
*
|
|
27
|
+
* @param region - The stage's `id`.
|
|
28
|
+
* @param mode - The scale.
|
|
29
|
+
* @param ms - The moment, in milliseconds since the Unix epoch.
|
|
30
|
+
* @param count - How many segments each orbit is cut into.
|
|
31
|
+
* @returns One line for each body of the stage.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* import { regionOrbits } from "@johnmorrisdotca/wakusei-planets/space";
|
|
36
|
+
*
|
|
37
|
+
* const lines = regionOrbits("inner-planets", "compressed", Date.UTC(2026, 10, 11));
|
|
38
|
+
* console.log(lines.length, lines[0]!.length);
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export function regionOrbits(region, mode, ms, count = 96) {
|
|
42
|
+
const sun = placeSun(mode, frameAt(ms).sun);
|
|
43
|
+
const bodies = SUN_REGIONS.find((entry) => entry.id === region).bodies;
|
|
44
|
+
return bodies.map((id) => planetOrbit(id, ms, count).map((p) => placeAround(mode, sun, p)));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The view that fits a region: the camera looks at `centre` along `forward` with `up` up (pass the view's own, so stepping out or in does not swing the picture), from the nearest distance at which every point
|
|
48
|
+
* of `orbits` is inside the picture with `margin` of its half width and height to spare (0.9 when left out). `reach` is how far the farthest point is from the centre: give it to the `TravelBody` of the
|
|
49
|
+
* centre so `travelPose` makes the move a straight pull back or push in.
|
|
50
|
+
*
|
|
51
|
+
* @param input - The centre's place, the orbit lines, the picture's width over its height, the direction to look along and its up, and optionally the field of view in degrees (35) and the margin.
|
|
52
|
+
* @returns The camera, and the region's `reach`.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* import { frameAt, placeSun, regionOrbits, regionView } from "@johnmorrisdotca/wakusei-planets/space";
|
|
57
|
+
*
|
|
58
|
+
* const ms = Date.UTC(2026, 10, 11);
|
|
59
|
+
* const sun = placeSun("compressed", frameAt(ms).sun);
|
|
60
|
+
* const view = regionView({ centre: sun, orbits: regionOrbits("outer-planets", "compressed", ms), aspect: 16 / 9, forward: [0, -0.6, -0.8], up: [0, 0.8, -0.6] });
|
|
61
|
+
* console.log(view.reach.toFixed(0), view.fov);
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export function regionView(input) {
|
|
65
|
+
const forward = unit(input.forward);
|
|
66
|
+
const lifted = sub(input.up, [forward[0] * dot(input.up, forward), forward[1] * dot(input.up, forward), forward[2] * dot(input.up, forward)]);
|
|
67
|
+
const up = unit(length(lifted) < 1e-9 ? cross(Math.abs(forward[1]) < 0.9 ? cross(forward, [0, 1, 0]) : cross(forward, [1, 0, 0]), forward) : lifted);
|
|
68
|
+
const right = cross(forward, up);
|
|
69
|
+
const fov = input.fov ?? 35;
|
|
70
|
+
const margin = input.margin ?? 0.9;
|
|
71
|
+
const tv = Math.tan((fov / 2) * (Math.PI / 180)) * margin;
|
|
72
|
+
const th = tv * Math.max(1e-3, input.aspect);
|
|
73
|
+
let distance = 0;
|
|
74
|
+
let reach = 0;
|
|
75
|
+
for (const line of input.orbits) {
|
|
76
|
+
for (const point of line) {
|
|
77
|
+
const v = sub(point, input.centre);
|
|
78
|
+
reach = Math.max(reach, length(v));
|
|
79
|
+
// the camera is `distance` back along the line of sight: the point is inside when its offset across and up is within the frame at its depth
|
|
80
|
+
distance = Math.max(distance, Math.abs(dot(v, right)) / th - dot(v, forward), Math.abs(dot(v, up)) / tv - dot(v, forward));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return { position: [input.centre[0] - forward[0] * distance, input.centre[1] - forward[1] * distance, input.centre[2] - forward[2] * distance], forward, up, fov, reach };
|
|
84
|
+
}
|
package/dist/space/scene.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ import { type OrbitArrow } from "./arrows.ts";
|
|
|
10
10
|
import { type SpaceFrame, type SpaceVec3 } from "./frame.ts";
|
|
11
11
|
import { type RideLook } from "./ride.ts";
|
|
12
12
|
import { type ScaleMode } from "./scale.ts";
|
|
13
|
+
import { type SunRegion } from "./regions.ts";
|
|
14
|
+
import { type TravelInput, type TravelKind, type TravelPlan } from "./travel.ts";
|
|
13
15
|
/** The parts of three.js the space view uses: the bodies' and a perspective camera. */
|
|
14
16
|
export type SpaceThree = ThreeParts & Pick<typeof THREE, "PerspectiveCamera">;
|
|
15
17
|
/** The camera's distance, in radii of the body it looks at, at which that body fills the view at zoom 1. */
|
|
@@ -97,6 +99,34 @@ export interface CameraPose {
|
|
|
97
99
|
fov: number;
|
|
98
100
|
valid: boolean;
|
|
99
101
|
}
|
|
102
|
+
/** The Roadster's path as the view needs it: from `/roadster`, loaded only when the Roadster is shown. */
|
|
103
|
+
export interface RoadsterPath {
|
|
104
|
+
/** Where the car is at a moment, in au from the Sun, ecliptic J2000 axes. */
|
|
105
|
+
positionAu(ms: number): Vec3;
|
|
106
|
+
/** The span the path covers, in milliseconds since 1970. */
|
|
107
|
+
record: {
|
|
108
|
+
start: number;
|
|
109
|
+
end: number;
|
|
110
|
+
};
|
|
111
|
+
/** The car's name, in English and Japanese. */
|
|
112
|
+
name: {
|
|
113
|
+
en: string;
|
|
114
|
+
ja: string;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/** The orbiters as the view needs them: from `/orbiters`, loaded only when they are shown. */
|
|
118
|
+
export interface OrbiterSet {
|
|
119
|
+
ids: readonly string[];
|
|
120
|
+
centre(id: string): "moon" | "mars";
|
|
121
|
+
/** Kilometres from the body's centre, ecliptic J2000; `null` for a craft with no path. */
|
|
122
|
+
position(id: string, ms: number): Vec3 | null;
|
|
123
|
+
path(id: string, ms: number, points: number): Vec3[];
|
|
124
|
+
status(id: string, ms: number): "tracked" | "predicted" | "modelled" | "none";
|
|
125
|
+
name(id: string): {
|
|
126
|
+
en: string;
|
|
127
|
+
ja: string;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
100
130
|
export interface SpaceModel {
|
|
101
131
|
/** Moment shown, milliseconds since the epoch. */
|
|
102
132
|
time: number;
|
|
@@ -121,6 +151,8 @@ export interface SpaceModel {
|
|
|
121
151
|
labels: boolean;
|
|
122
152
|
/** Milliseconds of game time one second of wall time covers (the ephemeris is looked up once per such span). */
|
|
123
153
|
stepMs: number;
|
|
154
|
+
/** Game seconds for each second of wall time, with its sign (0 when the clock holds): the places a move is worked out for are those the clock reaches by its end. */
|
|
155
|
+
speed: number;
|
|
124
156
|
/** The body the camera looks at, and (in `zoom`) fills the view with at 1x: any body the package knows that the view can place (the eleven of `SPACE_BODIES` and the moons of the planets). */
|
|
125
157
|
focus: BodyId;
|
|
126
158
|
light: SpaceLight;
|
|
@@ -159,6 +191,23 @@ export interface SpaceModel {
|
|
|
159
191
|
helpThrough: boolean;
|
|
160
192
|
/** How many arrowheads each orbit line carries: 0 to `MAX_ARROWS_PER_ORBIT`, two by default. */
|
|
161
193
|
arrowCount: number;
|
|
194
|
+
/** Show the spacecraft in orbit round the Moon and Mars: a dot each on its orbit line, named, once its body is big enough on the screen. Off by default; their paths are loaded when first shown. */
|
|
195
|
+
orbiters: boolean;
|
|
196
|
+
orbiterSet: OrbiterSet | null;
|
|
197
|
+
/** The orbiters at the last draw: how many were drawn, and each drawn one's status. */
|
|
198
|
+
orbitersDrawn: {
|
|
199
|
+
count: number;
|
|
200
|
+
status: Record<string, "tracked" | "predicted" | "modelled" | "none">;
|
|
201
|
+
};
|
|
202
|
+
/** Show Starman and the Roadster: a small marked body on its orbit line, named. Off by default; its path is loaded when it is first shown. */
|
|
203
|
+
roadster: boolean;
|
|
204
|
+
roadsterPath: RoadsterPath | null;
|
|
205
|
+
/** What the Roadster drew at the last draw: whether it was drawn (shown, its path in, and the moment within the record), its place in Earth radii from the Earth's centre, and its radius on the screen. */
|
|
206
|
+
roadsterDrawn: {
|
|
207
|
+
shown: boolean;
|
|
208
|
+
position: [number, number, number] | null;
|
|
209
|
+
radiusPx: number;
|
|
210
|
+
};
|
|
162
211
|
/** The name written on each body's globe, or null for none; `labelVersion` goes up whenever it (or the language) changes, so each body is told once. */
|
|
163
212
|
label: PaintLabel | null;
|
|
164
213
|
labelVersion: number;
|
|
@@ -212,21 +261,63 @@ export interface SpaceModel {
|
|
|
212
261
|
ride: RideState | null;
|
|
213
262
|
/** Set at each draw: the target of the ride could not be placed, so the ordinary camera was used. */
|
|
214
263
|
rideLost: boolean;
|
|
215
|
-
/** A camera move in progress from where the last draw left
|
|
216
|
-
transition:
|
|
217
|
-
|
|
264
|
+
/** A camera move in progress from where the last draw left the camera to the view set up for the new target: see `SpaceTransition`. */
|
|
265
|
+
transition: SpaceTransition | null;
|
|
266
|
+
/** What the move is doing at this draw, or null when the camera is still: the kind and path of the move, its stage, how far along it is (0 to 1), its length, and whether the body left and the one gone to are in the picture. */
|
|
267
|
+
travelling: {
|
|
268
|
+
kind: Exclude<TravelKind, "auto">;
|
|
269
|
+
path: TravelPlan["path"];
|
|
270
|
+
stage: "turn" | "travel" | "arrive";
|
|
271
|
+
progress: number;
|
|
218
272
|
duration: number;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
273
|
+
leaving: boolean;
|
|
274
|
+
destination: boolean;
|
|
275
|
+
} | null;
|
|
276
|
+
/** The stage out from the Sun the view is framed on (`SUN_REGIONS`), or null for an ordinary view of the body looked at. */
|
|
277
|
+
region: SunRegion | null;
|
|
278
|
+
/** The region as the last draw framed it: how far out it reaches from the Sun and how far the camera stood back, in Earth radii. */
|
|
279
|
+
regionDrawn: {
|
|
280
|
+
id: SunRegion;
|
|
281
|
+
reach: number;
|
|
282
|
+
distance: number;
|
|
224
283
|
} | null;
|
|
225
284
|
pose: CameraPose;
|
|
226
285
|
/** Pixels a game-second that riding makes things move on the screen (0 when not riding): the draw rate follows it. */
|
|
227
286
|
rideMotion: number;
|
|
228
287
|
ratio(): number;
|
|
229
288
|
}
|
|
289
|
+
/**
|
|
290
|
+
* A camera move from one view to the next, as the element asks for it: when it began (ms of the page's clock), the length a page asked for (0 to take the plan's own), the pace, the kind of move, where the
|
|
291
|
+
* last draw left the camera, and the body being left and the one gone to (for the path to keep in the picture; null when unknown). The scene builds the path at the move's first draw (`input`, `plan`), from
|
|
292
|
+
* that camera to the view it has just set up for the new target, and then draws `travelPose` of it until the move is over.
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* ```ts no-run
|
|
296
|
+
* import type { SpaceTransition } from "@johnmorrisdotca/wakusei-planets/space/scene";
|
|
297
|
+
*
|
|
298
|
+
* const describe = (move: SpaceTransition): string => `${move.kind} from ${move.leaving ?? "?"} to ${move.destination ?? "?"}`;
|
|
299
|
+
* console.log(typeof describe);
|
|
300
|
+
* ```
|
|
301
|
+
*/
|
|
302
|
+
export interface SpaceTransition {
|
|
303
|
+
start: number;
|
|
304
|
+
duration: number;
|
|
305
|
+
pace: number;
|
|
306
|
+
kind: TravelKind;
|
|
307
|
+
from: {
|
|
308
|
+
p: SpaceVec3;
|
|
309
|
+
q: [number, number, number, number];
|
|
310
|
+
fov: number;
|
|
311
|
+
};
|
|
312
|
+
leaving: BodyId | null;
|
|
313
|
+
destination: BodyId | null;
|
|
314
|
+
/** How far the region being left reached from the Sun, when the move leaves a stage out from the Sun (a straight push in or pull back then). */
|
|
315
|
+
leavingReach: number;
|
|
316
|
+
input: TravelInput | null;
|
|
317
|
+
plan: TravelPlan | null;
|
|
318
|
+
/** The scene's origin (the place of the body looked at) when the path was worked out: the path is in places relative to it. */
|
|
319
|
+
origin: Vec3;
|
|
320
|
+
}
|
|
230
321
|
export declare const newSpaceModel: () => SpaceModel;
|
|
231
322
|
/**
|
|
232
323
|
* Where a body is on the screen: its centre and its apparent radius, in CSS pixels in the box.
|