@johnmorrisdotca/uchusen-rockets 0.4.0 → 0.5.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 +15 -0
- package/NOTICE.md +2 -0
- package/README.md +78 -3
- package/dist/assets/droneship-asog-landed.glb +0 -0
- package/dist/assets/droneship-asog.glb +0 -0
- package/dist/assets/droneship-jrti-landed.glb +0 -0
- package/dist/assets/droneship-jrti.glb +0 -0
- package/dist/assets/droneship-ocisly-landed.glb +0 -0
- package/dist/assets/droneship-ocisly.glb +0 -0
- package/dist/assets/falcon-9-block-5-dragon-2-first-stage.glb +0 -0
- package/dist/assets/falcon-9-block-5-dragon-2.glb +0 -0
- package/dist/assets/falcon-9-block-5-first-stage.glb +0 -0
- package/dist/assets/falcon-9-block-5.glb +0 -0
- package/dist/assets/falcon-9-ft-first-stage.glb +0 -0
- package/dist/assets/falcon-9-ft.glb +0 -0
- package/dist/assets/falcon-9-v1.1-first-stage.glb +0 -0
- package/dist/assets/falcon-9-v1.1.glb +0 -0
- package/dist/assets/falcon-heavy-falcon-heavy-centre.glb +0 -0
- package/dist/assets/falcon-heavy-falcon-heavy-side-left.glb +0 -0
- package/dist/assets/falcon-heavy-falcon-heavy-side-right.glb +0 -0
- package/dist/assets/falcon-heavy-falcon-heavy.glb +0 -0
- package/dist/assets/landing-zone-lz-1-landed.glb +0 -0
- package/dist/assets/landing-zone-lz-1.glb +0 -0
- package/dist/assets/landing-zone-lz-4-landed.glb +0 -0
- package/dist/assets/landing-zone-lz-4.glb +0 -0
- package/dist/assets/launch-tower-catch-booster.glb +0 -0
- package/dist/assets/launch-tower-catch.glb +0 -0
- package/dist/assets/launch-tower-stack-booster.glb +0 -0
- package/dist/assets/launch-tower-stack-ship.glb +0 -0
- package/dist/assets/launch-tower-stack.glb +0 -0
- package/dist/assets/starship-2019.glb +0 -0
- package/dist/assets/starship-v1-booster.glb +0 -0
- package/dist/assets/starship-v1-flight1-booster.glb +0 -0
- package/dist/assets/starship-v1-flight1-ship.glb +0 -0
- package/dist/assets/starship-v1-flight1.glb +0 -0
- package/dist/assets/starship-v1-ship.glb +0 -0
- package/dist/assets/starship-v1.glb +0 -0
- package/dist/assets/starship-v2-booster.glb +0 -0
- package/dist/assets/starship-v2-ship.glb +0 -0
- package/dist/assets/starship-v2.glb +0 -0
- package/dist/assets/starship-v3-booster.glb +0 -0
- package/dist/assets/starship-v3-ship.glb +0 -0
- package/dist/assets/starship-v3.glb +0 -0
- package/dist/assets/starship-v4-booster.glb +0 -0
- package/dist/assets/starship-v4-ship.glb +0 -0
- package/dist/assets/starship-v4.glb +0 -0
- package/dist/build/glb.js +15 -7
- package/dist/build/index.d.ts +5 -0
- package/dist/build/index.js +16 -3
- package/dist/data/flights.d.ts +7 -0
- package/dist/data/flights.js +160 -13
- package/dist/data/propellants.d.ts +59 -0
- package/dist/data/propellants.js +43 -0
- package/dist/data/sources.d.ts +70 -0
- package/dist/data/sources.js +9 -0
- package/dist/draw/plume.d.ts +10 -1
- package/dist/draw/plume.js +15 -5
- package/dist/element/plumes.d.ts +7 -8
- package/dist/element/plumes.js +36 -21
- package/dist/element/scene.js +30 -5
- package/dist/element.js +3 -2
- package/dist/flight.d.ts +2 -0
- package/dist/flight.js +8 -1
- package/dist/flightbar.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/model/falcon.js +2 -2
- package/dist/model/moves.d.ts +36 -0
- package/dist/model/moves.js +70 -0
- package/dist/model/pieces.d.ts +31 -0
- package/dist/model/pieces.js +51 -9
- package/dist/model/starship.d.ts +6 -3
- package/dist/model/starship.js +12 -7
- package/dist/react.d.ts +2 -2
- package/package.json +18 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.5.0] - 2026-11-03
|
|
6
|
+
|
|
7
|
+
- Flights for the other variants, each from a page read for it and with a blank where the page gives none: Starship flight test 1 (Block 1 as it first flew: the stages never separated, and the stack was destroyed at T+4:01), Falcon 9 v1.1 with CASSIOPE (Spaceflight Now's live coverage), Falcon 9 Full Thrust with ABS-2A and Eutelsat 117 West B (Spaceflight Now's timeline; Wikipedia's ABS-2A names the version) and Grasshopper's highest hop (744 m in 79 s, Wikipedia's table of its hops). Not here: Falcon 9 v1.0 (no page read gives a v1.0 flight with a fairing), Starship Block 4 (not flown) and Dragon on its own (no timeline read); they stay without a flight.
|
|
8
|
+
- Altitude and speed in the flights, only where a page gives one, in its words: flight test 1's 39 km and 29 km, 146 km on flight test 7, 195 km on flight test 12 and its booster's 1,450 km/h at the water, CASSIOPE's "more than 20 miles" and "310 kilometers", "Mach 1" on the Full Thrust flight, CRS-16's planned orbit and Grasshopper's 744 m. The flight bar shows a speed beside the altitude.
|
|
9
|
+
- Grid fins, legs and flaps turn in a flight. Each is a group of pieces with a name, a pivot and an axis (`Piece.move`), a node of its own in the `.glb` (`booster~grid-fins~0`, with its axis), turned in the 3D view by setting one rotation and in the drawing by `moved` (`svg({ moves })`); `PartPose.moves` carries the angles a phase wants and `frameAt` mixes them. Falcon 9's grid fins are stowed for the ascent and open for the entry and its legs open before the touchdown, Super Heavy's fins steer after the boostback, the Ship's flaps turn at its entry and flip (the pages say each; how far is a picture). A painted model that is one shell does not turn: nothing is cut to fake a move. No new draw loop: a turn is set inside the flight's one frame, and the number of nodes, buffers and programs is the same each time (the freeze test holds it).
|
|
10
|
+
|
|
11
|
+
- The family's must-have list passes (`node scripts/check-standard.mjs` says ok, and a test holds the file to its recorded hash): the demo is made with the family's header and footer (the language picker and the theme switch, Docs and Embed links, light and dark), the family's template and README writer list this package, the README has "The family", and the documentation site has its recorded-hash test and its browser test.
|
|
12
|
+
- Usage, written and tested: `examples/` holds a script tag from jsDelivr and from unpkg, an iframe of the embed page, Vite, webpack, React (with a server render), Vue, Svelte, Angular, TypeScript and Node, and `pnpm test:usage` builds, type-checks or runs each against the package as npm packs it and opens each page in a browser, which must draw the rocket and reach its 3D view. CI runs it, and the guides hold each file word for word. Two new guides, Bundlers and CDNs and TypeScript and Node, each with a Japanese twin (the Japanese awaits a native reader).
|
|
13
|
+
- A flame's colour comes from what its engine burns, each from a page read for it: `PROPELLANTS` and `propellantOf` (Merlin, Kestrel, F-1, Rutherford and the RD-107 and RD-108 burn kerosene; Raptor and BE-4 methane; J-2, RS-25 and BE-3 hydrogen; the Space Shuttle's boosters and the SLS's are solid; the lunar module's descent engine burns Aerozine 50 and nitrogen tetroxide). Before, any rocket with a Starship part had a methane flame and every other rocket a kerosene one, so Saturn V, the Space Shuttle, SLS, New Glenn and Soyuz were drawn as burning kerosene. A part with an engine no page read here names, such as the ship of the 2019 design and of Block 4, has a neutral grey-white flame. Each part has its own, in the drawing and the 3D view (`BuiltPart.flame`), and a Space Shuttle's orbiter and boosters burn two colours at once. No new draw: the flames of a kind share one program and one set of clocks, and the freeze test passes. The colours are a picture.
|
|
14
|
+
- Fixed: the import map in the README and in the Getting started guide named `three` only, but the 3D view also imports `three/addons/` (its loaders and controls), so a page copied from them drew the line picture and never the 3D view. Both now name `three/addons/`, as the snippet the demo copies always did. `pnpm test:usage` found it.
|
|
15
|
+
- WebKit's "Refused to apply a stylesheet" errors, which the demo test had been told to ignore, are gone and the ignore is removed. They came from the demo page's Content-Security-Policy after the page lost its style hash (chikyu-earth 0.10's realistic Earth then fell back to a style tag the policy refused). The page has no policy of its own now, because the family's header writes a script and a style, so there is nothing to refuse; the embed page and the code builder keep the strict policy (`style-src 'self'`, no inline style), and a browser test holds that they run under it with no report, in Chromium and in WebKit on CI.
|
|
16
|
+
- Documentation: the family's docs-site files of 2026-11-03 (`scripts/docs-site.mjs`, `e2e/docs-site.demo.mjs`, held to their recorded hashes): the browser test reads a seeded sample of the pages and checks the links from the files, and every guide's picture is a real image (``, `../../images/` in Japanese) that the docs site publishes, in place of a link to the picture.
|
|
17
|
+
- Demo, at a desk's width: the family header is one row and the hint under the view is left out, so the choices and the view still end within a 900 px window; the line Earth is drawn in a shadow root of its own, so the family header's help switch does not wake for each of its redraws.
|
|
18
|
+
- Demo: the page itself is English; only the header and footer are in Japanese too. The page no longer carries a Content-Security-Policy of its own, because the family's header writes a script and a style; the embed page keeps its strict one.
|
|
19
|
+
|
|
5
20
|
## [0.4.0] - 2026-11-03
|
|
6
21
|
|
|
7
22
|
- Demo: the rocket, variant, parts, look and view (the From row) are kept in the address with the maker, the Earth and the view controls' choices, each at a default that leaves the address clean, so a link or a reload opens what was on the screen.
|
package/NOTICE.md
CHANGED
|
@@ -60,6 +60,8 @@ Sizes are plain facts, each with its source in `src/data/sources.ts` and on the
|
|
|
60
60
|
| Source | What was taken |
|
|
61
61
|
| --- | --- |
|
|
62
62
|
| Wikipedia: SpaceX Starship, SpaceX Super Heavy, SpaceX Starship (spacecraft), SpaceX Raptor, SpaceX Merlin, Starship flight test 1, List of Starship launches, Falcon 1, Falcon 9, Falcon 9 Block 5, Falcon Heavy, SpaceX Dragon 1, SpaceX Dragon 2, SpaceX Grasshopper (CC BY-SA 4.0, read 2026-10-31) | Heights, diameters (the vacuum Merlin's 3.3 m), engine counts, grid fin counts, flap changes, first flight dates in UTC. Facts only: no text is copied |
|
|
63
|
+
| Wikipedia: SpaceX Kestrel, Blue Origin BE-4, Blue Origin BE-3, Rutherford (rocket engine), RD-107, Space Launch System Solid Rocket Booster, ABS-2A, SpaceX Grasshopper, Starship flight test 1, 7 and 12, Falcon 9 first-stage landing tests, with the engine and booster pages already named above (CC BY-SA 4.0, read 2026-11-03) | What each engine burns, which flights have timelines and which parts the pages say turn, and the altitudes and speeds they give. Facts only: no text is copied beyond the short quotation in a figure's note |
|
|
64
|
+
| Spaceflight Now: the live coverage of the first Falcon 9 v1.1 launch (CASSIOPE) and the timeline for the launch for ABS and Eutelsat | The times of a launch's steps and the altitudes and speeds its page gives. Facts only |
|
|
63
65
|
| SpaceX's Starship page, https://new.spacex.com/vehicles/starship, as a search engine quoted it: the page itself would not load | Rounded heights, kept as a second opinion |
|
|
64
66
|
| SpaceX, Falcon 1 Launch Vehicle Payload User's Guide, Rev 7, 2008, read through the Internet Archive | Falcon 1's and Falcon 1e's heights and fairings. Facts only: no drawing is copied |
|
|
65
67
|
| Wikipedia: Saturn V, Apollo command and service module, Apollo (spacecraft), Saturn V instrument unit, Rocketdyne F-1, Rocketdyne J-2 (CC BY-SA 4.0, read 2026-11-02) | Saturn V's and the Apollo spacecraft's lengths and widths, and the engines' sizes. Facts only: no text is copied |
|
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ That is all a page needs with a bundler. The drawing shows at once; when the ele
|
|
|
55
55
|
- Twenty-three kinds of thing, from Starship to the Hubble Space Telescope, each in every variant a source documents, with its own sizes.
|
|
56
56
|
- Three looks (`line`, `thick`, `painted`), five views, together, apart and each part alone, for every one of them.
|
|
57
57
|
- A drawing made by code, and a 3D view that takes over without a jump. With no WebGL, under Save-Data or on any failure, the drawing stays.
|
|
58
|
-
- Lit engines at full thrust, and flights played phase by phase from published timelines.
|
|
58
|
+
- Lit engines at full thrust in the colour of what they burn, and flights played phase by phase from published timelines, with grid fins, legs and flaps that turn.
|
|
59
59
|
- `check` and `build`: a typed part record, a fit check, a `.glb` mesh and an SVG, in Node or a browser, with no three.js.
|
|
60
60
|
- `<uchusen-lineup>`: rockets at one scale with a ruler, a person and a building.
|
|
61
61
|
- Six ways to copy a rocket into your own page, with the credit written in.
|
|
@@ -79,7 +79,7 @@ A page with no bundler loads the element from a CDN, with an import map for thre
|
|
|
79
79
|
|
|
80
80
|
```html
|
|
81
81
|
<script type="importmap">
|
|
82
|
-
{ "imports": { "three": "https://cdn.jsdelivr.net/npm/three@0.186.1/build/three.module.js" } }
|
|
82
|
+
{ "imports": { "three": "https://cdn.jsdelivr.net/npm/three@0.186.1/build/three.module.js", "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.186.1/examples/jsm/" } }
|
|
83
83
|
</script>
|
|
84
84
|
<script type="module" src="https://cdn.jsdelivr.net/npm/@johnmorrisdotca/uchusen-rockets@0/dist/element.js"></script>
|
|
85
85
|
<uchusen-rocket rocket="falcon-heavy" look="thick" view="below"></uchusen-rocket>
|
|
@@ -310,7 +310,7 @@ Anything from outside is treated as text: an attribute that is not in its list f
|
|
|
310
310
|
|
|
311
311
|
<p align="center"><img alt="The flight bar: play, back, a slider and next, what happens at hot staging and a chart of the engines that burn." src="https://raw.githubusercontent.com/johnmorrisdotca/uchusen-rockets/main/docs/images/flight.jpg" width="720"></p>
|
|
312
312
|
|
|
313
|
-
`engines="on"` lights each engine that shows, and a flight lights only the engines that burn in each phase, from a published timeline. How the picture moves between phases, and a flame's length, is illustrative; the times and
|
|
313
|
+
`engines="on"` lights each engine that shows, in the colour of what its engine burns (each from a page), and a flight lights only the engines that burn in each phase, from a published timeline, with the altitude and speed where its page gives them. Grid fins, legs and flaps turn in a flight where the pages say they do. How the picture moves between phases, how far a part turns, and a flame's length, is illustrative; the times, counts, altitudes and speeds are sourced. [The guide](docs/guides/engines-and-flights.md) has the details.
|
|
314
314
|
|
|
315
315
|
## NASA's models
|
|
316
316
|
|
|
@@ -349,6 +349,10 @@ Each guide has a Japanese twin in [docs/guides/ja](docs/guides/ja).
|
|
|
349
349
|
| [Rockets to scale](docs/guides/scale-lineups.md) | `<uchusen-lineup>` and `lineupSvg` |
|
|
350
350
|
| [Put a rocket on your own site](docs/guides/embed-on-your-site.md) | Six ways, and the credit |
|
|
351
351
|
| [React and other frameworks](docs/guides/react-and-frameworks.md) | React, Vue, Svelte, Angular |
|
|
352
|
+
| [Bundlers and CDNs](docs/guides/bundlers-and-cdn.md) | unpkg, Vite, webpack |
|
|
353
|
+
| [TypeScript and Node](docs/guides/typescript-and-node.md) | Types, and the core in Node |
|
|
354
|
+
| [Bundlers and CDNs](docs/guides/bundlers-and-cdn.md) | unpkg, Vite, webpack |
|
|
355
|
+
| [TypeScript and Node](docs/guides/typescript-and-node.md) | Types, and the core in Node |
|
|
352
356
|
| [Ready files and 3D models](docs/guides/assets-and-3d-files.md) | The `.glb` and `.svg` files |
|
|
353
357
|
| [Variants and sourced sizes](docs/guides/variants-and-sources.md) | Why a figure names its source |
|
|
354
358
|
| [Licences, credits and trademarks](docs/guides/licences-and-credits.md) | What is MIT, CC BY, public domain, ODbL |
|
|
@@ -413,6 +417,8 @@ A mesh is a pure function of its description: the same description gives the sam
|
|
|
413
417
|
pnpm install
|
|
414
418
|
pnpm check # lint, types, tests, the build and the packed package
|
|
415
419
|
pnpm test:readme # run every example of the README, the docs and the guides
|
|
420
|
+
pnpm test:usage # every way to use it (CDN, Vite, webpack, React, Vue, Svelte, Angular, iframe, TypeScript, Node), built and opened from the package as npm packs it
|
|
421
|
+
pnpm test:usage # every way to use it (CDN, Vite, webpack, React, Vue, Svelte, Angular, iframe, TypeScript, Node), built and opened from the package as npm packs it
|
|
416
422
|
pnpm docs:check # the reference site's checks: every export documented, every example run
|
|
417
423
|
pnpm test:demo # the demo in a real browser
|
|
418
424
|
pnpm dev # the demo on http://127.0.0.1:7900/uchusen-rockets/
|
|
@@ -439,6 +445,75 @@ PLANNED_ROCKETS.map((rocket) => rocket.id).length > 0; // true
|
|
|
439
445
|
|
|
440
446
|
A rocket goes in only when a source documents it.
|
|
441
447
|
|
|
448
|
+
## The family
|
|
449
|
+
|
|
450
|
+
<!-- family:start (made by scripts/family-readme.mjs from scripts/family-template.mjs; change those, not this) -->
|
|
451
|
+
Uchusen Rockets is one of thirty-five packages, each made for the same site, each at
|
|
452
|
+
[github.com/johnmorrisdotca](https://github.com/johnmorrisdotca) or [github.com/spxis](https://github.com/spxis). The code of every one is MIT.
|
|
453
|
+
|
|
454
|
+
**Games — board**
|
|
455
|
+
|
|
456
|
+
- [Domino](https://github.com/johnmorrisdotca/domino) (ドミノ): dominoes and Mexican Train. [Demo](https://johnmorrisdotca.github.io/domino/).
|
|
457
|
+
- [Gunjin](https://github.com/johnmorrisdotca/gunjin) (軍人): five hidden-rank strategy games with pass-the-device play. [Demo](https://johnmorrisdotca.github.io/gunjin/).
|
|
458
|
+
- [Narabe](https://github.com/johnmorrisdotca/narabe) (並べ): one rules engine for abstract board games, from gomoku and Reversi to Go and checkers. [Demo](https://johnmorrisdotca.github.io/narabe/).
|
|
459
|
+
- [Sugoroku](https://github.com/johnmorrisdotca/sugoroku) (双六): backgammon and its variants, with the doubling cube and match play. [Demo](https://johnmorrisdotca.github.io/sugoroku/).
|
|
460
|
+
- [Tenka](https://github.com/johnmorrisdotca/tenka) (天下): world conquest for two to six, on a map of the real world. [Demo](https://johnmorrisdotca.github.io/tenka/).
|
|
461
|
+
|
|
462
|
+
**Games — cards & tiles**
|
|
463
|
+
|
|
464
|
+
- [Hitotsu](https://github.com/johnmorrisdotca/hitotsu) (一つ): a colour-card shedding game for two to eight, with the house rules people play. [Demo](https://johnmorrisdotca.github.io/hitotsu/).
|
|
465
|
+
- [Jarajara](https://github.com/johnmorrisdotca/jarajara) (ジャラジャラ): mahjong tiles drawn as SVG, stacked layouts, and the matching solitaire Awase. [Demo](https://johnmorrisdotca.github.io/jarajara/).
|
|
466
|
+
- [Kumimoji](https://github.com/johnmorrisdotca/kumimoji) (組み文字): a crossword tile race, in English and Japanese kana. [Demo](https://johnmorrisdotca.github.io/kumimoji/).
|
|
467
|
+
- [Toranpu](https://github.com/johnmorrisdotca/toranpu) (トランプ): a deck of playing cards, card games with computer players, and solitaires. [Demo](https://johnmorrisdotca.github.io/toranpu/).
|
|
468
|
+
|
|
469
|
+
**Games — puzzles**
|
|
470
|
+
|
|
471
|
+
- [Houseki](https://github.com/johnmorrisdotca/houseki) (宝石): gem and stone matching puzzles: falling triplets, stone collapse, colour chains and gem swap. [Demo](https://johnmorrisdotca.github.io/houseki/).
|
|
472
|
+
- [Jirai](https://github.com/johnmorrisdotca/jirai) (地雷): minesweeper on shaped grids with verified no-guess boards. [Demo](https://johnmorrisdotca.github.io/jirai/).
|
|
473
|
+
- [Karakuri](https://github.com/johnmorrisdotca/karakuri) (からくり): eight hyper-casual puzzle games, some of them physics: draw a shield, pull pins, cut ropes, slide blocks, pour tubes. [Demo](https://johnmorrisdotca.github.io/karakuri/).
|
|
474
|
+
- [Kazu](https://github.com/johnmorrisdotca/kazu) (数): grid number puzzles: Sudoku and its variants, Futoshiki and Skyscrapers. [Demo](https://johnmorrisdotca.github.io/kazu/).
|
|
475
|
+
- [Kyuubu](https://github.com/johnmorrisdotca/kyuubu) (キューブ): a turning cube for the browser, 2×2 to 7×7, with record solves to replay. [Demo](https://johnmorrisdotca.github.io/kyuubu/).
|
|
476
|
+
- [Meikyuu](https://github.com/johnmorrisdotca/meikyuu) (迷宮): mazes on squares, hexagons, triangles and circles, made from a seed and drawn through with a finger or the mouse. [Demo](https://johnmorrisdotca.github.io/meikyuu/).
|
|
477
|
+
- [Suido](https://github.com/johnmorrisdotca/suido) (水道): a pipe puzzle: turn the pieces until the water reaches every drain. [Demo](https://johnmorrisdotca.github.io/suido/).
|
|
478
|
+
- [Tobiishi](https://github.com/johnmorrisdotca/tobiishi) (飛び石): peg solitaire with nine boards and seeded solvable challenges. [Demo](https://johnmorrisdotca.github.io/tobiishi/).
|
|
479
|
+
- [Tsunagi](https://github.com/johnmorrisdotca/tsunagi) (繋ぎ): a line-joining logic puzzle whose every level has exactly one answer. [Demo](https://johnmorrisdotca.github.io/tsunagi/).
|
|
480
|
+
|
|
481
|
+
**Games — dice & random**
|
|
482
|
+
|
|
483
|
+
- [Korokoro](https://github.com/johnmorrisdotca/korokoro) (コロコロ): dice, with notation, exact odds, real sounds and the dice of many games. [Demo](https://johnmorrisdotca.github.io/korokoro/).
|
|
484
|
+
- [Tane](https://github.com/johnmorrisdotca/tane) (種): seeded random numbers and daily seeds, the same in every browser and on every server. [Demo](https://johnmorrisdotca.github.io/tane/).
|
|
485
|
+
|
|
486
|
+
**Language**
|
|
487
|
+
|
|
488
|
+
- [Bushu](https://github.com/johnmorrisdotca/bushu) (部首): find a kanji by the parts it is made of. [Demo](https://johnmorrisdotca.github.io/bushu/).
|
|
489
|
+
- [Hikidashi](https://github.com/johnmorrisdotca/hikidashi) (引き出し): a drawer of small Japanese text tools: era dates, kanji numerals, readings and sentence difficulty. [Demo](https://johnmorrisdotca.github.io/hikidashi/).
|
|
490
|
+
- [Kotoba](https://github.com/johnmorrisdotca/kotoba) (言葉): word lists and word-game rules in English, French, German and Japanese. [Demo](https://johnmorrisdotca.github.io/kotoba/).
|
|
491
|
+
|
|
492
|
+
**Geography & data**
|
|
493
|
+
|
|
494
|
+
- [address-plus](https://github.com/johnmorrisdotca/address-plus) (アドレスプラス): parse and format addresses in the United States, Canada, Japan, Australia, France, Germany and the United Kingdom. [Demo](https://johnmorrisdotca.github.io/address-plus/).
|
|
495
|
+
- [Chikyu Earth](https://github.com/johnmorrisdotca/chikyu-earth) (地球): a line-drawn globe that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place. [Demo](https://johnmorrisdotca.github.io/chikyu-earth/).
|
|
496
|
+
- [Chizu](https://github.com/johnmorrisdotca/chizu) (地図): maps of the world and of countries' regions, in English and Japanese, with a quiz and callouts. [Demo](https://johnmorrisdotca.github.io/chizu/).
|
|
497
|
+
- [Hata](https://github.com/johnmorrisdotca/hata) (旗): country and regional flags as SVG, at their true proportions and keyed by ISO code. [Demo](https://johnmorrisdotca.github.io/hata/).
|
|
498
|
+
- [Kuni](https://github.com/johnmorrisdotca/kuni) (国): countries and their regions, with ISO codes and names in English and Japanese. [Demo](https://johnmorrisdotca.github.io/kuni/).
|
|
499
|
+
- [Uchusen Rockets](https://github.com/johnmorrisdotca/uchusen-rockets) (宇宙船): rockets drawn from sourced sizes, as line drawings and 3D views you can take apart and turn, with a check that a rocket really goes together. [Demo](https://johnmorrisdotca.github.io/uchusen-rockets/).
|
|
500
|
+
- [Wakusei Planets](https://github.com/johnmorrisdotca/wakusei-planets) (惑星): the Sun, the planets and their moons, as line drawings, shaded drawings and painted surface maps, with their real sizes, tilt and rotation. [Demo](https://johnmorrisdotca.github.io/wakusei-planets/).
|
|
501
|
+
|
|
502
|
+
**Sports**
|
|
503
|
+
|
|
504
|
+
- [Dougu Sports](https://github.com/johnmorrisdotca/dougu-sports) (道具): sports emblems as SVG: trophies, medals, crests, and the ball and gear of every sport, with optional 3D turning. [Demo](https://johnmorrisdotca.github.io/dougu-sports/).
|
|
505
|
+
- [Kyogijo Stadiums](https://github.com/johnmorrisdotca/kyogijo-stadiums) (競技場): sports fields, rinks, courts and ballparks drawn to scale as SVG, with each team and the score on them. [Demo](https://johnmorrisdotca.github.io/kyogijo-stadiums/).
|
|
506
|
+
- [Senshu Jerseys](https://github.com/johnmorrisdotca/senshu-jerseys) (選手): sports jerseys, sweaters, kits, caps, helmets and retired-number banners as SVG, front and back, with optional 2.5D turning. [Demo](https://johnmorrisdotca.github.io/senshu-jerseys/).
|
|
507
|
+
- [Taisen Brackets](https://github.com/johnmorrisdotca/taisen-brackets) (対戦): a sport-agnostic tournament bracket, drawn as SVG, from a list of ties. [Demo](https://johnmorrisdotca.github.io/taisen-brackets/).
|
|
508
|
+
|
|
509
|
+
**Developer tools**
|
|
510
|
+
|
|
511
|
+
- [REST in Pieces](https://github.com/spxis/rest-in-pieces) (レスト・イン・ピーシーズ): seeded test data and REST APIs for frontend development, with latency and error drills. [Demo](https://spxis.github.io/rest-in-pieces/).
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
**This package is Uchusen Rockets.** The demos of all thirty-five share one header and footer, so each links the rest.
|
|
515
|
+
<!-- family:end -->
|
|
516
|
+
|
|
442
517
|
## The rest
|
|
443
518
|
|
|
444
519
|
[CONTRIBUTING.md](CONTRIBUTING.md) · [SECURITY.md](SECURITY.md) · [CHANGELOG.md](CHANGELOG.md) · [NOTICE.md](NOTICE.md) · MIT licence, CC BY 4.0 for the painted models, and ODbL 1.0 for the map data
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/build/glb.js
CHANGED
|
@@ -61,8 +61,8 @@ export function toGlb(parts) {
|
|
|
61
61
|
const meshes = [];
|
|
62
62
|
const nodes = [];
|
|
63
63
|
const roots = [];
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
/** One mesh of a part or of one of its moving groups: its primitives and the packing's middle and half-size, returned as the nodes that hold it. */
|
|
65
|
+
const packMesh = (mesh, name) => {
|
|
66
66
|
const faces = [...mesh.faces];
|
|
67
67
|
// the packing's middle and half-size, over all of the part's points
|
|
68
68
|
const lo = [Infinity, Infinity, Infinity];
|
|
@@ -126,11 +126,19 @@ export function toGlb(parts) {
|
|
|
126
126
|
continue;
|
|
127
127
|
primitives.push({ attributes: { POSITION: packPositions(lines.positions) }, indices: indexAccessor(lines.indices, lines.positions.length / 3), material: useMaterial(name), mode: LINES });
|
|
128
128
|
}
|
|
129
|
-
meshes.push({ name
|
|
130
|
-
|
|
131
|
-
nodes.
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
meshes.push({ name, primitives });
|
|
130
|
+
nodes.push({ name: `${name}-mesh`, mesh: meshes.length - 1, translation: q.map(round6), scale: [round6(half), round6(half), round6(half)] });
|
|
131
|
+
return nodes.length - 1;
|
|
132
|
+
};
|
|
133
|
+
for (const part of parts) {
|
|
134
|
+
// a holder that the viewer moves, and the packed mesh under it; each moving group is a node of its own beside it, at its pivot, with the axis it turns about
|
|
135
|
+
const children = [packMesh(part.mesh, part.name)];
|
|
136
|
+
for (const group of part.mesh.moves) {
|
|
137
|
+
const inside = packMesh(group.mesh, `${part.name}~${group.id}`);
|
|
138
|
+
nodes.push({ name: `${part.name}~${group.id}`, children: [inside], translation: group.pivot.map(round6), extras: { axis: group.axis.map(round6), group: group.name } });
|
|
139
|
+
children.push(nodes.length - 1);
|
|
140
|
+
}
|
|
141
|
+
nodes.push({ name: part.name, children, translation: part.at.map(round6) });
|
|
134
142
|
roots.push(nodes.length - 1);
|
|
135
143
|
}
|
|
136
144
|
const json = {
|
package/dist/build/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type FlameKind } from "../data/propellants.ts";
|
|
1
2
|
import { type Description, type FitReport } from "../fit.ts";
|
|
2
3
|
import { type Angle, type Vec3, type ViewName } from "../framing.ts";
|
|
3
4
|
import { type LookName } from "../looks.ts";
|
|
@@ -41,6 +42,8 @@ export interface BuiltPart {
|
|
|
41
42
|
pieces: readonly Piece[];
|
|
42
43
|
mesh: PartMesh;
|
|
43
44
|
bounds: Bounds;
|
|
45
|
+
/** The colour of this part's flame, from what a page says its engine burns; `neutral` when none read here says. */
|
|
46
|
+
flame: FlameKind;
|
|
44
47
|
}
|
|
45
48
|
/**
|
|
46
49
|
* What a drawing is asked for: the look, the view, what to show and whether the engines are lit. Anything left out takes its default.
|
|
@@ -59,6 +62,8 @@ export interface SvgOptions {
|
|
|
59
62
|
show?: string;
|
|
60
63
|
/** A flame at each engine that is showing, or as many as a count names for each part. The length is a picture, not a measured flame. Left out, the drawing is unchanged. */
|
|
61
64
|
engines?: boolean | Readonly<Record<string, number>>;
|
|
65
|
+
/** Degrees each moving group of each part is turned from where it is drawn at rest, by slot and then by name: `{ booster: { "grid-fins": 12 } }`. A flight asks for them. */
|
|
66
|
+
moves?: Readonly<Record<string, Readonly<Record<string, number>>>>;
|
|
62
67
|
}
|
|
63
68
|
/**
|
|
64
69
|
* A rocket built from a description: the fit report, its parts, and the ways to ask for its size, where each part stands, its lit engines, a `.glb` file and a drawing.
|
package/dist/build/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
// The builder: one description into one mesh and one drawing. Works in Node and in a browser, with no dependency: the geometry here is this package's own.
|
|
2
|
+
import { propellantOf } from "../data/propellants.js";
|
|
2
3
|
import { check } from "../fit.js";
|
|
3
4
|
import { cleanView, DEFAULT_VIEW, PICTURE_H, PICTURE_W, VIEWS } from "../framing.js";
|
|
4
5
|
import { cleanShow, placesFor, showsOf } from "../layout.js";
|
|
5
6
|
import { DEFAULT_LOOK } from "../looks.js";
|
|
6
7
|
import { boundsOf, meshOf } from "../model/pieces.js";
|
|
8
|
+
import { moved } from "../model/moves.js";
|
|
7
9
|
import { partEntry } from "../model/registry.js";
|
|
10
|
+
import { partIdOf, variantOf } from "../rockets.js";
|
|
8
11
|
import { plumeMarkup } from "../draw/plume.js";
|
|
9
12
|
import { defsOf, drawPart, perspective } from "../draw/svg.js";
|
|
10
13
|
import { bellsOf, litBells, pickBells, plumeLength } from "../engines.js";
|
|
@@ -56,10 +59,20 @@ const widthOf = (id) => {
|
|
|
56
59
|
const { min, max } = made(id).bounds;
|
|
57
60
|
return Math.max(Math.abs(min[0]), Math.abs(max[0]), Math.abs(min[2]), Math.abs(max[2]));
|
|
58
61
|
};
|
|
62
|
+
/** What colour a part's flame is: the kind its engine's page says it burns, found by the engine's name in the data of a variant the part is true for. */
|
|
63
|
+
function flameKindOf(part) {
|
|
64
|
+
for (const variantId of part.trueTo) {
|
|
65
|
+
const variant = variantOf(part.rocket, variantId);
|
|
66
|
+
for (const [slot, engines] of Object.entries(variant?.facts.engines ?? {}))
|
|
67
|
+
if (partIdOf(part.rocket, variantId, slot) === part.id)
|
|
68
|
+
return propellantOf(part.rocket, engines.value)?.flame ?? "neutral";
|
|
69
|
+
}
|
|
70
|
+
return "neutral";
|
|
71
|
+
}
|
|
59
72
|
function assembled(report) {
|
|
60
73
|
const parts = report.parts.map(({ slot, part }) => {
|
|
61
74
|
const { pieces, mesh, bounds } = made(part.id);
|
|
62
|
-
return { slot, record: part, pieces, mesh, bounds };
|
|
75
|
+
return { slot, record: part, pieces, mesh, bounds, flame: flameKindOf(part) };
|
|
63
76
|
});
|
|
64
77
|
const slots = parts.map((part) => part.slot);
|
|
65
78
|
const placesOf = (show) => placesFor(report.parts, cleanShow(show, slots), (part) => widthOf(part.id));
|
|
@@ -98,7 +111,7 @@ function assembled(report) {
|
|
|
98
111
|
placesOf,
|
|
99
112
|
flamesOf,
|
|
100
113
|
glb: () => toGlb(parts.map((part) => ({ name: part.slot, mesh: part.mesh, at: placesOf("together").find((place) => place.slot === part.slot)?.at ?? [0, 0, 0] }))),
|
|
101
|
-
svg: ({ look = DEFAULT_LOOK, view = DEFAULT_VIEW, show, engines = false } = {}) => {
|
|
114
|
+
svg: ({ look = DEFAULT_LOOK, view = DEFAULT_VIEW, show, engines = false, moves } = {}) => {
|
|
102
115
|
const angle = typeof view === "string" ? VIEWS[cleanView(view)] : view;
|
|
103
116
|
const places = placesOf(show).filter((place) => place.shown);
|
|
104
117
|
// a flame drawn at full thrust is held in the picture; a count of engines is the timeline's, which has its own room
|
|
@@ -117,7 +130,7 @@ function assembled(report) {
|
|
|
117
130
|
? flamesOf(show).filter((bell) => places.some((place) => place.slot === bell.slot))
|
|
118
131
|
: [];
|
|
119
132
|
return wrap(ordered
|
|
120
|
-
.map(({ place, part }) => drawPart(drawnPieces(part, together), place.at, cam, look) + plumeMarkup(flames.filter((bell) => bell.slot === place.slot), place.at, cam, look, part.slot))
|
|
133
|
+
.map(({ place, part }) => drawPart(moved(drawnPieces(part, together), moves?.[part.slot] ?? {}), place.at, cam, look) + plumeMarkup(flames.filter((bell) => bell.slot === place.slot), place.at, cam, look, part.slot, part.flame))
|
|
121
134
|
.join(""), look, PICTURE_W, PICTURE_H, report.label);
|
|
122
135
|
},
|
|
123
136
|
};
|
package/dist/data/flights.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export interface PartPose {
|
|
|
20
20
|
rest?: boolean;
|
|
21
21
|
/** It has left the picture. */
|
|
22
22
|
gone?: boolean;
|
|
23
|
+
/** Degrees each moving group of the part (`grid-fins`, `legs`, `forward-flaps`, `aft-flaps`) is turned from where it is drawn at rest. A picture, not a measurement. */
|
|
24
|
+
moves?: Readonly<Record<string, number>>;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* How many engines of a part burn. `drawn` says how many flames to draw where no page says how many burned.
|
|
@@ -86,6 +88,11 @@ export interface Flight {
|
|
|
86
88
|
source: SourceId;
|
|
87
89
|
/** What the picture leaves out. */
|
|
88
90
|
note?: string;
|
|
91
|
+
/** What turns in it (grid fins, legs, flaps), and the page that says so. How far each turns is a picture. */
|
|
92
|
+
moves?: readonly {
|
|
93
|
+
source: SourceId;
|
|
94
|
+
says: string;
|
|
95
|
+
}[];
|
|
89
96
|
phases: readonly FlightPhase[];
|
|
90
97
|
}
|
|
91
98
|
/**
|