@johnmorrisdotca/uchusen-rockets 0.11.0 → 0.12.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 +8 -0
- package/dist/data/types.d.ts +4 -0
- package/dist/journey/crafts.js +1 -2
- package/dist/journey/trip.js +8 -3
- package/dist/rockets.js +11 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.12.0] - 2026-11-05
|
|
6
|
+
|
|
7
|
+
Tilt up to 90 degrees for craft in space, and journey mode fixes.
|
|
8
|
+
|
|
9
|
+
- **Tilt up to 90 degrees for craft in space** (MODULES-430): each variant has `view.tiltMax`, 90 for the SPX fleet, the ISS, Hubble, Dragon, Gemini, Mercury, the lunar module and Apollo-Soyuz, and 45 for rockets and sites on the ground (it stopped at about 20 before). The demo gives it to the view controls' `tilt-max`, so the slider, the drag and `?tilt=` follow the craft chosen, and a tip beyond the new limit is brought back to it when a rocket is chosen. The camera stays held at 87 degrees, so there is no flip, and Fit still frames the whole craft. Tests: `test/tilt-max.test.ts`, `e2e/tilt-max.demo.ts`.
|
|
10
|
+
- **Journey mode fixes**: after separation the side view shows the payload itself (Orion for SLS, Cargo Dragon for Falcon Heavy) instead of the fairing dropped in ascent; a payload with no braking engine of its own flies past its target (verdict "Flyby only", no braking burn, fuel n/a with the reason) instead of braking at an assumed 0.2 g; Japanese lists in the numbers panel use 「、」.
|
|
11
|
+
- Test only: the fleet walk and the GPU counts in the freeze tests wait for each ship to draw before they read, so a slow runner no longer reads a count from before the new ship is in.
|
|
12
|
+
|
|
5
13
|
## [0.11.0] - 2026-11-04
|
|
6
14
|
|
|
7
15
|
Journey mode (Earth to the Moon and the planets) and real craft for scale beside the SPX fleet.
|
package/dist/data/types.d.ts
CHANGED
|
@@ -189,4 +189,8 @@ export interface Variant {
|
|
|
189
189
|
lineupView?: "back" | "side";
|
|
190
190
|
/** The panel that goes with the viewer: sections, specification, notes and insets. */
|
|
191
191
|
inspector?: Inspector;
|
|
192
|
+
/** How the viewer's controls may move it. `tiltMax` is the most the view may be tipped up or down, in degrees: 90 for a craft in space, 45 for a rocket on the ground. */
|
|
193
|
+
view?: {
|
|
194
|
+
tiltMax: number;
|
|
195
|
+
};
|
|
192
196
|
}
|
package/dist/journey/crafts.js
CHANGED
|
@@ -78,7 +78,6 @@ export const CRAFTS = [
|
|
|
78
78
|
payload: {
|
|
79
79
|
name: "A spacecraft of the Mars-transfer payload mass",
|
|
80
80
|
massKg: { value: 16_800, source: "wikipedia-falcon-heavy", note: "The Mars figure." },
|
|
81
|
-
brakeG: { value: 0.2, source: null, estimate: "The article names no spacecraft, so no engine: 0.2 g is a typical figure for a storable-propellant main engine on a craft of this mass." },
|
|
82
81
|
},
|
|
83
82
|
ascentS: ascentEstimate(540),
|
|
84
83
|
flipS: { value: 120, source: null, estimate: "The turn before a braking burn is taken as two minutes." },
|
|
@@ -86,7 +85,7 @@ export const CRAFTS = [
|
|
|
86
85
|
stages: {
|
|
87
86
|
launch: { rocket: "falcon-heavy", variant: "falcon-heavy", slots: null, name: "Falcon Heavy" },
|
|
88
87
|
upper: { rocket: "falcon-9", variant: "block-5", slots: ["second-stage", "fairing"], name: "Upper stage with its payload" },
|
|
89
|
-
payload: { rocket: "
|
|
88
|
+
payload: { rocket: "dragon", variant: "cargo-dragon-2", slots: ["capsule", "trunk"], name: "Payload (illustrated by Cargo Dragon)" },
|
|
90
89
|
},
|
|
91
90
|
},
|
|
92
91
|
{
|
package/dist/journey/trip.js
CHANGED
|
@@ -241,9 +241,10 @@ function planBallistic(source, craft, from, to, departMs) {
|
|
|
241
241
|
const payload = craft.payload;
|
|
242
242
|
const thrust = quantity(payload.thrustN, "braking engine thrust", estimated);
|
|
243
243
|
const mass = quantity(payload.massKg, "payload mass", estimated);
|
|
244
|
-
const brakeG = thrust !== null && mass !== null ? thrust / mass / G0 : quantity(payload.brakeG, "braking acceleration", estimated)
|
|
244
|
+
const brakeG = thrust !== null && mass !== null ? thrust / mass / G0 : quantity(payload.brakeG, "braking acceleration", estimated);
|
|
245
|
+
const noEngine = brakeG === null || brakeG <= 0;
|
|
245
246
|
const dvAvailable = payload.dvMs?.value ?? null;
|
|
246
|
-
const flyby = dvAvailable !== null && dvAvailable < dv2 * 1000;
|
|
247
|
+
const flyby = noEngine || (dvAvailable !== null && dvAvailable < dv2 * 1000);
|
|
247
248
|
const ascentS = quantity(craft.ascentS, "time to orbit", estimated) ?? 540;
|
|
248
249
|
let burnS = quantity(craft.departureBurnS, "departure burn length", estimated);
|
|
249
250
|
if (burnS === null) {
|
|
@@ -285,7 +286,11 @@ function planBallistic(source, craft, from, to, departMs) {
|
|
|
285
286
|
const peakG = Math.max((dv1 * 1000) / burnS / G0, flyby ? 0 : brakeG);
|
|
286
287
|
let verdict;
|
|
287
288
|
const because = [verdictCap.line];
|
|
288
|
-
if (
|
|
289
|
+
if (noEngine) {
|
|
290
|
+
const line = "Flyby only: no braking engine is specified for the payload.";
|
|
291
|
+
verdict = { level: "flyby", line, because, playable: true };
|
|
292
|
+
}
|
|
293
|
+
else if (flyby) {
|
|
289
294
|
because.push(`${payload.name} can change its speed by ${Math.round(dvAvailable).toLocaleString("en-US")} m/s; stopping at ${stopName(source, to)} needs ${Math.round(dv2 * 1000).toLocaleString("en-US")} m/s.`);
|
|
290
295
|
verdict = { level: "flyby", line: `Flyby only: not enough fuel on board to stop at ${stopName(source, to)} (${Math.round(dv2 * 1000).toLocaleString("en-US")} m/s needed, ${Math.round(dvAvailable).toLocaleString("en-US")} m/s on board).`, because, playable: true };
|
|
291
296
|
}
|
package/dist/rockets.js
CHANGED
|
@@ -24,6 +24,15 @@ import { STARSHIP_VARIANTS } from "./data/starship.js";
|
|
|
24
24
|
import { FLEET_KIT_ROCKETS, FLEET_SLOT_NAMES } from "./data/fleet.js";
|
|
25
25
|
import { ARIAKE_VARIANTS, SHIP_03_INSET_ROCKET, SHIP_03_SLOT_NAMES, SHIP_03_VARIANTS } from "./data/ship-03.js";
|
|
26
26
|
import { MADE_BY } from "./data/makers.js";
|
|
27
|
+
/** Craft that fly in space: seen from any side, from straight above or below. Everything else stands on the ground or the sea, and keeps the ground in view. */
|
|
28
|
+
const IN_SPACE = new Set(["dragon", "lunar-module", "apollo-soyuz", "gemini", "mercury", "iss", "hubble"]);
|
|
29
|
+
/** Gives each variant its `view.tiltMax`: 90 degrees for a craft in space and the fleet, 45 for the rest. */
|
|
30
|
+
function withTilt(rockets) {
|
|
31
|
+
return Object.fromEntries(Object.entries(rockets).map(([id, rocket]) => {
|
|
32
|
+
const tiltMax = IN_SPACE.has(id) || id in FLEET_KIT_ROCKETS || id.startsWith("fleet-") ? 90 : 45;
|
|
33
|
+
return [id, { ...rocket, variants: rocket.variants.map((variant) => ({ ...variant, view: { tiltMax } })) }];
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
27
36
|
/**
|
|
28
37
|
* Every rocket that has a shape, by id, each with its variants. Add a rocket here and the element, the drawing, the fit check and the demo all read it.
|
|
29
38
|
*
|
|
@@ -34,7 +43,7 @@ import { MADE_BY } from "./data/makers.js";
|
|
|
34
43
|
* console.log(Object.keys(ROCKETS).slice(0, 6));
|
|
35
44
|
* ```
|
|
36
45
|
*/
|
|
37
|
-
export const ROCKETS = {
|
|
46
|
+
export const ROCKETS = withTilt({
|
|
38
47
|
starship: { id: "starship", name: "Starship", status: "built", ...MADE_BY["starship"], variants: STARSHIP_VARIANTS, defaultVariant: "v3" },
|
|
39
48
|
"falcon-9": { id: "falcon-9", name: "Falcon 9", status: "built", ...MADE_BY["falcon-9"], variants: FALCON_9_VARIANTS, defaultVariant: "block-5" },
|
|
40
49
|
"falcon-heavy": { id: "falcon-heavy", name: "Falcon Heavy", status: "built", ...MADE_BY["falcon-heavy"], variants: FALCON_HEAVY_VARIANTS, defaultVariant: "falcon-heavy" },
|
|
@@ -63,7 +72,7 @@ export const ROCKETS = {
|
|
|
63
72
|
"fleet-insets-ship-03": { id: "fleet-insets-ship-03", name: SHIP_03_INSET_ROCKET.name, status: "built", ...MADE_BY["fleet-ship-03"], variants: SHIP_03_INSET_ROCKET.variants, defaultVariant: SHIP_03_INSET_ROCKET.variants[0].id },
|
|
64
73
|
"fleet-02": { id: "fleet-02", name: "ISV 加美鳴 (かみなり) Kaminari, SPX-207", status: "built", ...MADE_BY["fleet-02"], variants: SHIP_02_VARIANTS, defaultVariant: "fleet-02" },
|
|
65
74
|
starbase: { id: "starbase", name: "Starbase", status: "built", ...MADE_BY["starbase"], variants: STARBASE_VARIANTS, defaultVariant: "launch-site" },
|
|
66
|
-
};
|
|
75
|
+
});
|
|
67
76
|
const fig = (value, source) => ({ value, source });
|
|
68
77
|
/**
|
|
69
78
|
* Rockets with sourced facts and no shape yet.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnmorrisdotca/uchusen-rockets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Uchusen Rockets 宇宙船: line drawings and 3D views of rockets, as a web component. Every variant with its own sourced sizes, a typed way to assemble a rocket from parts, stack and separate. No logos. three.js is a peer dependency.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rocket",
|