@johnmorrisdotca/chikyu-earth 0.24.0 → 0.26.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/NOTICE.md +7 -1
- package/README.md +51 -10
- package/dist/data/meteor-showers.d.ts +53 -0
- package/dist/data/meteor-showers.js +57 -0
- package/dist/meteors/index.d.ts +3 -0
- package/dist/meteors/index.js +6 -0
- package/dist/meteors/layer.d.ts +108 -0
- package/dist/meteors/layer.js +337 -0
- package/dist/meteors/note.d.ts +11 -0
- package/dist/meteors/note.js +19 -0
- package/dist/meteors/rate.d.ts +206 -0
- package/dist/meteors/rate.js +252 -0
- package/dist/realistic/earth.d.ts +51 -2
- package/dist/realistic/earth.js +87 -9
- package/dist/realistic/element.d.ts +72 -1
- package/dist/realistic/element.js +218 -8
- package/dist/realistic/index.d.ts +2 -2
- package/dist/realistic/index.js +2 -2
- package/dist/realistic/shaders.d.ts +1 -1
- package/dist/realistic/shaders.js +61 -13
- package/dist/realistic/sun.d.ts +14 -0
- package/dist/realistic/sun.js +19 -1
- package/dist/realistic/tile-set.d.ts +2 -0
- package/dist/realistic/tile-set.js +1 -0
- package/dist/space/element.d.ts +35 -2
- package/dist/space/element.js +109 -6
- package/dist/space/index.d.ts +1 -1
- package/dist/space/index.js +1 -1
- package/dist/space/satellite-layer.d.ts +3 -3
- package/dist/space/satellite-layer.js +26 -13
- package/dist/space/scene.d.ts +48 -3
- package/dist/space/scene.js +81 -9
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.26.0 - 2026-11-10
|
|
6
|
+
|
|
7
|
+
- **The realistic Earth: a camera held in the stars, a full-screen mode, a better look and every satellite group** (MODULES-849, MODULES-843). `<chikyu-earth-realistic>` takes `camera="space"` (held in the stars, so the Earth turns beneath it as the clock runs, with the day and night line where the Sun really is) or `camera="sun"` (on the Sun's side, so the line keeps its place on the screen); `space` is now the default, so a view that opens playing shows the Earth turning (before, the camera rode the ground and only the clouds seemed to move); `ground`, the camera over a place on the ground, stays as the option. The cloud drift is one made-up eastward 1.5 degrees an hour that was always on, so it is now an attribute, `cloud-drift`, 0 by default (the cloud picture is one snapshot, not a forecast). `<chikyu-space>` takes `camera`, `earth-size`, `earth-x` and `earth-y` too, and its Earth is fitted to the shorter side of its box with the glow inside. `center` is where the camera looks when it is set (`sun`: the offset from the sub-solar point). New `cameraCentre`, `greenwichSidereal` and `CameraMode` in `/realistic`. `immersive` fills the element's box in any shape, makes a plain wheel zoom and a touch drag turn; Ctrl and the wheel, a pinch and the keys stay kazoku-ui's. The look: a thin bright limb with a faint halo, blue by day and orange along the terminator; a reddening Sun, a warm band and a blue hour at the terminator; a clear blue ocean with a hard glint, a broad sheen and the sky at grazing angles, hidden by cloud; cloud shadows on the ground; warm, softly spread city lights that cloud dims; all from the pictures the package already carries (NASA Blue Marble, Black Marble and cloud pictures: no new data, no code, art or data from any other site). The realistic Earth draws satellites with the space view's calls (`setSatellites`, `showSatellites`, `satelliteGroups`, `selectSatellite`, `selectedSatellite`, `satelliteInfo`, `chikyu-satellite-click`, `stats.satellites`): one draw call a group, so every group at once, at most 30 draws a second, nothing drawn while the clock holds, hidden behind the Earth. The 3D looks fill the demo's felt, Wide and the embed frame edge to edge (no square canvas inside the frame); Auto-turn opens on at a speed that can be seen (6 degrees a second) in them. The demo's Satellites row works on the realistic look and has a Camera row; a new page `fullscreen.html` shows the whole on a dark window (`?sats=all` for every group). The orthographic camera now sits 50 radii out (it was 5) so a geostationary satellite is never behind it. Guide in English and Japanese: `docs/guides/full-screen-and-camera.md`. Tests: `test/realistic.test.ts`, `e2e/camera.gl.ts`, `e2e/fullscreen.gl.ts`.
|
|
8
|
+
|
|
9
|
+
## 0.25.0 - 2026-11-10
|
|
10
|
+
|
|
11
|
+
- **The first screen says who it is for, and every demo page credits its sources** (MODULES-812). The README opens with a picture of the day and night Earth on a desk and the ISS passes on a phone, a sentence that it runs in the browser of a phone, a tablet or a computer with nothing to install, "Who it is for" for teachers and students, satellite spotters, researchers and developers, a "Try it now, nothing to install" row of links, "For teachers and families", a fuller "Limits" and "How to cite", with a new `CITATION.cff` (a test keeps its version and the README's equal to `package.json`'s: a release commit bumps all three). The footer of the home, sheets and passes pages names the sources and links NOTICE.md (English and Japanese), the code builder has the same line, and the two embed frames carry a credit (the globe frame in its top corner, naming only the sources its look uses; the passes frame under its list; `lang=ja` for Japanese). Tests: `e2e/credits.demo.ts`, `e2e/credits.gl.ts`, `test/frame-credit.test.ts`, `test/citation.test.ts`. NOTICE.md says that the demo's space view uses wakusei-planets' pictures.
|
|
12
|
+
- **Meteors seen from space** (MODULES-872). `<chikyu-earth-realistic meteors>` and `<chikyu-space meteors>` (the property `meteors` is a boolean; off by default, and nothing of theirs is made until they are switched on) draw short streaks where meteors burn, 110 km down to 85 km, on the dark side of the Earth and in its twilight, only while the clock runs and at any speed. Real, for the moment shown: how many there are from place to place (a background of 8 an hour, an assumed figure, leaning to the side that faces the Earth's way, plus each active shower's rate times the sine of its radiant's height), that none show where the Sun is up, the way a shower's meteors travel, their height and their speed. Illustration, and said so in a line under the picture in English or Japanese (`meteors-label="off"` takes it away): each streak's place and moment are random, a streak stands for many meteors (2.5 a second over a dark view with no shower, never more than 9), and a short one is lengthened to be seen. For a reader who prefers reduced motion there are none until the page sets a `speed` (a Play). All the streaks are one draw, 48 alive at most, nothing started or drawn while held, out of sight or in a hidden tab, and none in the space view while the Earth is under 40 pixels in radius. `chikyu-meteors` tells a page the strongest active shower, and `stats.meteors` the counts. The demo has a Meteors button (`meteors=on` in the address).
|
|
13
|
+
- **`@johnmorrisdotca/chikyu-earth/meteors`**: the year's meteor showers and the sums behind the picture, with no DOM and no dependency. `METEOR_SHOWERS` is the International Meteor Organization's Working List of Visual Meteor Showers from its 2026 calendar, 37 showers (the Antihelion Source left out), each with its dates, maximum, radiant, speed, population index, rate, names in English and Japanese and, where a source names one, its parent body; `showerRate`, `activeShowers`, `solarLongitude`, `pointBeneath`, `apexPoint`, `meteorSky`, `hourlyRateAt`, `darkness`, `streaksPerSecond`, `streakPath`, `placeVector`. New guide: Meteors seen from space (English and Japanese).
|
|
14
|
+
|
|
5
15
|
## 0.24.0 - 2026-11-10
|
|
6
16
|
|
|
7
17
|
- **The demo's views open moving** (MODULES-815). A link that says nothing about the clock (no `play`, no `speed`, no `time`) opens the space view and the realistic Earth running from now at an hour a second (`speed` 3600, the first step of the Time row where motion shows; real time looks frozen), with the date box running with it. They opened held (the space view) or following the real clock (the realistic Earth) before. Links that say something work as they say: `speed=0` and `play=off` hold, a date (`time`) is shown as it says and held until Play, a speed other than 0 with no `play` runs at it, and a reader's Pause, written to the address as `time`, stays held. A hold with no date to write (Back to a date that was "now" on the realistic Earth, Now pressed while held) is written as `play=off`. Changing look keeps the clock as the reader left it: a view that was running goes on running from the date reached, one that was paused stays paused. The line and thick globes already turn on their own when the page opens (the view controls' Auto-turn, at the Earth's own rate). **A reader who prefers reduced motion still gets a still view with Play off**: John has not decided whether that changes, and the one place to change is `OPEN_MOVING_WITH_REDUCED_MOTION` in `demo/demo.ts` (kazoku-ui's replay bar also turns Play off under reduced motion, so the change needs an option there first). Nothing is drawn while held, out of sight or in a hidden tab, and never more than 30 frames a second, as before. The package's elements are unchanged (`<chikyu-space>` still defaults to real time and `<chikyu-earth-realistic>` to following the real clock), and so is the embed page. Guide in English and Japanese: `docs/guides/time-and-play.md`. Tests: `e2e/date-play.demo.ts` (the space view and the globes) and `e2e/realistic-play.demo.ts`; "nothing at all opens held" became "opens moving".
|
package/NOTICE.md
CHANGED
|
@@ -55,7 +55,7 @@ item to: NASA's Scientific Visualization Studio" (Visualizer Ernie Wright, USRA;
|
|
|
55
55
|
## The planets' places
|
|
56
56
|
|
|
57
57
|
`<chikyu-space>` computes positions with **astronomy-engine** (https://github.com/cosinekitty/astronomy, MIT, copyright Don Cross), the page's own optional peer dependency: this package does not
|
|
58
|
-
bundle or ship it.
|
|
58
|
+
bundle or ship it. In this package the planets are drawn as plain colours, from no picture. The demo site's space view paints the Sun, the planets and the moons with the pictures of **wakusei-planets** (https://github.com/johnmorrisdotca/wakusei-planets, MIT, by John Morris), a separate optional package, whose own NOTICE.md credits each picture (public-domain NASA, USGS and JPL imagery from Wikimedia Commons); they are served beside the demo and are not in this package.
|
|
59
59
|
|
|
60
60
|
## Satellites
|
|
61
61
|
|
|
@@ -71,6 +71,12 @@ terms: a snapshot with credit, never a live fetch. The catalogue (`src/satellite
|
|
|
71
71
|
|
|
72
72
|
The same build may take a group's element sets from **Space-Track.org** (https://www.space-track.org, U.S. Space Command) when CelesTrak has left the group more than 12 hours old, at most once a day, through its API with John Morris's own account (the login is a repository secret, never in a file). The group's file and `manifest.json` say `"source": "spacetrack"` and the demo says so under the globe. The citation is **"Data from Space-Track.org (USSPACECOM)"**. Terms: the documentation page https://www.space-track.org/documentation, section "Redistribution of Basic SSA Information", read 2026-11-08: "USSPACECOM has provided express blanket approval for transfer/redistribution of basic SSA data and services accessed via www.Space-Track.org conditioned on appropriate citation." Basic SSA data are "Two-Line Elements (TLEs) and Orbital Mean-element Messages (OMMs); SATCAT; and Satellite Decay and Reentry Data." (The page needs a browser; the section was read through a page-reading tool, which returned each sentence in quoted pieces. TODO: John or a browser check of the section's wording.) The page gives no citation form, so this sentence is the package's own. The package ships none of these element sets.
|
|
73
73
|
|
|
74
|
+
## Meteor showers
|
|
75
|
+
|
|
76
|
+
`src/data/meteor-showers.ts` (in the package, the `./meteors` entry point) is the **International Meteor Organization**'s Working List of Visual Meteor Showers: Table 5 of the *2026 Meteor Shower Calendar*, edited by Jürgen Rendtel (IMO INFO(3-25), https://www.imo.net/files/meteor-shower/cal2026.pdf, read 2026-11-10), typed by hand: each shower's code and number, dates of activity, date and solar longitude of the maximum, radiant, speed, population index and zenithal hourly rate. The table says its details "were correct according to the best information available in June 2025, with maximum dates accurate only for 2026". The Antihelion Source is left out. The Calendar states no licence or reuse terms; these are facts from a published list, credited here and in the guide, and will be removed on request. The parent bodies are the ones the Calendar's own text names (Lyrids, June Bootids, Perseids, Draconids, Taurids, Leonids) and the ones **NASA**'s pages on the shower name (Quadrantids, eta Aquariids, Orionids, Geminids; https://science.nasa.gov/solar-system/meteors-meteorites/, read 2026-11-10); the other showers are given none. The Japanese names are the names in use in Japan. The heights between which meteors shine (80 to 120 km) and the range of their speeds are as the American Meteor Society's FAQ gives them (https://www.amsmeteors.org/faq/, read 2026-11-10), as figures only; none of its text is copied.
|
|
77
|
+
|
|
78
|
+
Not from any list, and said so where it is used (`src/meteors/rate.ts`, `src/meteors/layer.ts`, the guide): the sporadic background of 8 meteors an hour, its lean towards the morning side, each shower's curve between its first day, its maximum and its last day, and how many streaks are drawn. The Sun's longitude is Meeus's low-precision formula (as under "Sun position").
|
|
79
|
+
|
|
74
80
|
## Satellite passes
|
|
75
81
|
|
|
76
82
|
`src/passes/` (the `/passes` entry and `<chikyu-passes>`) works out passes with SGP4 by **satellite.js** (see Satellites above), this package's own Sun position (see Sun position above) and a cylinder of the Earth's shadow; the code is this package's own and MIT. The brightness is a model of this package's own: the phase function of a diffuse (Lambertian) sphere, a textbook result, with the standard magnitude (brightness from 1000 km with half of the satellite lit, the convention satellite observers use) worked out from the Sun's apparent magnitude of -26.74 (the IAU's 2015 nominal solar values), an assumed albedo of 0.2 and a rough average cross-section for each of the ISS (2,000 square metres), Tianhe (200) and the Hubble Space Telescope (70). The cross-sections are this package's own rough estimates, made from the sizes the space agencies publish (for the ISS, NASA's "Space Station Facts and Figures" page, read 2026-11-09: solar array length 73 m, wingspan 109 m, truss 94 m); they are not measurements, and no observer's table of standard magnitudes is used or kept.
|
package/README.md
CHANGED
|
@@ -15,14 +15,28 @@ Country outlines in the same thin-line style as Hako Devices and Uchusen Rockets
|
|
|
15
15
|
|
|
16
16
|
<p align="center"><a href="https://johnmorrisdotca.github.io/chikyu-earth/"><strong>Open the demo →</strong></a> · <a href="https://johnmorrisdotca.github.io/chikyu-earth/embed.html">Embed page</a> · <a href="https://johnmorrisdotca.github.io/chikyu-earth/docs/">Docs</a></p>
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
It runs in the browser of a phone, a tablet or a computer: nothing to install, no account, and it is free. Turn the Earth, see where the Sun is shining on it, and find out when the International Space Station (ISS) crosses the sky over your place.
|
|
19
|
+
|
|
20
|
+
<p align="center"><img alt="The demo on a desk: the realistic Earth centred on Asia with the dusk line down the middle, city lights on the night side, and the look, places and light buttons beside it" src="docs/images/day-night-desk.webp" width="620"> <img alt="The passes page on a phone: the next sightings of the ISS over Tokyo as a list, and the sky dome with the path of the first one, from the south-south-west past the south-east to the east-south-east" src="docs/images/passes-phone.webp" width="200"></p>
|
|
19
21
|
|
|
20
22
|
## Who it is for
|
|
21
23
|
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
24
|
+
- **Teachers and students:** the Earth lit by the real Sun, so [day and night](https://johnmorrisdotca.github.io/chikyu-earth/?look=realistic) can be seen for any date and time, and [sheets to print](https://johnmorrisdotca.github.io/chikyu-earth/kids.html) in English and Japanese: the globe to colour, a world map, my country, [day and night](https://johnmorrisdotca.github.io/chikyu-earth/kids.html?kind=daynight) and the seasons.
|
|
25
|
+
- **Satellite spotters and space enthusiasts:** [when the ISS passes over your place](https://johnmorrisdotca.github.io/chikyu-earth/passes.html), with the direction, the height and how bright, and [all 135 Space Shuttle flights](https://johnmorrisdotca.github.io/chikyu-earth/?look=space&mission=sts-31&time=1990-04-25T00:00Z) put on the globe.
|
|
26
|
+
- **Researchers and outreach staff:** the orbit model (SGP4) and how far it can be trusted, every source with its terms in [NOTICE.md](NOTICE.md), the [passes checked against Skyfield](docs/guides/passes.md#how-well-it-matches). Read [Limits](#limits) first, and see [How to cite](#how-to-cite).
|
|
27
|
+
- **Developers and sites with a place on them:** one tag, no build step, no canvas, an SVG that prints sharply, markers that move with the globe, and countries as data (outlines, English and Japanese names and two-letter codes, no network). The install and the API are below.
|
|
28
|
+
|
|
29
|
+
## Try it now, nothing to install
|
|
30
|
+
|
|
31
|
+
**Learn:** **[Day and night now](https://johnmorrisdotca.github.io/chikyu-earth/?look=realistic)** · **[Sheets to print](https://johnmorrisdotca.github.io/chikyu-earth/kids.html)** · **[The day and night sheet](https://johnmorrisdotca.github.io/chikyu-earth/kids.html?kind=daynight)**
|
|
32
|
+
|
|
33
|
+
**Look up:** **[When can I see the ISS?](https://johnmorrisdotca.github.io/chikyu-earth/passes.html)** (pick a place, search, or press My location) · **[The Earth, the Moon and the planets](https://johnmorrisdotca.github.io/chikyu-earth/?look=space)** · **[Space Shuttle STS-31, which put the Hubble telescope up](https://johnmorrisdotca.github.io/chikyu-earth/?look=space&mission=sts-31&time=1990-04-25T00:00Z)**
|
|
34
|
+
|
|
35
|
+
**Make:** **[The code builder](https://johnmorrisdotca.github.io/chikyu-earth/builder.html)** · **[The embed page](https://johnmorrisdotca.github.io/chikyu-earth/embed.html)** · **[The demo in Japanese](https://johnmorrisdotca.github.io/chikyu-earth/?lang=ja)** · **[in English](https://johnmorrisdotca.github.io/chikyu-earth/?lang=en)**
|
|
36
|
+
|
|
37
|
+
## For teachers and families
|
|
38
|
+
|
|
39
|
+
Chikyu Earth works on a phone or a tablet as well as on a computer, in the browser, and it is free: the code is MIT-licensed, and nothing is installed or signed up for. [The sheets guide](https://johnmorrisdotca.github.io/chikyu-earth/docs/guides/printable-sheets.html) says what each printable sheet is, and [the ISS guide](https://johnmorrisdotca.github.io/chikyu-earth/docs/guides/passes.html) says how a pass is worked out and how to read one. Every source is credited in [NOTICE.md](NOTICE.md) and at the foot of each demo page.
|
|
26
40
|
|
|
27
41
|
## Features
|
|
28
42
|
|
|
@@ -162,7 +176,7 @@ atmosphere at the rim, drawn with three.js through kazoku-ui's shared renderer.
|
|
|
162
176
|
|
|
163
177
|
Needs `three` and `@johnmorrisdotca/kazoku-ui` (both optional peers) and the pictures (1.6 MB, from NASA, in `dist/textures/`). It draws nothing while nothing changes,
|
|
164
178
|
at most 30 times a second while it does, in one WebGL context, with textures that grow as you zoom and are freed after. With `tiles="/tiles/"` (a folder of NASA map
|
|
165
|
-
tiles, [how](docs/guides/earth-tiles.md)) it loads only the finer tiles in view, so you can zoom in to 20 times and stay sharp. With `speed="86400"` (a day a second; the name `<chikyu-space>` uses) its clock runs on from the date shown and the Sun, the night side and the clouds follow it ([guide](docs/guides/time-and-play.md)). All of it, the budget and the tests:
|
|
179
|
+
tiles, [how](docs/guides/earth-tiles.md)) it loads only the finer tiles in view, so you can zoom in to 20 times and stay sharp. With `speed="86400"` (a day a second; the name `<chikyu-space>` uses) its clock runs on from the date shown and the Sun, the night side and the clouds follow it ([guide](docs/guides/time-and-play.md)). `immersive` fills the window, `camera="space"` holds the camera in the stars so the Earth turns beneath it, and it draws every satellite group at once ([guide](docs/guides/full-screen-and-camera.md)). All of it, the budget and the tests:
|
|
166
180
|
[docs/realistic.md](docs/realistic.md).
|
|
167
181
|
|
|
168
182
|
## The Sun, the Moon and the planets
|
|
@@ -173,6 +187,17 @@ computed in the browser by astronomy-engine (MIT), nothing is fetched. [docs/spa
|
|
|
173
187
|
|
|
174
188
|
<p align="center"><img alt="The solar system on 2 November 2026 in the compressed scale: orbits round the Sun, the planets named" src="docs/images/space-solar.png" width="420"></p>
|
|
175
189
|
|
|
190
|
+
## Meteors
|
|
191
|
+
|
|
192
|
+
`<chikyu-earth-realistic meteors>` and `<chikyu-space meteors>` draw meteors as they look from space: short streaks 80 to 120 km up, only on the dark side and in twilight, more of them under an active shower's radiant, and only while the clock runs. Each streak's place and moment are drawn at random, and the element says so under the picture; how many there are, where they fall, their height and the showers' dates are real. The showers are the International Meteor Organization's working list for 2026 (37 of them), in an entry point of its own with the rate functions, which needs no browser: [guide](docs/guides/meteors.md).
|
|
193
|
+
|
|
194
|
+
```js
|
|
195
|
+
import { activeShowers } from "@johnmorrisdotca/chikyu-earth/meteors";
|
|
196
|
+
|
|
197
|
+
// The showers active on the night of the Geminids' maximum, strongest first.
|
|
198
|
+
for (const { shower, zhr } of activeShowers(Date.UTC(2026, 11, 14, 8))) console.log(`${shower.name}: ${zhr.toFixed(1)} an hour`);
|
|
199
|
+
```
|
|
200
|
+
|
|
176
201
|
## Satellites
|
|
177
202
|
|
|
178
203
|
The ISS, a space station or thousands of Starlink satellites at the places SGP4 puts them for the date and time shown, on `<chikyu-space>`: a group is one draw call however many it holds, press one to get its name, height and speed, and its orbit is drawn. Chikyu fetches nothing: your page passes in orbital elements (CelesTrak's JSON, within its usage policy), and satellite.js (MIT, an optional peer) does the maths about once a second, with every frame between interpolated. `fetchElements(url)` reads OMM JSON, CSV or TLE from an address you choose, politely (https, not again within two hours, stop on any answer that is not 200). A satellite whose elements are more than 14 days from the time shown is drawn dimmer, and one more than 30 days away is left out. A group is hidden while the clock runs faster than 60 times real time. A small catalogue (`SATELLITE_GROUPS`, `CATALOGUE`, `findInCatalogue`) names fourteen groups (stations, weather, GPS, Galileo, OneWeb and more) and about forty satellites worth following, with no elements in it. The guide has the rules for getting elements and the budget, each line tested: [satellites guide](docs/guides/satellites.md), [docs/satellites.md](docs/satellites.md).
|
|
@@ -189,6 +214,8 @@ document.querySelector("chikyu-space")!.setSatellites("stations", createSatellit
|
|
|
189
214
|
|
|
190
215
|
## Passes: when can I see the ISS?
|
|
191
216
|
|
|
217
|
+
<p align="center"><img alt="The passes page on a desk: a place, the satellite, the days and the sky to choose; the list of passes; the sky dome with the pressed pass drawn across it; and the same path on a small globe" src="docs/images/passes-desk.webp" width="760"></p>
|
|
218
|
+
|
|
192
219
|
`findPasses(elements, place, { from, to })` gives the next passes of a satellite over a place: when it comes up, is highest and goes down (UTC, with the compass word and degrees at each, and the height), how bright it looks, and whether it can be seen, which needs the satellite in sunlight while the watcher's sky is in civil twilight or darker (each pass says which). It is a pure function over the same SGP4 as the rest, with no DOM and no clock. `skySvg` draws a pass across the sky as an SVG string, `groundTrack` gives the path under the satellite for a globe, and `<chikyu-passes>` lists the passes and draws the dome, in English and Japanese. The ISS, Tianhe and Hubble have estimated standard magnitudes (from their size and an assumed albedo); give better ones with `magnitudes`.
|
|
193
220
|
|
|
194
221
|
```ts
|
|
@@ -412,6 +439,7 @@ The reference is a site, made from the source's own doc comments: every export h
|
|
|
412
439
|
| `.../markers` | `attachMarkers` and the pure projection, clusters and labels. |
|
|
413
440
|
| `.../space`, `.../space/element` | The Sun, the Moon and the planets; `astronomy-engine` and `three`. |
|
|
414
441
|
| `.../satellites` | SGP4 for a group of satellites; `satellite.js`. |
|
|
442
|
+
| `.../meteors` | The year's meteor showers, and when and where their meteors fall. No DOM, no dependency. |
|
|
415
443
|
| `.../passes`, `.../passes/element` | Passes of a satellite over a place, the sky dome, `<chikyu-passes>`; `satellite.js`. |
|
|
416
444
|
|
|
417
445
|
## Guides
|
|
@@ -428,9 +456,11 @@ Each guide has a Japanese twin in [docs/guides/ja](docs/guides/ja/getting-starte
|
|
|
428
456
|
| [TypeScript and Node](docs/guides/typescript-and-node.md) | Types and the pure side |
|
|
429
457
|
| [The realistic Earth and markers](docs/guides/realistic-and-markers.md) | The Earth from space, markers |
|
|
430
458
|
| [Satellites](docs/guides/satellites.md) | SGP4 and the space view |
|
|
459
|
+
| [Full screen, the camera in the stars and every satellite](docs/guides/full-screen-and-camera.md) | `immersive`, `camera="space"`, the Earth's look, and every satellite group on the realistic Earth |
|
|
431
460
|
| [When can I see the ISS?](docs/guides/passes.md) | Passes over a place, the sky dome, how it was checked |
|
|
432
461
|
| [Ride along](docs/guides/ride-along.md) | A camera on a moving body |
|
|
433
462
|
| [The date follows the clock, and Play](docs/guides/time-and-play.md) | The `chikyu-timechange` event, a `speed` for the space view and the realistic Earth, Play, Pause and Back |
|
|
463
|
+
| [Meteors seen from space](docs/guides/meteors.md) | Streaks over the night side, the shower table, what is real and what is illustration |
|
|
434
464
|
| [Zoom, pan and turn](docs/guides/zoom-and-pan.md) | The hands every view carries, each zoom range and why |
|
|
435
465
|
| [Printable sheets](docs/guides/printable-sheets.md) | The globe, a world map, my country, day and night and the seasons to print and colour |
|
|
436
466
|
| [Why two packages](docs/guides/two-packages.md) | This package and wakusei-planets: which to install, alone and together |
|
|
@@ -441,10 +471,15 @@ Each guide has a Japanese twin in [docs/guides/ja](docs/guides/ja/getting-starte
|
|
|
441
471
|
|
|
442
472
|
## Limits
|
|
443
473
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
-
|
|
447
|
-
-
|
|
474
|
+
Chikyu Earth is made for learning, teaching, drawing and finding a satellite in the sky with your own eyes. It is not made for pointing an antenna or a telescope, for navigation, or for any work that needs a satellite's place to better than a few kilometres. It says where each number stops:
|
|
475
|
+
|
|
476
|
+
- **Outlines.** Natural Earth 1:110m: good for a globe, not for a street map. `COUNTRIES` has 177 features, Antarctica included. Three places have no two-letter code (`alpha2` is `null`), and Kosovo is `XK`.
|
|
477
|
+
- **The pictures of the Earth.** The land, the oceans and the clouds of the realistic look are fixed NASA pictures (Blue Marble of September 2004 and its clouds, the city lights of 2016), not today's weather or today's coast. What follows the date is the light: the Sun's place comes from NOAA's low-precision formulas, tested against the almanac to 0.05 degree, so the direction of the light is right to about 0.05 degree, and the dusk is drawn as a soft band; it is not a table of sunrise or twilight times.
|
|
478
|
+
- **Satellite places.** They are SGP4's, from orbital elements you supply, which are only a snapshot: the error grows by a few kilometres a day, the ISS is moved by a reboost every month or two, and elements more than 14 days from the date shown are drawn dimmer and past 30 days left out. Good for a picture.
|
|
479
|
+
- **Passes.** Times, directions and heights matched Skyfield on 249 passes, every time within a second and every direction within 0.06 degree away from straight overhead (the [passes guide](docs/guides/passes.md#how-well-it-matches) has the numbers), but a pass is only as good as the elements are new, and the brightness is a model good to a magnitude or two, not a measurement.
|
|
480
|
+
- **The Sun, the Moon and the planets** come from astronomy-engine and are drawn for a picture: on the compressed scale the distances are squeezed and the bodies drawn larger than life, and between two lookups the Moon is placed by interpolation within 0.1 degree. A table of measured accuracy for the realistic look and the satellites is not published yet.
|
|
481
|
+
- **WebGL.** The Earth from space and the space view need it; without it the line globe is drawn.
|
|
482
|
+
- **Data terms.** [NOTICE.md](NOTICE.md) gives the terms of every source. CelesTrak states no licence or credit rule for its element sets: the demo uses them as a snapshot, within its usage policy and with credit, and never fetches them for a visitor; NOTICE.md says so.
|
|
448
483
|
|
|
449
484
|
```ts
|
|
450
485
|
import { countryList } from "@johnmorrisdotca/chikyu-earth";
|
|
@@ -452,6 +487,12 @@ import { countryList } from "@johnmorrisdotca/chikyu-earth";
|
|
|
452
487
|
console.log(countryList().filter((country) => country.alpha2 === null).map((country) => country.name));
|
|
453
488
|
```
|
|
454
489
|
|
|
490
|
+
## How to cite
|
|
491
|
+
|
|
492
|
+
> Morris, J. (2026). *Chikyu Earth* (version 0.26.0) [Computer software]. https://github.com/johnmorrisdotca/chikyu-earth
|
|
493
|
+
|
|
494
|
+
GitHub's "Cite this repository" button reads [CITATION.cff](CITATION.cff) and gives BibTeX and APA. Cite the version you used (`npm ls @johnmorrisdotca/chikyu-earth`), and credit the sources behind the numbers and pictures: [NOTICE.md](NOTICE.md) says who made each one and under what terms.
|
|
495
|
+
|
|
455
496
|
## Accessibility
|
|
456
497
|
|
|
457
498
|
- A reader who prefers reduced motion gets a still globe, and the riding-along camera draws at most one frame a second.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One meteor shower of the working list.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { METEOR_SHOWERS, type MeteorShower } from "@johnmorrisdotca/chikyu-earth/meteors";
|
|
7
|
+
*
|
|
8
|
+
* const perseids: MeteorShower | undefined = METEOR_SHOWERS.find((shower) => shower.code === "PER");
|
|
9
|
+
* console.log(perseids?.name, perseids?.zhr, perseids?.parent);
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export interface MeteorShower {
|
|
13
|
+
/** The IAU's three-letter code: `PER` for the Perseids. */
|
|
14
|
+
code: string;
|
|
15
|
+
/** The IAU's number for the shower. */
|
|
16
|
+
iau: number;
|
|
17
|
+
name: string;
|
|
18
|
+
/** The name used in Japan. */
|
|
19
|
+
nameJa: string;
|
|
20
|
+
/** The first day of activity, as month (1 to 12) and day. A shower may run over the new year. */
|
|
21
|
+
start: readonly [month: number, day: number];
|
|
22
|
+
/** The last day of activity. */
|
|
23
|
+
end: readonly [month: number, day: number];
|
|
24
|
+
/** The day of the maximum in 2026; in other years it can fall a day either side. `peakSolarLongitude` is the lasting figure. */
|
|
25
|
+
peak: readonly [month: number, day: number];
|
|
26
|
+
/** The Sun's longitude at the maximum, in degrees, for the equinox of 2000.0: where the Earth is on its orbit, whatever the calendar says. */
|
|
27
|
+
peakSolarLongitude: number;
|
|
28
|
+
/** The radiant at the maximum: right ascension and declination, in degrees. */
|
|
29
|
+
radiant: {
|
|
30
|
+
ra: number;
|
|
31
|
+
dec: number;
|
|
32
|
+
};
|
|
33
|
+
/** The speed the meteors meet the atmosphere at, in kilometres a second: 11 is very slow, 72 very fast. */
|
|
34
|
+
speedKmS: number;
|
|
35
|
+
/** The population index r: 2.0 to 2.5 has more bright meteors than average, above 3.0 more faint ones. */
|
|
36
|
+
populationIndex: number;
|
|
37
|
+
/** The zenithal hourly rate at the maximum: what an ideal watcher would count in an hour under a perfect sky with the radiant overhead. `null` where the list says the rate varies from year to year. */
|
|
38
|
+
zhr: number | null;
|
|
39
|
+
/** The comet or asteroid whose dust it is, where a source used here names one. */
|
|
40
|
+
parent?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The working list, in the order of the year.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* import { METEOR_SHOWERS } from "@johnmorrisdotca/chikyu-earth/meteors";
|
|
48
|
+
*
|
|
49
|
+
* const strongest = [...METEOR_SHOWERS].sort((a, b) => (b.zhr ?? 0) - (a.zhr ?? 0))[0];
|
|
50
|
+
* console.log(METEOR_SHOWERS.length, strongest?.name); // 37 "Geminids"
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare const METEOR_SHOWERS: readonly MeteorShower[];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// The meteor showers a watcher can see: the International Meteor Organization's Working List of Visual Meteor Showers
|
|
2
|
+
// (Table 5 of its 2026 Meteor Shower Calendar, edited by Jürgen Rendtel; "correct according to the best information available in
|
|
3
|
+
// June 2025, with maximum dates accurate only for 2026"), typed by hand on 2026-11-10. The Antihelion Source, which has no fixed
|
|
4
|
+
// radiant, is left out. Parent bodies are only those the Calendar's own text names (Lyrids, June Bootids, Perseids, Draconids,
|
|
5
|
+
// Taurids, Leonids) or that NASA's pages on the shower name (Quadrantids, eta Aquariids, Orionids, Geminids); the rest have none here.
|
|
6
|
+
// The Japanese names are the ones used in Japan for each shower. See NOTICE.md.
|
|
7
|
+
// No imports: this file is data only, so another package can read it without taking anything else.
|
|
8
|
+
/**
|
|
9
|
+
* The working list, in the order of the year.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { METEOR_SHOWERS } from "@johnmorrisdotca/chikyu-earth/meteors";
|
|
14
|
+
*
|
|
15
|
+
* const strongest = [...METEOR_SHOWERS].sort((a, b) => (b.zhr ?? 0) - (a.zhr ?? 0))[0];
|
|
16
|
+
* console.log(METEOR_SHOWERS.length, strongest?.name); // 37 "Geminids"
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export const METEOR_SHOWERS = [
|
|
20
|
+
{ code: "QUA", iau: 10, name: "Quadrantids", nameJa: "しぶんぎ座流星群", start: [12, 28], end: [1, 12], peak: [1, 3], peakSolarLongitude: 283.15, radiant: { ra: 230, dec: 49 }, speedKmS: 41, populationIndex: 2.1, zhr: 80, parent: "asteroid 2003 EH1" },
|
|
21
|
+
{ code: "GUM", iau: 404, name: "γ-Ursae Minorids", nameJa: "こぐま座γ流星群", start: [1, 10], end: [1, 22], peak: [1, 18], peakSolarLongitude: 298, radiant: { ra: 228, dec: 67 }, speedKmS: 31, populationIndex: 3.0, zhr: 3 },
|
|
22
|
+
{ code: "ACE", iau: 102, name: "α-Centaurids", nameJa: "ケンタウルス座α流星群", start: [1, 31], end: [2, 20], peak: [2, 8], peakSolarLongitude: 319.4, radiant: { ra: 211, dec: -58 }, speedKmS: 58, populationIndex: 2.0, zhr: 6 },
|
|
23
|
+
{ code: "LYR", iau: 6, name: "April Lyrids", nameJa: "4月こと座流星群", start: [4, 14], end: [4, 30], peak: [4, 22], peakSolarLongitude: 32.32, radiant: { ra: 271, dec: 34 }, speedKmS: 49, populationIndex: 2.1, zhr: 18, parent: "comet C/1861 G1 (Thatcher)" },
|
|
24
|
+
{ code: "PPU", iau: 137, name: "π-Puppids", nameJa: "とも座π流星群", start: [4, 15], end: [4, 28], peak: [4, 24], peakSolarLongitude: 33.5, radiant: { ra: 110, dec: -45 }, speedKmS: 18, populationIndex: 2.0, zhr: null },
|
|
25
|
+
{ code: "ETA", iau: 31, name: "η-Aquariids", nameJa: "みずがめ座η流星群", start: [4, 19], end: [5, 28], peak: [5, 6], peakSolarLongitude: 45.5, radiant: { ra: 338, dec: -1 }, speedKmS: 66, populationIndex: 2.4, zhr: 50, parent: "comet 1P/Halley" },
|
|
26
|
+
{ code: "ELY", iau: 145, name: "η-Lyrids", nameJa: "こと座η流星群", start: [5, 3], end: [5, 14], peak: [5, 11], peakSolarLongitude: 50.0, radiant: { ra: 291, dec: 43 }, speedKmS: 43, populationIndex: 3.0, zhr: 3 },
|
|
27
|
+
{ code: "ARI", iau: 171, name: "Daytime Arietids", nameJa: "おひつじ座昼間流星群", start: [5, 14], end: [6, 24], peak: [6, 7], peakSolarLongitude: 76.7, radiant: { ra: 43, dec: 24 }, speedKmS: 38, populationIndex: 2.8, zhr: 30 },
|
|
28
|
+
{ code: "JBO", iau: 170, name: "June Bootids", nameJa: "6月うしかい座流星群", start: [6, 22], end: [7, 2], peak: [6, 22], peakSolarLongitude: 90.3, radiant: { ra: 221, dec: 48 }, speedKmS: 18, populationIndex: 2.2, zhr: null, parent: "comet 7P/Pons-Winnecke" },
|
|
29
|
+
{ code: "JPE", iau: 175, name: "July Pegasids", nameJa: "7月ペガスス座流星群", start: [7, 1], end: [7, 20], peak: [7, 10], peakSolarLongitude: 108.0, radiant: { ra: 347, dec: 11 }, speedKmS: 63, populationIndex: 3.0, zhr: 3 },
|
|
30
|
+
{ code: "GDR", iau: 184, name: "July γ-Draconids", nameJa: "7月りゅう座γ流星群", start: [7, 25], end: [7, 31], peak: [7, 28], peakSolarLongitude: 125.13, radiant: { ra: 280, dec: 51 }, speedKmS: 27, populationIndex: 3.0, zhr: 5 },
|
|
31
|
+
{ code: "SDA", iau: 5, name: "Southern δ-Aquariids", nameJa: "みずがめ座δ南流星群", start: [7, 12], end: [8, 23], peak: [7, 31], peakSolarLongitude: 128, radiant: { ra: 340, dec: -16 }, speedKmS: 41, populationIndex: 2.5, zhr: 25 },
|
|
32
|
+
{ code: "CAP", iau: 1, name: "α-Capricornids", nameJa: "やぎ座α流星群", start: [7, 3], end: [8, 15], peak: [7, 31], peakSolarLongitude: 128, radiant: { ra: 307, dec: -10 }, speedKmS: 23, populationIndex: 2.5, zhr: 5 },
|
|
33
|
+
{ code: "ERI", iau: 191, name: "η-Eridanids", nameJa: "エリダヌス座η流星群", start: [7, 31], end: [8, 19], peak: [8, 7], peakSolarLongitude: 135, radiant: { ra: 41, dec: -11 }, speedKmS: 64, populationIndex: 3.0, zhr: 3 },
|
|
34
|
+
{ code: "PER", iau: 7, name: "Perseids", nameJa: "ペルセウス座流星群", start: [7, 17], end: [8, 24], peak: [8, 13], peakSolarLongitude: 140.0, radiant: { ra: 48, dec: 58 }, speedKmS: 59, populationIndex: 2.2, zhr: 100, parent: "comet 109P/Swift-Tuttle" },
|
|
35
|
+
{ code: "KCG", iau: 12, name: "κ-Cygnids", nameJa: "はくちょう座κ流星群", start: [8, 3], end: [8, 28], peak: [8, 17], peakSolarLongitude: 144, radiant: { ra: 286, dec: 59 }, speedKmS: 23, populationIndex: 3.0, zhr: 3 },
|
|
36
|
+
{ code: "AUR", iau: 206, name: "Aurigids", nameJa: "ぎょしゃ座流星群", start: [8, 28], end: [9, 5], peak: [9, 1], peakSolarLongitude: 158.6, radiant: { ra: 91, dec: 39 }, speedKmS: 66, populationIndex: 2.5, zhr: 6 },
|
|
37
|
+
{ code: "SPE", iau: 208, name: "September ε-Perseids", nameJa: "9月ペルセウス座ε流星群", start: [9, 5], end: [9, 21], peak: [9, 9], peakSolarLongitude: 166.7, radiant: { ra: 48, dec: 40 }, speedKmS: 64, populationIndex: 2.5, zhr: 8 },
|
|
38
|
+
{ code: "SLY", iau: 81, name: "September Lyncids", nameJa: "9月やまねこ座流星群", start: [9, 10], end: [10, 8], peak: [9, 13], peakSolarLongitude: 170, radiant: { ra: 113, dec: 56 }, speedKmS: 60, populationIndex: 3.0, zhr: 3 },
|
|
39
|
+
{ code: "DSX", iau: 221, name: "Daytime Sextantids", nameJa: "ろくぶんぎ座昼間流星群", start: [9, 20], end: [10, 6], peak: [10, 1], peakSolarLongitude: 188, radiant: { ra: 156, dec: -2 }, speedKmS: 32, populationIndex: 2.5, zhr: 5 },
|
|
40
|
+
{ code: "OCT", iau: 281, name: "October Camelopardalids", nameJa: "10月きりん座流星群", start: [10, 5], end: [10, 6], peak: [10, 6], peakSolarLongitude: 192.58, radiant: { ra: 164, dec: 79 }, speedKmS: 47, populationIndex: 2.5, zhr: 5 },
|
|
41
|
+
{ code: "DRA", iau: 9, name: "Draconids", nameJa: "10月りゅう座流星群", start: [10, 6], end: [10, 10], peak: [10, 9], peakSolarLongitude: 195.4, radiant: { ra: 262, dec: 54 }, speedKmS: 20, populationIndex: 2.6, zhr: 5, parent: "comet 21P/Giacobini-Zinner" },
|
|
42
|
+
{ code: "EGE", iau: 23, name: "ε-Geminids", nameJa: "ふたご座ε流星群", start: [10, 14], end: [10, 27], peak: [10, 18], peakSolarLongitude: 205, radiant: { ra: 102, dec: 27 }, speedKmS: 70, populationIndex: 3.0, zhr: 3 },
|
|
43
|
+
{ code: "ORI", iau: 8, name: "Orionids", nameJa: "オリオン座流星群", start: [10, 2], end: [11, 7], peak: [10, 21], peakSolarLongitude: 208, radiant: { ra: 95, dec: 16 }, speedKmS: 66, populationIndex: 2.5, zhr: 20, parent: "comet 1P/Halley" },
|
|
44
|
+
{ code: "LMI", iau: 22, name: "Leonis Minorids", nameJa: "こじし座流星群", start: [10, 19], end: [10, 27], peak: [10, 24], peakSolarLongitude: 211, radiant: { ra: 162, dec: 37 }, speedKmS: 62, populationIndex: 3.0, zhr: 2 },
|
|
45
|
+
{ code: "STA", iau: 2, name: "Southern Taurids", nameJa: "おうし座南流星群", start: [9, 20], end: [11, 20], peak: [11, 5], peakSolarLongitude: 223, radiant: { ra: 52, dec: 15 }, speedKmS: 27, populationIndex: 2.3, zhr: 7, parent: "comet 2P/Encke" },
|
|
46
|
+
{ code: "NTA", iau: 17, name: "Northern Taurids", nameJa: "おうし座北流星群", start: [10, 20], end: [12, 10], peak: [11, 12], peakSolarLongitude: 230, radiant: { ra: 58, dec: 22 }, speedKmS: 29, populationIndex: 2.3, zhr: 5, parent: "comet 2P/Encke" },
|
|
47
|
+
{ code: "LEO", iau: 13, name: "Leonids", nameJa: "しし座流星群", start: [11, 6], end: [11, 30], peak: [11, 17], peakSolarLongitude: 235.27, radiant: { ra: 152, dec: 22 }, speedKmS: 71, populationIndex: 2.5, zhr: 15, parent: "comet 55P/Tempel-Tuttle" },
|
|
48
|
+
{ code: "AMO", iau: 246, name: "α-Monocerotids", nameJa: "いっかくじゅう座α流星群", start: [11, 15], end: [11, 25], peak: [11, 22], peakSolarLongitude: 239.32, radiant: { ra: 117, dec: 1 }, speedKmS: 65, populationIndex: 2.4, zhr: null },
|
|
49
|
+
{ code: "NOO", iau: 250, name: "November Orionids", nameJa: "11月オリオン座流星群", start: [11, 13], end: [12, 6], peak: [11, 28], peakSolarLongitude: 246, radiant: { ra: 91, dec: 16 }, speedKmS: 44, populationIndex: 3.0, zhr: 3 },
|
|
50
|
+
{ code: "PHO", iau: 254, name: "Phoenicids", nameJa: "ほうおう座流星群", start: [12, 1], end: [12, 5], peak: [12, 2], peakSolarLongitude: 249.5, radiant: { ra: 8, dec: -27 }, speedKmS: 15, populationIndex: 2.8, zhr: null },
|
|
51
|
+
{ code: "PUP", iau: 301, name: "Puppid-Velids", nameJa: "とも座・ほ座流星群", start: [12, 1], end: [12, 15], peak: [12, 7], peakSolarLongitude: 255, radiant: { ra: 123, dec: -45 }, speedKmS: 44, populationIndex: 2.9, zhr: 10 },
|
|
52
|
+
{ code: "MON", iau: 19, name: "Monocerotids", nameJa: "12月いっかくじゅう座流星群", start: [12, 1], end: [12, 19], peak: [12, 9], peakSolarLongitude: 257, radiant: { ra: 100, dec: 8 }, speedKmS: 41, populationIndex: 3.0, zhr: 3 },
|
|
53
|
+
{ code: "HYD", iau: 16, name: "σ-Hydrids", nameJa: "うみへび座σ流星群", start: [12, 3], end: [12, 20], peak: [12, 9], peakSolarLongitude: 257, radiant: { ra: 125, dec: 2 }, speedKmS: 58, populationIndex: 3.0, zhr: 7 },
|
|
54
|
+
{ code: "GEM", iau: 4, name: "Geminids", nameJa: "ふたご座流星群", start: [12, 4], end: [12, 20], peak: [12, 14], peakSolarLongitude: 262.2, radiant: { ra: 112, dec: 33 }, speedKmS: 35, populationIndex: 2.6, zhr: 150, parent: "asteroid (3200) Phaethon" },
|
|
55
|
+
{ code: "COM", iau: 20, name: "Comae Berenicids", nameJa: "かみのけ座流星群", start: [12, 4], end: [1, 30], peak: [12, 23], peakSolarLongitude: 271, radiant: { ra: 164, dec: 29 }, speedKmS: 65, populationIndex: 3.0, zhr: 3 },
|
|
56
|
+
{ code: "URS", iau: 15, name: "Ursids", nameJa: "こぐま座流星群", start: [12, 17], end: [12, 26], peak: [12, 22], peakSolarLongitude: 270.7, radiant: { ra: 217, dec: 76 }, speedKmS: 33, populationIndex: 2.8, zhr: 10 },
|
|
57
|
+
];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { METEOR_SHOWERS, type MeteorShower } from "../data/meteor-showers.ts";
|
|
2
|
+
export { METEOR_HEIGHT_KM, SPORADIC_HOURLY_RATE, activeShowers, apexPoint, darkness, hourlyRateAt, meteorSky, placeVector, pointBeneath, showerRate, solarLongitude, type MeteorSky } from "./rate.ts";
|
|
3
|
+
export { METEORS_PER_SECOND_MAX, METEOR_SLOTS, streakPath, streaksPerSecond } from "./layer.ts";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Meteors: the showers of the year, when and where their meteors fall, and how the realistic Earth draws them from space.
|
|
2
|
+
// Everything here is pure (no DOM, no three.js) and imports in a browser, in Node and in another package. The streaks themselves
|
|
3
|
+
// are switched on with the `meteors` attribute of `<chikyu-earth-realistic>` (`@johnmorrisdotca/chikyu-earth/realistic/element`).
|
|
4
|
+
export { METEOR_SHOWERS } from "../data/meteor-showers.js";
|
|
5
|
+
export { METEOR_HEIGHT_KM, SPORADIC_HOURLY_RATE, activeShowers, apexPoint, darkness, hourlyRateAt, meteorSky, placeVector, pointBeneath, showerRate, solarLongitude } from "./rate.js";
|
|
6
|
+
export { METEORS_PER_SECOND_MAX, METEOR_SLOTS, streakPath, streaksPerSecond } from "./layer.js";
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
import type { ThreeParts } from "../realistic/textures.ts";
|
|
3
|
+
import type { MeteorShower } from "../data/meteor-showers.ts";
|
|
4
|
+
type Three = ThreeParts;
|
|
5
|
+
type Vec3 = [number, number, number];
|
|
6
|
+
/**
|
|
7
|
+
* The most streaks alive at once: the size of the one mesh they are drawn as.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { METEOR_SLOTS } from "@johnmorrisdotca/chikyu-earth/meteors";
|
|
12
|
+
*
|
|
13
|
+
* console.log(METEOR_SLOTS); // 48
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const METEOR_SLOTS = 48;
|
|
17
|
+
/**
|
|
18
|
+
* The most streaks drawn in a second, however strong the shower.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { METEORS_PER_SECOND_MAX } from "@johnmorrisdotca/chikyu-earth/meteors";
|
|
23
|
+
*
|
|
24
|
+
* console.log(METEORS_PER_SECOND_MAX); // 9
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const METEORS_PER_SECOND_MAX = 9;
|
|
28
|
+
/** The meteors' part of the Earth's model: what the element sets, and what the layer wrote at its last step. */
|
|
29
|
+
export interface MeteorState {
|
|
30
|
+
on: boolean;
|
|
31
|
+
/** Whether new streaks may start now (the clock runs, the page is in view, and a reader who asked for less motion has pressed Play). */
|
|
32
|
+
running: () => boolean;
|
|
33
|
+
/** Told when the strongest active shower changes, with `null` when none is active. */
|
|
34
|
+
onShower?: (shower: MeteorShower | null, zhr: number) => void;
|
|
35
|
+
random: () => number;
|
|
36
|
+
drawn: {
|
|
37
|
+
alive: number;
|
|
38
|
+
spawned: number;
|
|
39
|
+
perSecond: number;
|
|
40
|
+
shower: string | null;
|
|
41
|
+
zhr: number;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export declare const newMeteorState: () => MeteorState;
|
|
45
|
+
/** What the layer needs at each step. The vectors are in the Earth's own axes (see `placeVector`). */
|
|
46
|
+
export interface MeteorStep {
|
|
47
|
+
/** The page's clock, in milliseconds (`performance.now()`). */
|
|
48
|
+
now: number;
|
|
49
|
+
/** The moment shown, in milliseconds since the epoch. */
|
|
50
|
+
time: number;
|
|
51
|
+
/** The place at the middle of the view. */
|
|
52
|
+
facing: Vec3;
|
|
53
|
+
/** The place the Sun is overhead. */
|
|
54
|
+
sun: Vec3;
|
|
55
|
+
/** The Earth's radius on the screen, in CSS pixels. */
|
|
56
|
+
radius: number;
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
}
|
|
60
|
+
export interface MeteorLayer {
|
|
61
|
+
/** Put the streaks right for now; returns the milliseconds until the next draw is wanted, or `Infinity` when nothing is moving and nothing is due. */
|
|
62
|
+
step(input: MeteorStep): number;
|
|
63
|
+
dispose(): void;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* How many streaks a second are drawn for a mean hourly rate over the dark part of the view: 2.5 a second where the whole view is dark on a
|
|
67
|
+
* night with no shower, more with a shower but squeezed (the 0.6th power) and never over nine, none where nothing in view is dark.
|
|
68
|
+
* A streak stands for a great many meteors: the count follows the real rate, it does not equal it.
|
|
69
|
+
*
|
|
70
|
+
* @param meanHourlyRate - The mean over the view of each place's hourly rate times how dark it is there (`hourlyRateAt`, `darkness`).
|
|
71
|
+
* @returns Streaks a second.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* import { streaksPerSecond } from "@johnmorrisdotca/chikyu-earth/meteors";
|
|
76
|
+
*
|
|
77
|
+
* console.log(streaksPerSecond(8), streaksPerSecond(0), streaksPerSecond(100000)); // 2.5 0 9
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export declare function streaksPerSecond(meanHourlyRate: number): number;
|
|
81
|
+
/**
|
|
82
|
+
* Where one streak runs: from `start` to `end`, in Earth radii from the centre, in the Earth's own axes.
|
|
83
|
+
* It ends `METEOR_HEIGHT_KM.bottom + 5` km up and comes down the line from the radiant; its true length is the drop in height
|
|
84
|
+
* divided by the sine of the radiant's height, at most 260 km, and `stretch` (1 or more) lengthens it for the eye.
|
|
85
|
+
*
|
|
86
|
+
* @param place - The unit vector of the place it ends over.
|
|
87
|
+
* @param radiant - The unit vector towards the radiant (it must stand above that place's horizon).
|
|
88
|
+
* @param stretch - How many times longer than true to draw it; 1 is true.
|
|
89
|
+
* @returns The two ends, and the true length in kilometres.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* import { placeVector, streakPath } from "@johnmorrisdotca/chikyu-earth/meteors";
|
|
94
|
+
*
|
|
95
|
+
* const place = placeVector({ lon: 0, lat: 0 });
|
|
96
|
+
* // Straight down from overhead: it falls 25 km, from 110 km up to 85 km.
|
|
97
|
+
* const path = streakPath(place, place, 1);
|
|
98
|
+
* console.log(path.km.toFixed(0), ((Math.hypot(...path.start) - 1) * 6371).toFixed(0)); // "25" "110"
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export declare function streakPath(place: readonly [number, number, number], radiant: readonly [number, number, number], stretch?: number): {
|
|
102
|
+
start: Vec3;
|
|
103
|
+
end: Vec3;
|
|
104
|
+
km: number;
|
|
105
|
+
};
|
|
106
|
+
/** Make the layer inside `parent`, an object that turns with the Earth and has the Earth's own axes and a radius of 1 (a group, or the Earth's own mesh). Nothing is drawn until `step` starts a streak. */
|
|
107
|
+
export declare function createMeteorLayer(three: Three, parent: THREE.Object3D, state: MeteorState): MeteorLayer;
|
|
108
|
+
export {};
|