@johnmorrisdotca/wakusei-planets 0.17.1 → 0.17.2

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## 0.17.2 - 2026-11-07
6
+
7
+ Rings are drawn all the way round.
8
+
9
+ - Every ring is drawn all the way round again. Both halves of a ring covered the side toward the camera, so the far half, which passes behind the planet, was never drawn on Saturn, Uranus, Jupiter and Neptune.
10
+ - Jupiter keeps a thin main ring. The halo and the gossamer stay a hint, and Neptune's sheet stays fainter than the thin rings (MODULES-509).
11
+
3
12
  ## 0.17.1 - 2026-11-06
4
13
 
5
14
  Saturn, Uranus and Neptune show their turn.
package/README.md CHANGED
@@ -13,9 +13,9 @@ A clean line drawing, a shaded realistic drawing, or a painted surface map, with
13
13
 
14
14
  <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>
15
15
 
16
- <p align="center"><img alt="Jupiter and Saturn drawn in the realistic look, and Saturn as a line drawing" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.17.1/docs/images/hero-desk.png" width="640"></p>
16
+ <p align="center"><img alt="Jupiter and Saturn drawn in the realistic look, and Saturn as a line drawing" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.17.2/docs/images/hero-desk.png" width="640"></p>
17
17
 
18
- <p align="center"><img alt="Every body at one scale, the Earth among them: each small body has a magnified picture joined by a line, and the Sun shows only its edge" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.17.1/docs/images/lineup-desk.png" width="640"></p>
18
+ <p align="center"><img alt="Every body at one scale, the Earth among them: each small body has a magnified picture joined by a line, and the Sun shows only its edge" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.17.2/docs/images/lineup-desk.png" width="640"></p>
19
19
 
20
20
  ## One minute
21
21
 
@@ -273,7 +273,7 @@ A body that turns by itself and a moving sky, in HTML:
273
273
 
274
274
  ## The portrait builder
275
275
 
276
- <p align="center"><img alt="The Sun and the planets in an arc, painted, with their names, in the portrait builder" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.17.1/docs/images/portrait-family.png" width="640"></p>
276
+ <p align="center"><img alt="The Sun and the planets in an arc, painted, with their names, in the portrait builder" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.17.2/docs/images/portrait-family.png" width="640"></p>
277
277
 
