@johnmorrisdotca/wakusei-planets 0.0.0-stage → 0.1.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE.md +24 -0
  4. package/README.md +214 -2
  5. package/dist/bodies/all.d.ts +15 -0
  6. package/dist/bodies/all.js +15 -0
  7. package/dist/bodies/earth.d.ts +1 -0
  8. package/dist/bodies/earth.js +23 -0
  9. package/dist/bodies/jupiter.d.ts +1 -0
  10. package/dist/bodies/jupiter.js +21 -0
  11. package/dist/bodies/mars.d.ts +1 -0
  12. package/dist/bodies/mars.js +24 -0
  13. package/dist/bodies/mercury.d.ts +1 -0
  14. package/dist/bodies/mercury.js +8 -0
  15. package/dist/bodies/moons-earth.d.ts +1 -0
  16. package/dist/bodies/moons-earth.js +36 -0
  17. package/dist/bodies/moons-jupiter.d.ts +1 -0
  18. package/dist/bodies/moons-jupiter.js +27 -0
  19. package/dist/bodies/moons-mars.d.ts +1 -0
  20. package/dist/bodies/moons-mars.js +4 -0
  21. package/dist/bodies/moons-neptune.d.ts +1 -0
  22. package/dist/bodies/moons-neptune.js +11 -0
  23. package/dist/bodies/moons-pluto.d.ts +1 -0
  24. package/dist/bodies/moons-pluto.js +5 -0
  25. package/dist/bodies/moons-saturn.d.ts +1 -0
  26. package/dist/bodies/moons-saturn.js +32 -0
  27. package/dist/bodies/moons-uranus.d.ts +1 -0
  28. package/dist/bodies/moons-uranus.js +7 -0
  29. package/dist/bodies/neptune.d.ts +1 -0
  30. package/dist/bodies/neptune.js +18 -0
  31. package/dist/bodies/pluto.d.ts +1 -0
  32. package/dist/bodies/pluto.js +21 -0
  33. package/dist/bodies/saturn.d.ts +1 -0
  34. package/dist/bodies/saturn.js +13 -0
  35. package/dist/bodies/sun.d.ts +1 -0
  36. package/dist/bodies/sun.js +19 -0
  37. package/dist/bodies/uranus.d.ts +1 -0
  38. package/dist/bodies/uranus.js +14 -0
  39. package/dist/bodies/venus.d.ts +1 -0
  40. package/dist/bodies/venus.js +9 -0
  41. package/dist/data/orbits.d.ts +20 -0
  42. package/dist/data/orbits.js +27 -0
  43. package/dist/element.d.ts +76 -0
  44. package/dist/element.js +585 -0
  45. package/dist/ephemeris.d.ts +189 -0
  46. package/dist/ephemeris.js +340 -0
  47. package/dist/facts.d.ts +213 -0
  48. package/dist/facts.js +198 -0
  49. package/dist/gate.d.ts +37 -0
  50. package/dist/gate.js +54 -0
  51. package/dist/index.d.ts +5 -0
  52. package/dist/index.js +5 -0
  53. package/dist/line.d.ts +82 -0
  54. package/dist/line.js +280 -0
  55. package/dist/live.d.ts +42 -0
  56. package/dist/live.js +62 -0
  57. package/dist/pose.d.ts +62 -0
  58. package/dist/pose.js +69 -0
  59. package/dist/scene/body.d.ts +66 -0
  60. package/dist/scene/body.js +307 -0
  61. package/dist/scene/glsl.d.ts +13 -0
  62. package/dist/scene/glsl.js +186 -0
  63. package/dist/scene/look.d.ts +97 -0
  64. package/dist/scene/look.js +35 -0
  65. package/dist/scene/recipes.d.ts +49 -0
  66. package/dist/scene/recipes.js +76 -0
  67. package/dist/scene/rings.d.ts +34 -0
  68. package/dist/scene/rings.js +64 -0
  69. package/dist/scene/shared.d.ts +24 -0
  70. package/dist/scene/shared.js +55 -0
  71. package/dist/scene/store.d.ts +19 -0
  72. package/dist/scene/store.js +8 -0
  73. package/dist/vec.d.ts +19 -0
  74. package/dist/vec.js +32 -0
  75. package/dist/version.d.ts +1 -0
  76. package/dist/version.js +1 -0
  77. package/package.json +236 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 0.1.0
