@johnmorrisdotca/chikyu-earth 0.65.1 → 0.67.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 CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.67.0 - 2026-11-23
6
+
7
+ - **`<chikyu-flat>`'s marks have names and a key** (MODULES-1768). The yellow dot (the Sun overhead) and the white diamond (My place) were painted into the map and said nothing; nothing on the map was explained.
8
+ - **The key.** Under the map, never over it, a row names every mark drawn now, each beside its picture, in English and Japanese: the Sun overhead, My place, a satellite (its colour is its group or its orbital plane), a faint satellite (old orbit data), the satellite you chose, the footprint, the ground track in sunlight and in the shadow, the night side (in the photo look, darker with city lights). What is not drawn is not listed. Open on a map 600 px wide or more, shut on a narrower one until the Key button is pressed; `keyOpen` sets it; `controls` without `key` leaves it out. While it is open the track's own key over the map steps aside.
9
+ - **They name themselves.** The Sun's dot says "The Sun is overhead here: over the Atlantic Ocean, 23°S 15°W" and the diamond "My place: Japan, 36°N 140°E" (English and Japanese) on hover, on a tap (the name stays beside it until a tap elsewhere or Escape: a finger cannot hover) and on focus: Tab goes from the map to each mark, which has a button over it that takes no pointer, so a drag that starts on a mark still pans. A press sends `chikyu-flat-mark` (`{ mark, name, text, lon, lat, place, via }`).
10
+ - **Photo look.** The Sun's dot has a dark edge and a pale ring over the picture.
11
+ - **`--chikyu-flat-key-inset`** keeps room at the left of the key (0 by default) for a page's card that lies over the map's left side.
12
+ - **The photo's credit is one small line.** It covered a third of a phone's map. It is now a button at the map's bottom edge: the whole line on a map 600 px wide or more, `Earth: NASA` (`地球:NASA`) on a narrower one, where a tap shows the whole line; the key carries the whole line too.
13
+ - **Pure parts** in `/flat`: `pointText` and `placeOver` (the country, else the nearest ocean or sea), with unit tests, and `e2e/flat-key.demo.ts` (hover, tap, Tab and Enter, the key's contents in both languages and both looks, and on a phone).
14
+ - **`<chikyu-flat>` can show the real picture of the Earth** (MODULES-1767). `look="photo"` (property `look`) lays NASA's Blue Marble on the map instead of the drawn countries; `look="map"`, or no attribute, is the drawn map exactly as before.
15
+ - **The same pictures as the 3D Earth.** The day and night files of `<chikyu-earth-realistic>` (`textures/day-*.webp`, `night-*.webp`) and their credit (NASA Earth Observatory, public domain), shown in the corner of the map while the photo is on; no new data. `texture-base` and `max-texture` work as on the Earth.
16
+ - **A Map / Photo pair of buttons** is one of the map's own controls: `controls="centre look"` (`look` is not in the default list, so no existing page gets a new button).
17
+ - **Lined up with the projection.** The picture follows the centre, the zoom and the wrap round the date line to the pixel. Where the map shows night, the day picture darkens and the night picture's city lights come on across the terminator, for the moment shown. `borders="off"` removes the thin country lines. The satellites have a dark rim and the footprint a dark edge over the photo.
18
+ - **Cost.** The pictures are fetched only while the look is `photo`, one size of each at a time (1024, 2048, 4096 for the day), a smaller one after the zoom has stayed out for 4 seconds, and freed when the look goes back or the element leaves the page. The canvases keep to 6 million pixels and 4096 a side; nothing is drawn at rest.
19
+ - **For the page.** `lookState` (`map`, `loading`, `photo`, `failed`) and the event `chikyu-flat-look` (`{ look, state }`); a picture that cannot be fetched leaves the drawn map. Pure parts in `/flat`: `readLook`, `photoWidth`, `photoPieces`, `nightWeights` and the types `FlatLook` and `PhotoPiece`, with unit tests (`test/flat.test.ts`: the Nile delta, Florida and Tokyo land at the picture's own pixel at several centres, zooms and boxes) and `e2e/flat-photo.demo.ts`. The demo's flat page has Map and Photo buttons (`?look=photo`).
20
+
21
+ ## 0.66.0 - 2026-11-22
22
+
23
+ - **A lost context that the browser never gives back no longer leaves the labels over a black view** (MODULES-1499). On a phone that lost the WebGL context (iOS Safari under memory pressure) the Earth and the stars stopped being drawn while the city, star and place names stayed where the last frame put them, for good. Two changes, in `chikyu-space` and `chikyu-earth-realistic`. While `data-state` is `lost` the names, places, compass and notes are hidden, so nothing is left over a view that is not drawn. And the element now follows the shared renderer's own state: when kazoku-ui's renderer makes a new context after `restoreMs` (its next release; this is the half that needs it) the element goes back to `live`, and when none can be made it sends `chikyu-unavailable`, as for a browser with no WebGL. Tests: `e2e/space.gl.ts` (a context never restored is made again on a new canvas with the names hidden meanwhile and the Earth drawn; one that cannot be made ends as `chikyu-unavailable`) and `e2e/tiles.gl.ts` (the same for the realistic Earth). With a kazoku-ui from before the fix the first of them stays on `lost` and fails.
24
+ - **The places can be reached from the keyboard** (MODULES-1348). The place marks are hidden from a screen reader and take no pointer, so a reader with no mouse could not reach a place, though a press sends `chikyu-place-click`. On `<chikyu-space>` and `<chikyu-earth-realistic>`, the two elements that draw places, a focused element now has a way in.
25
+ - **The keys.** `P` goes to the next place in the picture from the left and `Shift`+`P` to the one before (round at the ends); `Enter` sends the same `chikyu-place-click` a press does (`id`, `kind`, `layer`, `label`, `lon`, `lat`, and `x`, `y` at the place's foot); `Escape` lets go. The view's keys (arrows, `+`, `-`, `0`, `Home`, `Space`), the ride's `W` `A` `S` `D` `R` `F` and the constellations' `C` are not taken, and a key with `Ctrl`, `Cmd` or `Alt` is left to the browser. `Enter` with no place chosen is the page's.
26
+ - **Which place.** A white ring with a dark edge is on the chosen place, turns with the Earth and goes when focus leaves, on `Escape`, when the place is taken from the list or its layer is switched off, and when the place is off the picture. No extra draw: the ring is the page layer's own.
27
+ - **Said aloud.** A live region in the element's shadow root says "Osaka, 2 of 5" (`label`, else `id`), or the same in Japanese on a Japanese page (`lang` of the nearest ancestor that has one); "No places in view" and "{name} is not in view" (when `Enter` is pressed on a place turned out of sight, which sends nothing) in both languages. An element with places is `role="group"` (it was `img`, whose inside a screen reader skips), and back to `img` with none; a `role` the page set is left alone.
28
+ - **What it reaches.** The places a press can reach (a marker or a ring in sight, not the far side, not a hidden layer); a place gathered into a crowd's counted ring is reached once the zoom opens it.
29
+ - **API.** `PlaceLayer` gains `reachable()`, `current`, `step(delta)` and `where(place)`; `bindPlaceKeys` and `placeKeyWords` are in `markers/place-keys.ts` (internal).
30
+ - **Tests.** `test/place-keys.test.ts` (stepping and wrapping, the ring following the picture and letting go, the words in both languages, the keys, `Enter`'s event, the keys left alone, the role) and `e2e/place-keys.gl.ts` on both elements: the ring is on the place, the live region and the accessibility tree carry the name, `Enter` sends the event, the arrow keys still turn the view with a place chosen, and a Japanese page hears Japanese. The places guide and the README, in English and Japanese.
31
+ - **The chosen satellite's name goes when the Earth hides the satellite** (MODULES-1766). The name beside the chosen satellite (`.sp-sat`) was put where the satellite projects on the screen whether the Earth was in front of it or not, so with the satellite on the far side its name was drawn on the Earth's face. the satellite layer's `place()`, which the name follows, now says there is no place while the Earth is in the way, by the same test the rings and `placeSatellite` use (a graze at the limb still counts as in view, so the name does not flicker there). A name that the pointer rests on, the ring names (`dim-occluded`, which dims a hidden name on purpose) and `pick` already left out a satellite the Earth hides. Tests: `test/satellite-layer.test.ts` and `e2e/chosen-name.gl.ts`.
32
+
5
33
  ## 0.65.1 - 2026-11-20
6
34
 
7
35
  - **Looking at Jupiter waits until the camera has arrived** (MODULES-1233). The space test no longer reads the distance a few seconds after the click. It waits until the element says the body is Jupiter and the distance has held still, then requires that distance, and a camera kept off Jupiter still fails. Test only.
package/NOTICE.md CHANGED
@@ -47,6 +47,8 @@ re-encoded as WebP. NASA says its content "generally are not subject to copyrigh
47
47
  source of the material" (https://www.nasa.gov/nasa-brand-center/images-and-media/, read 2026-11-02). These are NASA's own images, not third-party
48
48
  material, so no other licence applies. This package is not endorsed by NASA and uses none of NASA's insignia or logotype.
49
49
 
50
+ `<chikyu-flat look="photo">` draws the `day-*.webp` and `night-*.webp` pictures on its flat map (2026-11-21): the same files, under the same terms, with the credit of `chikyu-pictures` shown in the corner of the map. No other data is added.
51
+
50
52
  | Picture | Source | Credit |
51
53
  |---|---|---|
52
54
  | `day-*.webp` | Blue Marble: Next Generation with topography and bathymetry, September 2004, 5400 x 2700 (https://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73801/world.topo.bathy.200409.3x5400x2700.jpg, Visible Earth 73801) | NASA Earth Observatory (Reto Stöckli, Blue Marble Next Generation) |
package/README.md CHANGED
@@ -252,7 +252,7 @@ console.log(bodyLabelText("en"), bodyLabelText("ja"), BODY_LABEL_ATTRIBUTES.leng
252
252
 
253
253
  `route` on `<chikyu-earth>`, `<chikyu-earth-realistic>` and `<chikyu-space>` draws the line between two places (`lon,lat,lon,lat`). `routeInfo` gives the accurate distance on the Earth's real shape, the great-circle distance, the bearings and a flight time at 900 km/h. The line is off until it is set, and nothing is drawn at rest: [guide](docs/guides/routes.md).
254
254
 
255
- `places` on `<chikyu-space>` and `<chikyu-earth-realistic>` marks places on the Earth, each a beam, a pin or a ring (`places-look`) standing out of the ground, turning with the Earth, hidden on its far side and dimmer at night: `kind: "here"` for the reader's own place (brighter, with a quiet pulse) and favourites, quieter, each with an optional `color`. Up to 5,000: the first 32 in sight stand up with their names, the rest are rings in one draw call, crowds are gathered with their count, and `goToPlace(id)` turns the view to one. In the space view `flyTo(lat, lon, { height, phase })` goes across at the height the camera has, then down to hover over the place (30 km over land with `tiles-finer`, else 400 km); a new `flyTo` or `goToPlace` bends the running move without stopping it, a hand ends it where it is, and reduced motion jumps there. Names never overlap; nothing is drawn at rest. Each place can have a `layer` (switched with `place-layers`), a `size` or `look` of its own and a `namePriority`, so a harbour is a short mark and its name gives way to a city's; a press on a place sends `chikyu-place-click` with its `id` and `kind`. `here-city` (off by default) names a `here` place with the nearest city within 100 km, in the page's language; kuni is loaded only then. The package never asks for the reader's place and stores or sends nothing: the page asks on a press and rounds the place with `nearby` first: [guide](docs/guides/places.md).
255
+ `places` on `<chikyu-space>` and `<chikyu-earth-realistic>` marks places on the Earth, each a beam, a pin or a ring (`places-look`) standing out of the ground, turning with the Earth, hidden on its far side and dimmer at night: `kind: "here"` for the reader's own place (brighter, with a quiet pulse) and favourites, quieter, each with an optional `color`. Up to 5,000: the first 32 in sight stand up with their names, the rest are rings in one draw call, crowds are gathered with their count, and `goToPlace(id)` turns the view to one. In the space view `flyTo(lat, lon, { height, phase })` goes across at the height the camera has, then down to hover over the place (30 km over land with `tiles-finer`, else 400 km); a new `flyTo` or `goToPlace` bends the running move without stopping it, a hand ends it where it is, and reduced motion jumps there. Names never overlap; nothing is drawn at rest. Each place can have a `layer` (switched with `place-layers`), a `size` or `look` of its own and a `namePriority`, so a harbour is a short mark and its name gives way to a city's; a press on a place sends `chikyu-place-click` with its `id` and `kind`, and so does `Enter` after `P` and `Shift`+`P` have moved between the places from the keyboard (a ring shows which, a screen reader hears its name). `here-city` (off by default) names a `here` place with the nearest city within 100 km, in the page's language; kuni is loaded only then. The package never asks for the reader's place and stores or sends nothing: the page asks on a press and rounds the place with `nearby` first: [guide](docs/guides/places.md).
256
256
 
257
257
  ```html
258
258
  <chikyu-space places='[{"id":"me","lon":-79.4,"lat":43.7,"label":"You are here","kind":"here"}]'></chikyu-space>
@@ -573,7 +573,7 @@ Each guide has a Japanese twin in [docs/guides/ja](docs/guides/ja/getting-starte
573
573
  | [Satellites](docs/guides/satellites.md) | SGP4 and the space view |
574
574
  | [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 |
575
575
  | [When can I see the ISS?](docs/guides/passes.md) | Passes over a place, the sky dome, how it was checked |
576
- | [Satellites on a flat map](docs/guides/flat-map.md) | `<chikyu-flat>`: groups, orbital planes, footprints, the ground track, the clock; the facts of a group |
576
+ | [Satellites on a flat map](docs/guides/flat-map.md) | `<chikyu-flat>`: groups, orbital planes, footprints, the ground track, the clock, the photo look (`look="photo"`); the facts of a group |
577
577
  | [Ride along](docs/guides/ride-along.md) | A camera on a moving body |
578
578
  | [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 |
579
579
  | [Names on the stars and faint constellation lines](docs/guides/sky-names.md) | The brightest stars named and the constellations as faint lines over the sky, in hoshi-stars' attribute names |
@@ -615,7 +615,7 @@ console.log(countryList().filter((country) => country.alpha2 === null).map((coun
615
615
 
616
616
  ## How to cite
617
617
 
618
- > Morris, J. (2026). *Chikyu Earth* (version 0.65.1) [Computer software]. https://github.com/johnmorrisdotca/chikyu-earth
618
+ > Morris, J. (2026). *Chikyu Earth* (version 0.67.0) [Computer software]. https://github.com/johnmorrisdotca/chikyu-earth
619
619
 
620
620
  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.
621
621
 
@@ -623,6 +623,7 @@ GitHub's "Cite this repository" button reads [CITATION.cff](CITATION.cff) and gi
623
623
 
624
624
  - A reader who prefers reduced motion gets a still globe, and the riding-along camera draws at most one frame a second.
625
625
  - The view takes the keyboard through the shared controls, and the markers' labels are real buttons.
626
+ - With `<chikyu-space>` or `<chikyu-earth-realistic>` focused, `P` and `Shift`+`P` move between the places in the picture, a ring shows which one, a screen reader hears its name (in English or Japanese), and `Enter` sends `chikyu-place-click`: [guide](docs/guides/places.md).
626
627
  - Names are available in English and Japanese.
627
628
 
628
629
  ```html
@@ -1,6 +1,7 @@
1
1
  import type { ElementSet } from "../satellites/types.ts";
2
2
  import { type GroupFacts, type Plane } from "./facts.ts";
3
3
  import { type GroundTrackState } from "./track-state.ts";
4
+ import { type FlatLook } from "./photo.ts";
4
5
  import { type FlatLang } from "./words.ts";
5
6
  /**
6
7
  * One satellite of a group, as a page is told of it: what `chikyu-flat-pick` carries.
@@ -70,11 +71,13 @@ export interface GroupStyle {
70
71
  * Attributes: `center` (the longitude in the middle, degrees; 0, Greenwich, by default; the map wraps round the date line), `home-lon` and `home-lat` (the reader's place: a marker, and the "My place" button, which appear only when given; the element never asks the browser for a place),
71
72
  * `group` (which groups to show: `all`, one id, or several with commas), `off` (groups that are loaded but start off when `group` names none, such as `starlink`: the filter chip turns one on), `colour-by` (`group`, or `plane` to colour by orbital plane), `plane` (a plane letter: show that plane only), `footprint` and `track` (draw the coverage circle and the ground track, which is amber in sunlight and blue in the Earth's shadow, a cylinder, with a key: `--chikyu-flat-track-sun` and `--chikyu-flat-track-shadow` change the colours; the footprint is of the chosen satellite, or of every one shown when there are 80 or fewer),
72
73
  * `paused` (hold the clock and keep the speed; nothing is drawn while it is held), `trails` (`off` for no streaks at a fast clock), `footprint-elevation` (degrees above the horizon the circle is drawn for; 25 like the 3D beam), `selected` (a NORAD number: the chosen satellite), `time` (`now` or an ISO date; live when absent), `speed` (1 is real time, 0 holds, 86400 is a day a second, negative runs backwards), `estimate-far` (`steady` keeps each satellite's usual orbit beyond 30 days from its elements), `shade` (`off` for no night),
73
- * `dot-size` (pixels), `controls` (`none`, or any of `centre zoom footprint track chips`: the built-in buttons and filter chips shown; all by default) and `lang` (`en` or `ja`; the page's language by default).
74
+ * `dot-size` (pixels), `controls` (`none`, or any of `centre zoom footprint track chips key look`: the built-in buttons, filter chips, key and Map / Photo pair shown; all but `look` by default) and `lang` (`en` or `ja`; the page's language by default).
75
+ * `look` is `map` (the drawn map, the default) or `photo` (NASA's picture of the Earth, with the night side's city lights; `borders="off"` leaves out the country lines, `texture-base` and `max-texture` are as on the realistic Earth; the pictures are fetched only while it is on, and `lookState` says how it stands).
76
+ * The key under the map names every mark the map draws (`keyOpen` folds it open or shut: open on a wide map, shut on a phone until asked), and the yellow dot (the Sun overhead) and the white diamond (My place) name themselves, with where, when pointed at, pressed or reached with the Tab key.
74
77
  *
75
78
  * Events: `chikyu-flat-pick` (a satellite under the pointer, tapped, or reached by the keyboard: a `FlatPick`; `detail.id` is null when a tap lands on nothing and clears the choice), `chikyu-flat-filter` (a chip changed which groups or plane are shown: `{ groups, plane }`),
76
- * `chikyu-flat-planes` (the planes were worked out: `{ planes }`), `chikyu-flat-view` (the reader panned or zoomed: `{ center, zoom }`) and `chikyu-timechange` (`{ time, running }`, at most four a second while time runs).
77
- * Style it with the custom properties `--chikyu-flat-sea`, `--chikyu-flat-land`, `--chikyu-flat-line`, `--chikyu-flat-night`, `--chikyu-flat-aspect`, `--chikyu-flat-aspect-narrow` and `--chikyu-flat-radius`.
79
+ * `chikyu-flat-planes` (the planes were worked out: `{ planes }`), `chikyu-flat-view` (the reader panned or zoomed: `{ center, zoom }`), `chikyu-flat-look` (the look or how it stands changed: `{ look, state }`), `chikyu-flat-mark` (the Sun's dot or the home diamond was pressed: `{ mark, name, text, lon, lat, place, via }`) and `chikyu-timechange` (`{ time, running }`, at most four a second while time runs).
80
+ * Style it with the custom properties `--chikyu-flat-key-inset` (room kept at the left of the key, for a card lying over the map's left side), `--chikyu-flat-sea`, `--chikyu-flat-land`, `--chikyu-flat-line`, `--chikyu-flat-night`, `--chikyu-flat-aspect`, `--chikyu-flat-aspect-narrow` and `--chikyu-flat-radius`.
78
81
  *
79
82
  * @example
80
83
  * ```ts no-run
@@ -141,6 +144,11 @@ export declare class ChikyuFlat extends HTMLElement {
141
144
  set paused(value: boolean);
142
145
  /** The language of the words: the `lang` attribute, else the page's. */
143
146
  get language(): FlatLang;
147
+ /** The look of the map: `map`, the drawn map of countries (the default), or `photo`, NASA's picture of the Earth with the night side's city lights. The `look` attribute; the pictures are fetched only while the look is `photo`. */
148
+ get look(): FlatLook;
149
+ set look(value: FlatLook);
150
+ /** How the look stands: `map` (the drawn map is chosen), `loading` (the photo is chosen and its picture is on its way, the drawn map shows meanwhile), `photo` (the photo is shown) or `failed` (the picture could not be fetched, the drawn map shows). `chikyu-flat-look` tells the page when it changes. */
151
+ get lookState(): "map" | "loading" | "photo" | "failed";
144
152
  /** Counters for a test or a page: draws of the dots, draws of the map, the dots drawn at the last draw, the milliseconds the last draw and the slowest took, and the canvases' size in pixels. */
145
153
  get stats(): {
146
154
  draws: number;
@@ -168,6 +176,9 @@ export declare class ChikyuFlat extends HTMLElement {
168
176
  connectedCallback(): void;
169
177
  disconnectedCallback(): void;
170
178
  attributeChangedCallback(name: string): void;
179
+ /** The key folded open or shut. A property so a page can set it; the reader's button does the same. */
180
+ get keyOpen(): boolean;
181
+ set keyOpen(value: boolean);
171
182
  /**
172
183
  * Where a loaded satellite is over the ground at the moment shown, which way its ground track runs and whether the Sun lights it: `{ lat, lon, heightKm, bearingDeg, ascending, sunlit }` (see `GroundTrackState`), placed exactly by SGP4. Null when the number names no loaded satellite
173
184
  * or it cannot be placed at that moment. It is the same state that `chikyu-flat-pick` carries (`sunlit`, `bearingDeg`, `ascending`).