278
278
  [The portrait builder](https://johnmorrisdotca.github.io/wakusei-planets/portrait.html) puts any bodies in one picture: drag them, size them, turn them, order them front to back, arrange them in a row, an arc, a grid or at true orbit distance (true or readable sizes, a planet's moons round it in orbit order), light them from one direction, and take the code, a PNG or an SVG. The scene is kept in the address, and every body is drawn in one WebGL scene, so the page holds one WebGL context. [The portrait builder](docs/guides/portrait-builder.md) is its guide.
279
279
 
package/dist/element.d.ts CHANGED
@@ -25,7 +25,7 @@ export type WakuseiState = "line" | "loading" | "still" | "live" | "lost" | "una
25
25
  * console.log(TEXTURE_BASE);
26
26
  * ```
27
27
  */
28
- export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.17.1/dist/textures/";
28
+ export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.17.2/dist/textures/";
29
29
  /**
30
30
  * Where the sharpest surface pictures are: the files of this exact version in the repository, on jsDelivr's GitHub address. The npm package holds only the two smaller widths, so a page that
31
31
  * never zooms in never fetches them. Set `texture-far-base` on an element to serve them yourself.
@@ -37,7 +37,7 @@ export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdot
37
37
  * console.log(TEXTURE_FAR_BASE);
38
38
  * ```
39
39
  */
40
- export declare const TEXTURE_FAR_BASE = "https://cdn.jsdelivr.net/gh/johnmorrisdotca/wakusei-planets@v0.17.1/textures/";
40
+ export declare const TEXTURE_FAR_BASE = "https://cdn.jsdelivr.net/gh/johnmorrisdotca/wakusei-planets@v0.17.2/textures/";
41
41
  /**
42
42
  * The `<wakusei-body>` custom element: a body of the solar system, drawn in a look.
43
43
  *
package/dist/facts.js CHANGED
@@ -69,19 +69,19 @@ const SATURN_RINGS = [
69
69
  { from: 133610, to: 136775, alpha: 0.5, tone: 0.65 },
70
70
  { from: 140100, to: 140260, alpha: 0.35, tone: 0.8 },
71
71
  ];
72
- // Jupiter: the halo inside the main ring, the main ring, and the gossamer rings out to about 226,000 km (NASA). Dark; the main ring is the one that shows.
72
+ // Jupiter: the halo inside the main ring, the main ring, and the gossamer rings out to about 226,000 km (NASA). The halo and the gossamer are a hint; the main ring is the one that shows.
73
73
  const JUPITER_RINGS = [
74
- { from: 92000, to: 122500, alpha: 0.04, tone: 0.25 },
75
- { from: 122800, to: 129200, alpha: 0.4, tone: 0.55 },
76
- { from: 129200, to: 181350, alpha: 0.06, tone: 0.3 },
77
- { from: 181350, to: 226000, alpha: 0.04, tone: 0.25 },
74
+ { from: 92000, to: 122500, alpha: 0.012, tone: 0.25 },
75
+ { from: 122800, to: 129200, alpha: 0.55, tone: 0.7 },
76
+ { from: 129200, to: 181350, alpha: 0.018, tone: 0.3 },
77
+ { from: 181350, to: 226000, alpha: 0.01, tone: 0.25 },
78
78
  ];
79
- // Neptune: Galle, Le Verrier, the Lassell sheet and Adams. Adams's arcs sit on that radius; a strip has no longitude, so they are the same band.
79
+ // Neptune: Galle, Le Verrier, the Lassell sheet and Adams. The sheet is faint. Adams's arcs sit on that radius; a strip has no longitude, so they are the same band.
80
80
  const NEPTUNE_RINGS = [
81
- { from: 40900, to: 42900, alpha: 0.1, tone: 0.3 },
82
- { from: 53150, to: 53300, alpha: 0.45, tone: 0.5 },
83
- { from: 53300, to: 57200, alpha: 0.05, tone: 0.25 },
84
- { from: 62890, to: 62980, alpha: 0.55, tone: 0.6 },
81
+ { from: 40900, to: 42900, alpha: 0.08, tone: 0.35 },
82
+ { from: 53150, to: 53300, alpha: 0.5, tone: 0.55 },
83
+ { from: 53300, to: 57200, alpha: 0.006, tone: 0.25 },
84
+ { from: 62890, to: 62980, alpha: 0.6, tone: 0.65 },
85
85
  ];
86
86
  const URANUS_RINGS = [
87
87
  { from: 41800, to: 41880, alpha: 0.3, tone: 0.2 },
@@ -113,6 +113,7 @@ export function createBodyItem(options) {
113
113
  fragmentShader: RING_FRAGMENT,
114
114
  side: T.DoubleSide,
115
115
  transparent: true,
116
+ premultipliedAlpha: photoTexture === undefined,
116
117
  depthWrite: false,
117
118
  depthTest,
118
119
  uniforms: { uRingTex: { value: ringTexture }, uRingR: { value: new T.Vector2(ringInner, ringOuter) }, uLight: { value: new T.Vector3(0, 0, 1) }, uRingN: { value: new T.Vector3(0, 1, 0) } },
@@ -126,7 +127,7 @@ export function createBodyItem(options) {
126
127
  scene.add(piece);
127
128
  return { mesh: piece, material };
128
129
  };
129
- ringHalves = [half("e", 0, false), half("w", Math.PI, true)];
130
+ ringHalves = [half("e", 0, false), half("w", 0, true)];
130
131
  }
131
132
  // the glow of a star
132
133
  let glow;
@@ -139,6 +139,7 @@ function paint(T, id, context, bases) {
139
139
  fragmentShader: RING_FRAGMENT_WORLD,
140
140
  side: T.DoubleSide,
141
141
  transparent: true,
142
+ premultipliedAlpha: true,
142
143
  depthWrite: false,
143
144
  uniforms: { uRingTex: { value: strip }, uRingR: { value: new T.Vector2(ringInner, ringOuter) }, uLight: { value: new T.Vector3(1, 0, 0) }, uRingN: { value: new T.Vector3(0, 1, 0) }, uScale: { value: 1 } },
144
145
  });
@@ -166,6 +167,8 @@ function paint(T, id, context, bases) {
166
167
  ringMesh.geometry.dispose();
167
168
  ringMesh.geometry = new T.RingGeometry(ringInner, ringOuter, 256, 1);
168
169
  disposables.push(ringMesh.geometry);
170
+ ringMaterial.premultipliedAlpha = false;
171
+ ringMaterial.needsUpdate = true;
169
172
  ringMaterial.uniforms.uRingTex.value = t;
170
173
  ringMaterial.uniforms.uRingR.value.set(ringInner, ringOuter);
171
174
  for (const m of materials) {
@@ -57,10 +57,12 @@ export function ringStrip(facts, width = 1024) {
57
57
  weight += inside;
58
58
  }
59
59
  const t = weight > 0 ? Math.min(1, tone / weight) : 0;
60
- data[x * 4] = Math.round(dark[0] + (light[0] - dark[0]) * t);
61
- data[x * 4 + 1] = Math.round(dark[1] + (light[1] - dark[1]) * t);
62
- data[x * 4 + 2] = Math.round(dark[2] + (light[2] - dark[2]) * t);
63
- data[x * 4 + 3] = Math.round(Math.min(1, alpha) * 255);
60
+ const a = Math.min(1, alpha);
61
+ // The colour is stored already multiplied by the opacity. A clear part of the strip is black, so it stays clear even when a sampler drops the alpha.
62
+ data[x * 4] = Math.round((dark[0] + (light[0] - dark[0]) * t) * a);
63
+ data[x * 4 + 1] = Math.round((dark[1] + (light[1] - dark[1]) * t) * a);
64
+ data[x * 4 + 2] = Math.round((dark[2] + (light[2] - dark[2]) * t) * a);
65
+ data[x * 4 + 3] = Math.round(a * 255);
64
66
  }
65
67
  return { data, width, inner: from / facts.radiusKm, outer: to / facts.radiusKm };
66
68
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.17.1";
1
+ export declare const VERSION = "0.17.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.17.1";
1
+ export const VERSION = "0.17.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnmorrisdotca/wakusei-planets",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
4
  "description": "Wakusei Planets 惑星 — The Sun, planets and moons for the web: each as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, axial tilt and rotation as data, and positions of the moons for any date and time. SVG for the lines, three.js (optional) for the rest.",
5
5
  "keywords": [
6
6
  "planets",