6
+
7
+ The first release. The package, to the family's standard from the start: a demo and an embed page on GitHub Pages, a documentation site in English and Japanese, a README with every way to use it (each one tested), the shared release workflow with its freeze test.
8
+
9
+ - Line drawings, as SVG strings and as `<wakusei-body look="line">`, of the Sun, Mercury, Venus, Mars, Jupiter, Saturn (with its rings), Uranus (with its rings), Neptune and Pluto, and of the Moon, Phobos and Deimos, the Galilean moons, Saturn's seven larger moons, Uranus's five, Neptune's Proteus, Triton and Nereid, and Pluto's Charon, Nix and Hydra: real relative sizes, axial tilt and rotation as data.
10
+ - The Earth, through a thin adapter over chikyu-earth's own globe (`/earth`, chikyu-earth an optional peer): its line globe, and its Earth from space when the body is live. No second copy.
11
+ - Shaded realistic drawings with three.js through kazoku-ui's shared renderer, each body its own optional entry point: bands, spots, craters, caps and the Pluto heart worked out in a shader, rings that cast shadows, the Sun's glow.
12
+ - The sky for a date and time: a body's pole, rotation, phase and ring opening as the Earth sees it, and a planet's moons on their orbits where they are then (JPL elements, Meeus for the Moon), worked out about once a second and carried forward between.
13
+ - One WebGL context per page, nothing drawn at rest, thirty frames a second at most, canvas within 4096 pixels a side and 6 MP, everything freed, no drawing out of sight, reduced motion respected, a lost context recovers; tested by `pnpm test:freeze` and a soak.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 John Morris
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE.md ADDED
@@ -0,0 +1,24 @@
1
+ # Notice
2
+
3
+ Wakusei Planets is original work by John Morris, under the MIT licence in `LICENSE`.
4
+
5
+ ## The numbers
6
+
7
+ No picture is used by the line and shaded looks: they are drawn from numbers.
8
+
9
+ - **Sizes, flattening, axial tilt, poles and rotation**: the IAU Working Group on Cartographic Coordinates and Rotational Elements, B. A. Archinal et al. (2018), "Report of the IAU Working Group on Cartographic Coordinates and Rotational Elements: 2015", Celestial Mechanics and Dynamical Astronomy 130:22, and NASA's planetary and satellite fact sheets (https://nssdc.gsfc.nasa.gov/planetary/factsheet/, read 2026-11-02). Facts are not copyrightable; the values were typed from these sources.
10
+ - **Planet positions**: JPL Solar System Dynamics, "Keplerian Elements for Approximate Positions of the Major Planets", Table 1, 1800 AD to 2050 AD (https://ssd.jpl.nasa.gov/planets/approx_pos.html, read 2026-11-02; Pluto from the same page's earlier edition). NASA/JPL content is not subject to copyright in the United States; credit: NASA/JPL-Caltech.
11
+ - **Moons' orbits**: JPL Solar System Dynamics, "Planetary Satellite Mean Elements" (https://ssd.jpl.nasa.gov/sats/elem/, read 2026-11-02), made into `src/data/orbits.ts` by `scripts/make-moon-data.py`. Credit: NASA/JPL-Caltech; the elements are from R. A. Jacobson and colleagues' ephemerides cited on that page.
12
+ - **The Moon's position**: the largest terms of the series in Jean Meeus, "Astronomical Algorithms" (2nd edition), chapter 47, written out here as numbers; the mean arguments are the standard ones.
13
+
14
+ The tests compare the Galilean moons and four planets with astronomy-engine (MIT, https://github.com/cosinekitty/astronomy), a development dependency that is never shipped.
15
+
16
+ ## The Earth
17
+
18
+ The Earth is drawn by chikyu-earth (MIT, by John Morris; https://github.com/johnmorrisdotca/chikyu-earth), an optional peer dependency: its own NOTICE.md has the terms of its outlines and its NASA pictures.
19
+
20
+ ## Surface pictures
21
+
22
+ None yet. When the painted looks arrive, each picture will be listed here with its source and licence, checked per file.
23
+
24
+ NASA says its content "generally are not subject to copyright in the United States" and asks for acknowledgement (https://www.nasa.gov/nasa-brand-center/images-and-media/). This package is not endorsed by NASA and uses none of NASA's insignia or logotype.
package/README.md CHANGED
@@ -1,3 +1,215 @@
1
- # Temporary Holding Version
1
+ <h1 align="center">Wakusei Planets <sub>惑星</sub></h1>
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <p align="center"><strong>The Sun, the planets and their moons, for the web.</strong><br>
4
+ A clean line drawing, a shaded realistic drawing, or (soon) a painted surface map, with each body's real size, axial tilt and rotation as data, and a planet's moons where they are at any date and time.</p>
5
+
6
+ <p align="center">
7
+ <a href="https://github.com/johnmorrisdotca/wakusei-planets/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/johnmorrisdotca/wakusei-planets/actions/workflows/ci.yml/badge.svg"></a>
8
+ <a href="./LICENSE"><img alt="MIT licence" src="https://img.shields.io/badge/licence-MIT-2f5d4a"></a>
9
+ <img alt="TypeScript" src="https://img.shields.io/badge/types-TypeScript-3178c6">
10
+ </p>
11
+
12
+ <p align="center"><a href="https://johnmorrisdotca.github.io/wakusei-planets/"><strong>Open the demo →</strong></a> · <a href="https://johnmorrisdotca.github.io/wakusei-planets/embed.html">Embed page</a> · <a href="https://johnmorrisdotca.github.io/wakusei-planets/docs/">Docs</a></p>
13
+
14
+ <p align="center"><img alt="Jupiter and Saturn drawn in the realistic look, and Saturn as a line drawing" src="docs/images/hero-desk.png" width="640"></p>
15
+
16
+ ## One minute
17
+
18
+ ```sh
19
+ npm install @johnmorrisdotca/wakusei-planets
20
+ ```
21
+
22
+ A page with no build step needs one tag. `look="line"` is an SVG and needs nothing else:
23
+
24
+ ```html
25
+ <!doctype html>
26
+ <html lang="en">
27
+ <head>
28
+ <meta charset="utf-8" />
29
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
30
+ <title>Wakusei Planets from jsDelivr</title>
31
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets/element/+esm"></script>
32
+ </head>
33
+ <body>
34
+ <wakusei-body body="saturn" look="line" size="320"></wakusei-body>
35
+ </body>
36
+ </html>
37
+ ```
38
+
39
+ The same tag with the shared [kazoku-ui](https://github.com/johnmorrisdotca/kazoku-ui) controls, which turn, tip, zoom and pan the body:
40
+
41
+ ```html
42
+ <!doctype html>
43
+ <html lang="en">
44
+ <head>
45
+ <meta charset="utf-8" />
46
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
47
+ <title>Wakusei Planets with the shared controls</title>
48
+ <script type="module">
49
+ import "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/kazoku-ui/view-controls/define/+esm";
50
+ import "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets/element/+esm";
51
+
52
+ const body = document.querySelector("wakusei-body");
53
+ document.querySelector("kazoku-view-controls").addEventListener("kazoku-viewchange", (event) => {
54
+ body.setView(event.detail);
55
+ });
56
+ </script>
57
+ </head>
58
+ <body>
59
+ <div id="view" tabindex="0">
60
+ <wakusei-body body="saturn" look="line" size="420"></wakusei-body>
61
+ </div>
62
+ <kazoku-view-controls for="view" address controls="advanced" tilt-max="90" speed="0"></kazoku-view-controls>
63
+ </body>
64
+ </html>
65
+ ```
66
+
67
+ A bundled app imports it: `import "@johnmorrisdotca/wakusei-planets/element"` (and `import { lineSvg } from "@johnmorrisdotca/wakusei-planets"` for the SVG string, which needs no browser). For the shaded look add the body's own entry point, `import "@johnmorrisdotca/wakusei-planets/jupiter"`, and `three` (an optional peer).
68
+
69
+ ## Three looks
70
+
71
+ | Look | What it is | Needs |
72
+ |---|---|---|
73
+ | `line` | A clean outline drawing with the body's key features: bands, craters, rings and their gaps, caps, the dark side dashed off. An SVG. | nothing |
74
+ | `realistic` | A shaded sphere drawn from the body's real colours and features, lit from the Sun's side, with the rings casting shadows. No pictures: the surface is worked out in a shader. | `three`, the body's entry point |
75
+ | `painted` | A real surface map from public-domain imagery. Small pictures first, sharper when you zoom in. | arriving in a later version |
76
+
77
+ Every body has its real size relative to the others (`scale-to="jupiter"`), its axial tilt and its rotation. The Sun, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune and Pluto are drawn, and so are 25 moons (the Moon, Phobos and Deimos, the four Galilean moons, Saturn's seven larger moons, Uranus's five, Proteus, Triton and Nereid, Charon, Nix and Hydra). The Earth is [chikyu-earth](https://github.com/johnmorrisdotca/chikyu-earth)'s own globe, not a second copy: `import "@johnmorrisdotca/wakusei-planets/earth"` (it needs `@johnmorrisdotca/chikyu-earth` installed). The painted looks follow.
78
+
79
+ ## As the Earth sees it
80
+
81
+ Give a body a `time` and it is drawn as the sky shows it then: its pole and rotation, how far the rings are open (Saturn's rings are edge-on in March 2025), the phase of the Moon or Venus, the Sun's direction.
82
+
83
+ ```html
84
+ <wakusei-body body="saturn" look="realistic" time="2026-11-02T12:00:00Z"></wakusei-body>
85
+ ```
86
+
87
+ ## Every way to use it
88
+
89
+ | How | Where |
90
+ |---|---|
91
+ | A script tag from jsDelivr or unpkg, a shaded body from a CDN | [CDN guide](docs/guides/html-and-cdn.md) |
92
+ | An ES module in Vite or webpack, only the bodies you need | [bundlers guide](docs/guides/bundlers.md) |
93
+ | React, Vue, Svelte, Angular; Next.js, Nuxt, SvelteKit | [frameworks guide](docs/guides/frameworks.md) |
94
+ | An `<iframe>` of the embed page, no script of your own | [iframe guide](docs/guides/embed-in-an-iframe.md) |
95
+ | TypeScript types, an SVG string on a server, Node | [TypeScript and Node guide](docs/guides/typescript-and-node.md) |
96
+ | The looks, the entry points, one WebGL context | [looks and bodies](docs/guides/looks-and-bodies.md) |
97
+ | Moons where they are on a date, time that runs fast | [moons and time](docs/guides/moons-and-time.md) |
98
+ | Something does not appear | [troubleshooting](docs/guides/troubleshooting.md) |
99
+
100
+ The guides are also in Japanese (日本語), one language to a page: [docs/guides/ja/](docs/guides/ja/getting-started.md).
101
+
102
+ In React, with the browser-only import where a server render never reaches it:
103
+
104
+ ```tsx
105
+ import { useEffect } from "react";
106
+
107
+ export function WakuseiBody({ body = "saturn", look = "line" }: { body?: string; look?: "line" | "realistic" }) {
108
+ useEffect(() => {
109
+ // The element needs a browser, so it is imported here, never at the top of the file: a server render never reaches an effect.
110
+ void import("@johnmorrisdotca/wakusei-planets/element");
111
+ void import("@johnmorrisdotca/wakusei-planets/all");
112
+ }, []);
113
+ return <wakusei-body body={body} look={look} />;
114
+ }
115
+ ```
116
+
117
+ Vue, Svelte and Angular components, the Vite and webpack setups and an `<iframe>` are in the guides, each one built and opened in a browser by `pnpm test:usage`.
118
+
119
+ ## Light by design
120
+
121
+ A page full of bodies stays light: one WebGL context for the page through kazoku-ui's shared renderer (the body in focus is live, the others are pictures), nothing drawn while nothing changes, at most thirty frames a second while it moves, a canvas held to 4096 pixels a side and six million pixels, everything freed when an element leaves, no drawing out of sight or in a hidden tab, no movement for a reader who prefers reduced motion, and a lost WebGL context coming back by itself. The tests count draws, animation frames, contexts and GPU objects at rest and over many changes (`pnpm test:freeze`, and a soak with `pnpm test:soak`).
122
+
123
+ ## The element
124
+
125
+ | Attribute | What it does | Default |
126
+ | --- | --- | --- |
127
+ | `body` | The body's name. | `earth` |
128
+ | `look` | `line`, `realistic` or `painted`. | `line` |
129
+ | `size` | The width in pixels. | `320` |
130
+ | `time` | `now` or an ISO date: the body as the Earth sees it then. Left out, a portrait. | portrait |
131
+ | `moons` | A planet with its moons on their orbits (with a date). | off |
132
+ | `rate` | Simulated seconds for each real second. | `1` |
133
+ | `turn` | A portrait turns this many degrees a second. | `0` |
134
+ | `tilt`, `pitch`, `phase`, `meridian` | A portrait's pose in degrees. | the body's own |
135
+ | `scale-to` | Draw to scale with another body. | fills its box |
136
+ | `live` | `always`, `hover` or `off`: when a shaded body takes the page's one WebGL context. | `always` |
137
+ | `lang` | `en` or `ja` for names and labels. | `en` |
138
+
139
+ The pure side has no DOM: `BODIES`, `apparent(id, time)`, `system(planet, time)`, `orbitPath`, `portrait` and `lineSvg(id, options)`.
140
+
141
+ ## The data
142
+
143
+ Sizes, flattening, poles and rotation are the IAU's and NASA's; planet positions are JPL's approximate elements; the Moon's are Meeus's largest terms; the other moons are JPL's mean elements. Nothing is fetched at run time, and no picture is used by the line and shaded looks. See [NOTICE.md](NOTICE.md).
144
+
145
+ ## The name
146
+
147
+ Wakusei (惑星, わくせい) is Japanese for a planet.
148
+
149
+ ## The family
150
+
151
+ <!-- family:start (made by scripts/family-readme.mjs from scripts/family-template.mjs; change those, not this) -->
152
+ Wakusei Planets is one of thirty-four packages, each made for the same site, each at
153
+ [github.com/johnmorrisdotca](https://github.com/johnmorrisdotca) or [github.com/spxis](https://github.com/spxis). The code of every one is MIT.
154
+
155
+ **Games — board**
156
+
157
+ - [Domino](https://github.com/johnmorrisdotca/domino) (ドミノ): dominoes and Mexican Train. [Demo](https://johnmorrisdotca.github.io/domino/).
158
+ - [Gunjin](https://github.com/johnmorrisdotca/gunjin) (軍人): five hidden-rank strategy games with pass-the-device play. [Demo](https://johnmorrisdotca.github.io/gunjin/).
159
+ - [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/).
160
+ - [Sugoroku](https://github.com/johnmorrisdotca/sugoroku) (双六): backgammon and its variants, with the doubling cube and match play. [Demo](https://johnmorrisdotca.github.io/sugoroku/).
161
+ - [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/).
162
+
163
+ **Games — cards & tiles**
164
+
165
+ - [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/).
166
+ - [Jarajara](https://github.com/johnmorrisdotca/jarajara) (ジャラジャラ): mahjong tiles drawn as SVG, stacked layouts, and the matching solitaire Awase. [Demo](https://johnmorrisdotca.github.io/jarajara/).
167
+ - [Kumimoji](https://github.com/johnmorrisdotca/kumimoji) (組み文字): a crossword tile race, in English and Japanese kana. [Demo](https://johnmorrisdotca.github.io/kumimoji/).
168
+ - [Toranpu](https://github.com/johnmorrisdotca/toranpu) (トランプ): a deck of playing cards, card games with computer players, and solitaires. [Demo](https://johnmorrisdotca.github.io/toranpu/).
169
+
170
+ **Games — puzzles**
171
+
172
+ - [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/).
173
+ - [Jirai](https://github.com/johnmorrisdotca/jirai) (地雷): minesweeper on shaped grids with verified no-guess boards. [Demo](https://johnmorrisdotca.github.io/jirai/).
174
+ - [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/).
175
+ - [Kazu](https://github.com/johnmorrisdotca/kazu) (数): grid number puzzles: Sudoku and its variants, Futoshiki and Skyscrapers. [Demo](https://johnmorrisdotca.github.io/kazu/).
176
+ - [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/).
177
+ - [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/).
178
+ - [Suido](https://github.com/johnmorrisdotca/suido) (水道): a pipe puzzle: turn the pieces until the water reaches every drain. [Demo](https://johnmorrisdotca.github.io/suido/).
179
+ - [Tobiishi](https://github.com/johnmorrisdotca/tobiishi) (飛び石): peg solitaire with nine boards and seeded solvable challenges. [Demo](https://johnmorrisdotca.github.io/tobiishi/).
180
+ - [Tsunagi](https://github.com/johnmorrisdotca/tsunagi) (繋ぎ): a line-joining logic puzzle whose every level has exactly one answer. [Demo](https://johnmorrisdotca.github.io/tsunagi/).
181
+
182
+ **Games — dice & random**
183
+
184
+ - [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/).
185
+ - [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/).
186
+
187
+ **Language**
188
+
189
+ - [Bushu](https://github.com/johnmorrisdotca/bushu) (部首): find a kanji by the parts it is made of. [Demo](https://johnmorrisdotca.github.io/bushu/).
190
+ - [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/).
191
+ - [Kotoba](https://github.com/johnmorrisdotca/kotoba) (言葉): word lists and word-game rules in English, French, German and Japanese. [Demo](https://johnmorrisdotca.github.io/kotoba/).
192
+
193
+ **Geography & data**
194
+
195
+ - [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/).
196
+ - [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/).
197
+ - [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/).
198
+ - [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/).
199
+ - [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/).
200
+ - [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/).
201
+
202
+ **Sports**
203
+
204
+ - [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/).
205
+ - [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/).
206
+ - [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/).
207
+ - [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/).
208
+
209
+ **Developer tools**
210
+
211
+ - [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/).
212
+
213
+
214
+ **This package is Wakusei Planets.** The demos of all thirty-four share one header and footer, so each links the rest.
215
+ <!-- family:end -->
@@ -0,0 +1,15 @@
1
+ import "./sun.ts";
2
+ import "./mercury.ts";
3
+ import "./venus.ts";
4
+ import "./mars.ts";
5
+ import "./jupiter.ts";
6
+ import "./saturn.ts";
7
+ import "./uranus.ts";
8
+ import "./neptune.ts";
9
+ import "./pluto.ts";
10
+ import "./moons-mars.ts";
11
+ import "./moons-jupiter.ts";
12
+ import "./moons-saturn.ts";
13
+ import "./moons-uranus.ts";
14
+ import "./moons-neptune.ts";
15
+ import "./moons-pluto.ts";
@@ -0,0 +1,15 @@
1
+ import "./sun.js";
2
+ import "./mercury.js";
3
+ import "./venus.js";
4
+ import "./mars.js";
5
+ import "./jupiter.js";
6
+ import "./saturn.js";
7
+ import "./uranus.js";
8
+ import "./neptune.js";
9
+ import "./pluto.js";
10
+ import "./moons-mars.js";
11
+ import "./moons-jupiter.js";
12
+ import "./moons-saturn.js";
13
+ import "./moons-uranus.js";
14
+ import "./moons-neptune.js";
15
+ import "./moons-pluto.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ import { delegates } from "../scene/store.js";
2
+ // The Earth is drawn by chikyu-earth's own elements, not a second copy of them: the line globe with the countries, and the Earth from space with the real Sun, clouds and night lights.
3
+ // chikyu-earth is an optional peer, loaded only when an Earth is drawn.
4
+ const CENTRE = "10,20";
5
+ delegates.set("earth", {
6
+ async line({ center, size }) {
7
+ await import("@johnmorrisdotca/chikyu-earth/element");
8
+ const globe = document.createElement("chikyu-earth");
9
+ globe.setAttribute("center", center || CENTRE);
10
+ globe.setAttribute("look", "line");
11
+ globe.setAttribute("size", String(size));
12
+ return globe;
13
+ },
14
+ async live({ center, time, textureBase }) {
15
+ await import("@johnmorrisdotca/chikyu-earth/realistic/element");
16
+ const earth = document.createElement("chikyu-earth-realistic");
17
+ earth.setAttribute("center", center || CENTRE);
18
+ earth.setAttribute("time", time);
19
+ if (textureBase !== null)
20
+ earth.setAttribute("texture-base", textureBase);
21
+ return earth;
22
+ },
23
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { gas } from "../scene/recipes.js";
3
+ registerLook({
4
+ id: "jupiter",
5
+ surface: gas({
6
+ stops: [[-90, "#6f685f"], [-70, "#8f8070"], [-58, "#b9a48a"], [-48, "#a98d72"], [-40, "#e2d3bb"], [-32, "#b58b6c"], [-26, "#e5d6bf"], [-19, "#b2704f"], [-12, "#c98a62"], [-6, "#ecdcbc"], [0, "#efdfb8"], [6, "#e8d4ae"], [10, "#a96b4d"], [16, "#b97c58"], [21, "#e9dac0"], [27, "#b9916f"], [33, "#ead9bf"], [40, "#a98873"], [50, "#d2bfa2"], [60, "#a49080"], [70, "#8a7b6e"], [90, "#6c6560"]],
7
+ turbulence: 0.05,
8
+ streaks: 0.22,
9
+ plateau: 0.22,
10
+ extra: `
11
+ float spot = oval(p, -20.0, -22.0, 9.5, 6.0, 0.55);
12
+ float halo = oval(p, -20.0, -22.0, 14.0, 9.0, 0.5) - spot;
13
+ vec3 spotCol = mix(vec3(0.70, 0.31, 0.20), vec3(0.86, 0.52, 0.36), fbm(p * 16.0 + 2.0));
14
+ col = mix(col, col * 0.78, clamp(halo, 0.0, 1.0) * 0.5);
15
+ col = mix(col, spotCol, spot);
16
+ float oval2 = oval(p, -70.0, -33.0, 3.0, 2.2, 0.5);
17
+ col = mix(col, vec3(0.93, 0.88, 0.80), oval2 * 0.8);`,
18
+ }),
19
+ atmosphere: { colour: [0.75, 0.7, 0.62], strength: 0.12, power: 3.5 },
20
+ limb: 0.45,
21
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ registerLook({
3
+ id: "mars",
4
+ surface: `
5
+ vec4 surface(vec3 p) {
6
+ float h = craters(p, 4.0, 0.4, 2.0) * 0.8 + craters(p, 12.0, 0.4, 9.0) * 0.4;
7
+ float la = lat(p);
8
+ float dk = smoothstep(0.5, 0.64, fbm(p * 2.1 + 7.0) + 0.14 * (1.0 - abs(la + 0.3) * 1.7));
9
+ dk = max(dk, oval(p, 70.0, 8.0, 16.0, 11.0, 0.6) * 0.95);
10
+ vec3 col = mix(vec3(0.80, 0.47, 0.26), vec3(0.34, 0.20, 0.15), dk * 0.85);
11
+ col = mix(col, vec3(0.88, 0.62, 0.40), oval(p, 70.0, -42.0, 9.0, 9.0, 0.6) * 0.6);
12
+ col *= 0.9 + 0.22 * fbm(p * 11.0);
13
+ col *= 1.0 + 0.7 * h;
14
+ float valles = (1.0 - smoothstep(0.0, 0.03, abs(la + 0.12 + 0.05 * sin(lon(p) * 2.0)))) * oval(p, -75.0, -10.0, 35.0, 12.0, 0.5);
15
+ col = mix(col, vec3(0.30, 0.17, 0.13), valles * 0.7);
16
+ float wob = (fbm(p * 7.0) - 0.5) * 0.14;
17
+ float cap = smoothstep(radians(79.0), radians(83.0), abs(la) + wob);
18
+ col = mix(col, vec3(0.96, 0.96, 0.98), cap);
19
+ return vec4(col, h);
20
+ }`,
21
+ atmosphere: { colour: [0.85, 0.6, 0.45], strength: 0.16, power: 4 },
22
+ relief: 0.7,
23
+ ambient: 0.03,
24
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { rock } from "../scene/recipes.js";
3
+ registerLook({
4
+ id: "mercury",
5
+ surface: rock({ dark: "#4f4a46", light: "#a6a09a", craters: 0.9, contrast: 0.8, seed: 2, patches: 1.8, extra: "col *= 1.0 + 0.5 * smoothstep(0.05, 0.25, h);" }),
6
+ relief: 0.9,
7
+ ambient: 0.03,
8
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,36 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { rock } from "../scene/recipes.js";
3
+ registerLook({
4
+ id: "moon",
5
+ surface: rock({
6
+ dark: "#77746f",
7
+ light: "#b9b5ad",
8
+ craters: 0.65,
9
+ contrast: 0.5,
10
+ seed: 3,
11
+ patches: 3,
12
+ extra: `
13
+ float edge = (fbm(p * 7.0 + 2.0) - 0.5) * 0.35;
14
+ float m = 0.0;
15
+ m = max(m, oval(p, -15.0 + 6.0 * edge, 35.0, 24.0, 15.0, 0.35 + edge));
16
+ m = max(m, oval(p, 18.0, 28.0, 11.0, 9.0, 0.4));
17
+ m = max(m, oval(p, 31.0, 8.0, 14.0, 11.0, 0.4));
18
+ m = max(m, oval(p, 59.0, 17.0, 8.0, 7.0, 0.4));
19
+ m = max(m, oval(p, 52.0, -4.0, 10.0, 10.0, 0.4));
20
+ m = max(m, oval(p, -16.0, -21.0, 11.0, 8.0, 0.4));
21
+ m = max(m, oval(p, -39.0, -24.0, 6.0, 6.0, 0.4));
22
+ m = max(m, oval(p, -57.0, 12.0, 14.0, 26.0, 0.4 + edge));
23
+ m = max(m, oval(p, 4.0, 13.0, 7.0, 6.0, 0.4));
24
+ m = max(m, oval(p, 35.0, -15.0, 6.0, 6.0, 0.4));
25
+ m = max(m, oval(p, 0.0, 58.0, 40.0, 5.0, 0.5) * 0.75);
26
+ m *= 0.85 + 0.3 * fbm(p * 5.0);
27
+ col = mix(col, vec3(0.31, 0.31, 0.33), clamp(m, 0.0, 1.0) * 0.92);
28
+ h *= 1.0 - clamp(m, 0.0, 1.0) * 0.75;
29
+ float tycho = acos(clamp(dot(p, dirOf(-11.0, -43.0)), -1.0, 1.0));
30
+ float ray = smoothstep(1.0, 0.04, tycho) * (0.35 + 0.65 * smoothstep(0.5, 0.8, fbm(vec3(atan(p.z + 0.68, p.y + 0.2) * 2.4, tycho * 3.0, 1.7))));
31
+ col = mix(col, vec3(0.95, 0.94, 0.92), ray * 0.45 * smoothstep(0.02, 0.2, tycho) * (1.0 - m));
32
+ col = mix(col, vec3(0.97), smoothstep(0.035, 0.0, tycho) * 0.8);`,
33
+ }),
34
+ relief: 0.8,
35
+ ambient: 0.02,
36
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { ice, rock } from "../scene/recipes.js";
3
+ registerLook({
4
+ id: "io",
5
+ surface: `
6
+ vec4 surface(vec3 p) {
7
+ float n = fbm(p * 3.0 + 1.0);
8
+ float m = fbm(p * 9.0 + 4.0);
9
+ vec3 col = mix(vec3(0.93, 0.83, 0.34), vec3(0.98, 0.93, 0.62), n);
10
+ col = mix(col, vec3(0.86, 0.46, 0.17), smoothstep(0.52, 0.74, m) * 0.75);
11
+ col = mix(col, vec3(0.96, 0.96, 0.92), smoothstep(0.68, 0.85, fbm(p * 5.0 + 8.0)) * 0.65);
12
+ float c = -craters(p, 6.5, 1.0, 21.0);
13
+ col = mix(col, vec3(0.20, 0.12, 0.07), smoothstep(0.06, 0.26, c) * 0.8);
14
+ float pele = oval(p, -90.0, -18.0, 13.0, 13.0, 0.5) - oval(p, -90.0, -18.0, 6.0, 6.0, 0.5);
15
+ col = mix(col, vec3(0.78, 0.2, 0.1), clamp(pele, 0.0, 1.0) * 0.55);
16
+ return vec4(col, 0.0);
17
+ }`,
18
+ ambient: 0.02,
19
+ });
20
+ registerLook({ id: "europa", surface: ice({ base: "#e9e0cd", stain: "#a2623e", cracks: 0.85, craters: 0.2 }), ambient: 0.02, relief: 0.4 });
21
+ registerLook({
22
+ id: "ganymede",
23
+ surface: rock({ dark: "#5f5448", light: "#b6aa99", craters: 0.9, contrast: 0.9, seed: 12, patches: 3.4, extra: "col = mix(col, vec3(0.30, 0.25, 0.21), oval(p, -140.0, 20.0, 38.0, 50.0, 0.4) * 0.7); col += vec3(0.28) * smoothstep(0.05, 0.2, -h) * 0.6;" }),
24
+ relief: 0.6,
25
+ ambient: 0.02,
26
+ });
27
+ registerLook({ id: "callisto", surface: rock({ dark: "#3f3832", light: "#7d7265", craters: 1.8, contrast: 0.9, seed: 21, patches: 3.2, extra: "col += vec3(0.4, 0.4, 0.42) * smoothstep(0.05, 0.22, -h);" }), relief: 0.9, ambient: 0.02 });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { rock } from "../scene/recipes.js";
3
+ registerLook({ id: "phobos", surface: rock({ dark: "#4d4844", light: "#8a847d", craters: 2, contrast: 1.2, seed: 8, extra: "h += bowl(p, -49.0, 1.0, 22.0, 0.45); col *= 1.0 + 0.5 * bowl(p, -49.0, 1.0, 22.0, 0.45);" }), relief: 1, ambient: 0.02 });
4
+ registerLook({ id: "deimos", surface: rock({ dark: "#6d665f", light: "#a39a8f", craters: 0.9, contrast: 0.6, seed: 4, patches: 3 }), relief: 0.7, ambient: 0.02 });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { ice, rock } from "../scene/recipes.js";
3
+ registerLook({ id: "proteus", surface: rock({ dark: "#45433f", light: "#6f6c68", craters: 1.8, contrast: 0.9, seed: 33 }), relief: 0.9, ambient: 0.02 });
4
+ registerLook({
5
+ id: "triton",
6
+ surface: ice({ base: "#e8d8cb", stain: "#8b6f62", craters: 0.2, extra: "col = mix(col, vec3(0.95, 0.88, 0.84), smoothstep(radians(-20.0), radians(-60.0), lat(p)) * 0.8); float cant = fbm(p * 14.0); col *= 0.92 + 0.16 * cant;" }),
7
+ atmosphere: { colour: [0.8, 0.8, 0.9], strength: 0.05, power: 5 },
8
+ ambient: 0.025,
9
+ relief: 0.4,
10
+ });
11
+ registerLook({ id: "nereid", surface: rock({ dark: "#6e6e6e", light: "#9b9b9b", craters: 1, seed: 40 }), relief: 0.8, ambient: 0.02 });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { rock } from "../scene/recipes.js";
3
+ registerLook({ id: "charon", surface: rock({ dark: "#756f6a", light: "#aaa29a", craters: 0.7, contrast: 0.7, seed: 41, extra: "col = mix(col, vec3(0.42, 0.20, 0.13), smoothstep(radians(52.0), radians(78.0), lat(p)) * 0.85);" }), relief: 0.6, ambient: 0.02 });
4
+ registerLook({ id: "nix", surface: rock({ dark: "#8d8983", light: "#c9c3b9", craters: 1, contrast: 0.7, seed: 43 }), relief: 0.7, ambient: 0.02 });
5
+ registerLook({ id: "hydra", surface: rock({ dark: "#9e9a92", light: "#d4cec4", craters: 1, contrast: 0.7, seed: 47 }), relief: 0.7, ambient: 0.02 });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { cloud, ice, rock } from "../scene/recipes.js";
3
+ registerLook({ id: "mimas", surface: rock({ dark: "#7f7d79", light: "#bebcb7", craters: 1.7, contrast: 1, seed: 6, extra: "float hs = bowl(p, -110.0, 0.0, 33.0, 0.7); h += hs; col *= 1.0 + 0.9 * hs;" }), relief: 1, ambient: 0.02 });
4
+ registerLook({
5
+ id: "enceladus",
6
+ surface: ice({ base: "#f4f7fa", stain: "#c3cfd9", craters: 0.35, extra: "float tiger = oval(p, 0.0, -80.0, 170.0, 14.0, 0.5) * (1.0 - smoothstep(0.0, 0.04, abs(fbm(p * vec3(4.0, 4.0, 14.0)) - 0.5))); col = mix(col, vec3(0.45, 0.72, 0.85), tiger * 0.85);" }),
7
+ ambient: 0.03,
8
+ relief: 0.3,
9
+ });
10
+ registerLook({ id: "tethys", surface: rock({ dark: "#8f8d88", light: "#d0cec9", craters: 1.2, contrast: 0.9, seed: 14, patches: 2.2, extra: "float od = bowl(p, 232.0, 5.0, 24.0, 0.6); h += od; col *= 1.0 + 0.7 * od;" }), relief: 0.8, ambient: 0.02 });
11
+ registerLook({ id: "dione", surface: rock({ dark: "#8c8a85", light: "#cdcbc5", craters: 1, contrast: 0.9, seed: 18, patches: 2.6 }), relief: 0.8, ambient: 0.02 });
12
+ registerLook({ id: "rhea", surface: rock({ dark: "#8a8883", light: "#cac8c2", craters: 1.5, contrast: 0.9, seed: 24, patches: 2 }), relief: 0.85, ambient: 0.02 });
13
+ registerLook({
14
+ id: "titan",
15
+ surface: cloud({ light: "#ecbe6c", dark: "#b8802f", swirl: 0.7 }),
16
+ atmosphere: { colour: [0.92, 0.66, 0.3], strength: 0.65, power: 2.3 },
17
+ limb: 0.3,
18
+ ambient: 0.06,
19
+ });
20
+ registerLook({
21
+ id: "iapetus",
22
+ surface: rock({
23
+ dark: "#7e7a73",
24
+ light: "#d9d6d0",
25
+ craters: 1,
26
+ contrast: 0.8,
27
+ seed: 30,
28
+ extra: "float lead = smoothstep(-0.15, 0.35, cos(lon(p) + 1.5708)) * (1.0 - smoothstep(0.75, 0.95, abs(lat(p)) / 1.5708 * 1.2)); col = mix(col, vec3(0.20, 0.15, 0.12), lead * 0.9);",
29
+ }),
30
+ relief: 0.7,
31
+ ambient: 0.02,
32
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { rock } from "../scene/recipes.js";
3
+ registerLook({ id: "miranda", surface: rock({ dark: "#6f6d69", light: "#b3b1ac", craters: 0.8, contrast: 0.8, seed: 9, patches: 4.5, extra: "col = mix(col, col * 1.25, oval(p, 30.0, -55.0, 40.0, 25.0, 0.4) * 0.5);" }), relief: 0.9, ambient: 0.02 });
4
+ registerLook({ id: "ariel", surface: rock({ dark: "#8a8883", light: "#c6c3bc", craters: 0.8, contrast: 0.7, seed: 13, patches: 3, extra: "float v = 1.0 - smoothstep(0.0, 0.02, abs(fbm(p * 6.0 + 2.0) - 0.5)); col = mix(col, vec3(0.9), v * 0.35);" }), relief: 0.7, ambient: 0.02 });
5
+ registerLook({ id: "umbriel", surface: rock({ dark: "#4f4c49", light: "#7f7c77", craters: 1.2, contrast: 0.9, seed: 16, extra: "col = mix(col, vec3(0.85), (oval(p, 270.0, 8.0, 8.0, 8.0, 0.5) - oval(p, 270.0, 8.0, 4.0, 4.0, 0.5)) * 0.8);" }), relief: 0.8, ambient: 0.02 });
6
+ registerLook({ id: "titania", surface: rock({ dark: "#7d7972", light: "#bdb8af", craters: 0.9, contrast: 0.8, seed: 19 }), relief: 0.8, ambient: 0.02 });
7
+ registerLook({ id: "oberon", surface: rock({ dark: "#625b55", light: "#9c948b", craters: 1.4, contrast: 0.9, seed: 22 }), relief: 0.85, ambient: 0.02 });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { gas } from "../scene/recipes.js";
3
+ registerLook({
4
+ id: "neptune",
5
+ surface: gas({
6
+ stops: [[-90, "#2b45b4"], [-60, "#3153c6"], [-35, "#2a47b6"], [-15, "#3a60d4"], [0, "#2e4ebf"], [20, "#3c61d3"], [45, "#3050c0"], [90, "#3a5ccf"]],
7
+ turbulence: 0.022,
8
+ streaks: 0.1,
9
+ extra: `
10
+ float spot = oval(p, -30.0, -22.0, 11.0, 6.5, 0.5);
11
+ col = mix(col, vec3(0.10, 0.17, 0.46), spot * 0.9);
12
+ float cirrus = smoothstep(0.6, 0.8, fbm(vec3(p.xy * 3.0, p.z * 30.0) + 8.0)) * smoothstep(0.5, 0.0, abs(degrees(la) + 38.0) / 10.0);
13
+ col = mix(col, vec3(0.86, 0.9, 1.0), clamp(cirrus + oval(p, -8.0, -28.0, 7.0, 2.0, 0.6) * 0.8, 0.0, 1.0) * 0.55);`,
14
+ }),
15
+ atmosphere: { colour: [0.35, 0.5, 0.95], strength: 0.42, power: 2.8 },
16
+ limb: 0.3,
17
+ ambient: 0.05,
18
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { rock } from "../scene/recipes.js";
3
+ registerLook({
4
+ id: "pluto",
5
+ surface: rock({
6
+ dark: "#5f4033",
7
+ light: "#c9a784",
8
+ craters: 0.35,
9
+ contrast: 0.6,
10
+ seed: 5,
11
+ patches: 2.6,
12
+ extra: `
13
+ col = mix(col, vec3(0.20, 0.10, 0.09), oval(p, 105.0, -6.0, 55.0, 14.0, 0.6) * 0.88);
14
+ float heart = clamp(oval(p, 178.0, 20.0, 23.0, 27.0, 0.35) + oval(p, 226.0, 24.0, 21.0, 20.0, 0.5) * 0.75 + oval(p, 205.0, -10.0, 13.0, 30.0, 0.5) * 0.6, 0.0, 1.0);
15
+ col = mix(col, vec3(0.95, 0.90, 0.82), heart * 0.92);
16
+ h *= 1.0 - heart;`,
17
+ }),
18
+ atmosphere: { colour: [0.6, 0.7, 0.9], strength: 0.12, power: 5 },
19
+ relief: 0.4,
20
+ ambient: 0.025,
21
+ });
@@ -0,0 +1 @@
1
+ export {};