@johnmorrisdotca/uchusen-rockets 0.10.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 +18 -4
- package/README.md +3 -2
- package/dist/beside.d.ts +76 -0
- package/dist/beside.js +83 -0
- package/dist/build/index.d.ts +9 -2
- package/dist/build/index.js +49 -23
- package/dist/build/lineup.d.ts +39 -1
- package/dist/build/lineup.js +70 -3
- package/dist/data/sources.d.ts +8 -0
- package/dist/data/sources.js +1 -0
- package/dist/data/types.d.ts +4 -0
- package/dist/element/scene.d.ts +5 -0
- package/dist/element/scene.js +62 -16
- package/dist/element.d.ts +2 -0
- package/dist/element.js +14 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/journey/bodies.d.ts +47 -0
- package/dist/journey/bodies.js +2 -0
- package/dist/journey/constants.d.ts +115 -0
- package/dist/journey/constants.js +134 -0
- package/dist/journey/countdown.d.ts +49 -0
- package/dist/journey/countdown.js +56 -0
- package/dist/journey/crafts.d.ts +165 -0
- package/dist/journey/crafts.js +141 -0
- package/dist/journey/index.d.ts +11 -0
- package/dist/journey/index.js +8 -0
- package/dist/journey/physics.d.ts +114 -0
- package/dist/journey/physics.js +154 -0
- package/dist/journey/timeline.d.ts +115 -0
- package/dist/journey/timeline.js +193 -0
- package/dist/journey/trip.d.ts +213 -0
- package/dist/journey/trip.js +452 -0
- package/dist/journey/words.d.ts +96 -0
- package/dist/journey/words.js +144 -0
- package/dist/rockets.js +11 -2
- package/package.json +7 -1
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",
|
|
@@ -54,6 +54,11 @@
|
|
|
54
54
|
"import": "./dist/build/index.js",
|
|
55
55
|
"default": "./dist/build/index.js"
|
|
56
56
|
},
|
|
57
|
+
"./journey": {
|
|
58
|
+
"types": "./dist/journey/index.d.ts",
|
|
59
|
+
"import": "./dist/journey/index.js",
|
|
60
|
+
"default": "./dist/journey/index.js"
|
|
61
|
+
},
|
|
57
62
|
"./element": {
|
|
58
63
|
"types": "./dist/element.d.ts",
|
|
59
64
|
"import": "./dist/element.js",
|
|
@@ -126,6 +131,7 @@
|
|
|
126
131
|
"@gltf-transform/functions": "4.5.1",
|
|
127
132
|
"@johnmorrisdotca/chikyu-earth": "0.10.0",
|
|
128
133
|
"@johnmorrisdotca/kazoku-ui": "^0.15.1",
|
|
134
|
+
"@johnmorrisdotca/wakusei-planets": "0.15.0",
|
|
129
135
|
"@playwright/test": "1.64.0",
|
|
130
136
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
131
137
|
"@types/node": "24.10.1",
|