@johnmorrisdotca/hoshi-stars 0.3.0 → 0.4.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 +10 -0
- package/README.md +12 -9
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.4.0] - 2026-11-08
|
|
6
|
+
|
|
7
|
+
- The demo's chart and the embed page take the family's hands (kazoku-ui's view controller): a drag turns the sky, two fingers pinch, Ctrl or Command and the wheel zoom about the pointer, `+`, `-`, the arrow keys and `0` work with the chart focused, and the double tap zooms. At the opening view the plain wheel scrolls the page, and a finger's up-and-down drag does too; zoomed in, the wheel and a drag move the sky. The embed page (`embed.html`) is no longer a still picture: it has the same hands and zoom in, zoom out and back-to-start buttons, and writes `ra`, `dec` and `zoom` into its own address.
|
|
8
|
+
- The zoom now runs from 0.1 (the whole sky, small) to 500 (about 0.7 degree across a desk-wide chart, where Mizar and Alcor still draw as two stars), up from 0.6 to 60. Lines and the Milky Way keep drawing at the top of the range: a point is placed out to 100,000 pixels from the middle (it was six times the chart's size), so a segment that crosses the chart is not lost. Constellation names are left out below 0.25, where they cannot be told apart.
|
|
9
|
+
- New npm keywords `react`, `galaxy` and `component`.
|
|
10
|
+
|
|
11
|
+
- The family's thumbnail, dark thumbnail and icon (`docs/images`, made by `pnpm images`): a sky chart of Orion with its lines on the Milky Way. The README opens with it and the demo carries it as its link card (og:image) and apple-touch-icon.
|
|
12
|
+
- `pnpm test:readme` runs every `js` and `ts` example of the README and the guides against the built package, and checks that they name every export and every picture exists. Run by CI and by the release.
|
|
13
|
+
- The demo keeps less empty room under its title on a phone. Fixed: the demo's chart failed to draw (an error in the console) once zoomed in past 5, with the Milky Way on. The getting-started guide said Orion has 12 lines to draw; it has 8.
|
|
14
|
+
|
|
5
15
|
## [0.3.0] - 2026-11-08
|
|
6
16
|
|
|
7
17
|
- 199 more common star names, 335 in all: every name on the IAU Catalog of Star Names whose star is in the 5,080, among them Acrux, Alcor, the Pleiades (Alcyone, Merope, Electra, Atlas, Maia, Taygeta, Pleione, Celaeno, Asterope), Rasalas, Mesarthim, Zosma and Tiaki. Each has its katakana (`アクルックス`, `アルコル`, `アルキオネ`), and the demo's search finds them in both. Adhara's katakana is now `アダーラ`, as the National Astronomical Observatory of Japan writes it. The source and its date are in `NOTICE.md`.
|
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<p align="center"><a href="https://johnmorrisdotca.github.io/hoshi-stars/"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/hoshi-stars/main/docs/images/thumbnail-dark.png"><img src="https://raw.githubusercontent.com/johnmorrisdotca/hoshi-stars/main/docs/images/thumbnail.png" alt="Hoshi Stars: a sky chart of Orion with its constellation lines, on the soft band of the Milky Way." width="1200"></picture></a></p>
|
|
2
|
+
|
|
1
3
|
# Hoshi Stars 星
|
|
2
4
|
|
|
3
5
|
<p>Part of <strong>SpaceProgramX (SPX)</strong>, the space packages: <a href="https://github.com/johnmorrisdotca/wakusei-planets">Wakusei Planets</a> · <a href="https://github.com/johnmorrisdotca/hoshi-stars">Hoshi Stars</a> · <a href="https://github.com/johnmorrisdotca/chikyu-earth">Chikyu Earth</a> · <a href="https://github.com/johnmorrisdotca/uchusen-rockets">Uchusen Rockets</a></p>
|
|
@@ -15,9 +17,9 @@ import { starByName, starColour, starDistanceLightYears, starPosition, stars } f
|
|
|
15
17
|
|
|
16
18
|
const sirius = starByName("Sirius")!;
|
|
17
19
|
console.log(sirius.designation, sirius.magnitude, starColour(sirius)); // α CMa -1.46 #c9daff
|
|
18
|
-
console.log(starDistanceLightYears(sirius)?.toFixed(1), "light-years"); // 8.7
|
|
19
|
-
console.log(starPosition(starByName("Arcturus")!, Date.UTC(2100, 0, 1)));
|
|
20
|
-
console.log(stars({ magnitude: 2 }).length, "stars as bright as magnitude 2"); // 50
|
|
20
|
+
console.log(starDistanceLightYears(sirius)?.toFixed(1), "light-years"); // 8.7 light-years
|
|
21
|
+
console.log(starPosition(starByName("Arcturus")!, Date.UTC(2100, 0, 1)).rightAscension.toFixed(1)); // 213.9
|
|
22
|
+
console.log(stars({ magnitude: 2 }).length, "stars as bright as magnitude 2"); // 50 stars as bright as magnitude 2
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
| Function | Gives |
|
|
@@ -106,8 +108,8 @@ import { project, unproject } from "@johnmorrisdotca/hoshi-stars/projection";
|
|
|
106
108
|
|
|
107
109
|
const options = { centre: { rightAscension: 83.8, declination: -5.4 }, scale: 300 }; // Orion in the middle
|
|
108
110
|
const betelgeuse = project("stereographic", starPosition(starByName("Betelgeuse")!), options);
|
|
109
|
-
console.log(betelgeuse);
|
|
110
|
-
console.log(unproject("stereographic", betelgeuse!, options));
|
|
111
|
+
console.log(betelgeuse!.x.toFixed(1), betelgeuse!.y.toFixed(1)); // -26.3 67.4
|
|
112
|
+
console.log(unproject("stereographic", betelgeuse!, options).rightAscension.toFixed(1)); // 88.8
|
|
111
113
|
```
|
|
112
114
|
|
|
113
115
|
- `x` runs right and `y` runs up. The default is the sky seen looking up: north is up and east is to the LEFT, so `x` grows toward decreasing right ascension. Pass `mirror: true` for the map convention, east right.
|
|
@@ -147,7 +149,7 @@ import { horizontalFrom } from "@johnmorrisdotca/hoshi-stars/sky";
|
|
|
147
149
|
// Mars, IAU 2015 values at J2000: pole right ascension and declination, and W = w0 + rate * days since J2000
|
|
148
150
|
const mars = { pole: { rightAscension: 317.269202, declination: 54.432516 }, primeMeridian: { w0: 176.049863, rate: 350.891982443297 } };
|
|
149
151
|
const deneb = starPosition(starByName("Deneb")!);
|
|
150
|
-
console.log(horizontalFrom(deneb, mars, { latitude: 90, longitude: 0 }, new Date()).altitude); // 79.8
|
|
152
|
+
console.log(horizontalFrom(deneb, mars, { latitude: 90, longitude: 0 }, new Date()).altitude.toFixed(1)); // 79.8
|
|
151
153
|
```
|
|
152
154
|
|
|
153
155
|
- **The stars look the same from every planet.** The nearest star, Proxima Centauri, shifts about 40 arc-seconds seen from Pluto (parallax 0.77 arc-second times 49 AU at the farthest), a typical star far less, so a J2000 position serves anywhere in the solar system. Only the pole and the turning change.
|
|
@@ -164,7 +166,7 @@ import { deepSky, deepSkyObject, messier } from "@johnmorrisdotca/hoshi-stars/de
|
|
|
164
166
|
|
|
165
167
|
const m31 = deepSkyObject("M31")!; // or "NGC 224", "Messier 31", "Andromeda Galaxy", in any case
|
|
166
168
|
console.log(m31.id, m31.ngc, m31.name, m31.type, m31.magnitude); // M31 NGC 224 Andromeda Galaxy galaxy 3.4
|
|
167
|
-
console.log(m31.rightAscension.toFixed(3), m31.declination.toFixed(3)); // 10.685 41.269
|
|
169
|
+
console.log(m31.rightAscension.toFixed(3), m31.declination.toFixed(3)); // 10.685 41.269
|
|
168
170
|
console.log(messier().length, deepSky({ type: "globular cluster" }).length); // 110 29
|
|
169
171
|
console.log(deepSky({ magnitude: 4 }).map((o) => o.id)); // [ 'M7', 'M31', 'M42', 'M44', 'M45' ]
|
|
170
172
|
```
|
|
@@ -173,6 +175,7 @@ console.log(deepSky({ magnitude: 4 }).map((o) => o.id));
|
|
|
173
175
|
|---|---|
|
|
174
176
|
| `messier()` | the 110, M1 to M110 (in `/deep-sky` only) |
|
|
175
177
|
| `deepSky({ catalogue?, magnitude?, type? })` | the objects that meet the options, in catalogue order: Messier, then NGC, then IC. `catalogue` is `"messier"`, `"ngc"` or `"ic"` (objects with a number in it); `magnitude` the faintest to include |
|
|
178
|
+
| `DEEP_SKY_CATALOGUES`, `DEEP_SKY_TYPES` | the catalogue names `catalogue` takes (`"messier"`, `"ngc"`, `"ic"`) and the kinds of object `type` takes |
|
|
176
179
|
| `deepSkyObject(text)` | one object by `M31`, `NGC 224`, `IC 434`, any other NGC or IC number it carries, or an English name; `undefined` if none |
|
|
177
180
|
|
|
178
181
|
An object has `id`, `messier`, `ngc`, `ic` (each a string such as `"NGC 224"`), `otherIds`, `name`, `type` (`galaxy`, `globular cluster`, `open cluster`, `nebula`, `planetary nebula`, `supernova remnant` or `other`), `constellation` (the IAU abbreviation), `rightAscension` and `declination` (degrees, J2000), `magnitude` (visual, or `undefined`) and `sizeArcmin` (the major axis, or `undefined`).
|
|
@@ -188,8 +191,8 @@ An object has `id`, `messier`, `ngc`, `ic` (each a string such as `"NGC 224"`),
|
|
|
188
191
|
```ts
|
|
189
192
|
import { milkyWayBands, milkyWayBrightness } from "@johnmorrisdotca/hoshi-stars/milky-way";
|
|
190
193
|
|
|
191
|
-
console.log(milkyWayBrightness({ rightAscension: 266.4, declination: -28.9 }) > 0.7); // true
|
|
192
|
-
console.log(milkyWayBands([0.2, 0.5]).map((band) => band.strips.length)); //
|
|
194
|
+
console.log(milkyWayBrightness({ rightAscension: 266.4, declination: -28.9 }) > 0.7); // true
|
|
195
|
+
console.log(milkyWayBands([0.2, 0.5]).map((band) => band.strips.length)); // [ 188, 10 ]
|
|
193
196
|
```
|
|
194
197
|
|
|
195
198
|
`milkyWayBrightness(point)` is 0 (dark sky) to 1 (the core); `milkyWayBands(levels, { step })` gives ribbons of sky points for `project`; `toGalactic` and `fromGalactic` change the frame. The demo draws it as soft bands under the stars, in every projection, and its **Milky Way** button turns it off.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnmorrisdotca/hoshi-stars",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Hoshi 星: stars you can see without a telescope, as data and as sky charts. 5,080 stars with names, distance and colour, the 88 constellations with lines and boundaries, the Messier objects and seven map projections. Typed, no dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stars",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"ngc",
|
|
17
17
|
"proper-motion",
|
|
18
18
|
"javascript",
|
|
19
|
+
"react",
|
|
20
|
+
"galaxy",
|
|
21
|
+
"component",
|
|
19
22
|
"typescript",
|
|
20
23
|
"zero-dependencies",
|
|
21
24
|
"itsutsu",
|
|
@@ -141,6 +144,8 @@
|
|
|
141
144
|
"site": "pnpm build && node scripts/site.ts",
|
|
142
145
|
"dev": "pnpm site && node scripts/dev.ts",
|
|
143
146
|
"test:demo": "pnpm site && node scripts/docs-site.mjs build && playwright test",
|
|
147
|
+
"images": "node scripts/images.ts",
|
|
148
|
+
"test:readme": "pnpm build && node scripts/check-readme-examples.ts",
|
|
144
149
|
"family:readme": "node scripts/family-readme.mjs",
|
|
145
150
|
"test:demo:one": "pnpm site && node scripts/docs-site.mjs build && playwright test",
|
|
146
151
|
"test:usage": "pnpm site && node scripts/check-usage.ts",
|