@johnmorrisdotca/chikyu-earth 0.52.0 → 0.53.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 +3 -1
- package/dist/flat/colours.d.ts +33 -0
- package/dist/flat/colours.js +49 -0
- package/dist/flat/define.d.ts +3 -0
- package/dist/flat/define.js +6 -0
- package/dist/flat/element.d.ts +171 -0
- package/dist/flat/element.js +1452 -0
- package/dist/flat/facts.d.ts +172 -0
- package/dist/flat/facts.js +168 -0
- package/dist/flat/geometry.d.ts +160 -0
- package/dist/flat/geometry.js +156 -0
- package/dist/flat/index.d.ts +5 -0
- package/dist/flat/index.js +6 -0
- package/dist/flat/words.d.ts +25 -0
- package/dist/flat/words.js +68 -0
- package/package.json +13 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.53.0 - 2026-11-16
|
|
6
|
+
|
|
7
|
+
- **`<chikyu-flat>`: satellites on a flat map of the world** (MODULES-1391). A new entry `@johnmorrisdotca/chikyu-earth/flat/define` registers the element, and `@johnmorrisdotca/chikyu-earth/flat` holds its pure parts (they import on a server, with no dependency, not even satellite.js).
|
|
8
|
+
- **Map.** Plate carree on two canvases (map and dots), with the country outlines, a graticule and the night side from the real Sun. `center` is the longitude in the middle (0, Greenwich, by default), wraps cleanly at the date line, and the built-in **Greenwich** and **My place** buttons switch; My place and a marker at the place appear only when the page gives `home-lon` and `home-lat` (the element never asks for a location). A box taller than 2 to 1 (a phone) is filled; touch pan, two-finger pinch zoom, + and - buttons and keys, Control or Command and the wheel zoom.
|
|
9
|
+
- **Satellites.** `setGroup(id, sets, style?)` for each group, `elements` for one, or `elements-src`; the `group` attribute names the groups shown and `off` those that start off (Starlink). Colour by group, or `colour-by="plane"` by orbital plane. Filter chips (groups, or planes) are built in and are the legend; `controls="none"` leaves the page to drive `group` and `plane`. `planes`, `facts(id)`, `groups`, `visibleGroups`, `selected`, `placeOf`. Optional `footprint` (the coverage circle) and `track` (the ground track of the chosen satellite, which follows the clock). Events `chikyu-flat-pick`, `chikyu-flat-filter`, `chikyu-flat-planes`, `chikyu-flat-view` and `chikyu-timechange`. Keyboard: arrow keys move from dot to dot, Enter chooses, Escape clears; hover and tap pick.
|
|
10
|
+
- **The clock is the 3D view's.** `time`, `speed` and `paused` as attributes and properties. The dots move every frame the motion needs (up to 60 a second) while time runs; a jump of `time` moves them at once; `paused` draws nothing. Up to 60 times real time every dot is placed by SGP4 with interpolation; faster, the dots are turned along their orbits and drawn as streaks (`trails="off"` for plain dots), so a day a second is a trail, not a flicker. Measured: 12,295 dots (all of Starlink and the other groups) at 600 times real time drew 60 frames a second at about 6 ms a frame, in streaks, in a browser drawing in software. The canvases are drawn by the processor (`willReadFrequently`), not the graphics card: the same draw ran 1 frame a second on the graphics card emulated in software. Nothing is drawn at rest, out of sight or in a hidden tab, and a reader who asked for reduced motion gets one frame a second.
|
|
11
|
+
- **Pure helpers, tested.** `groupFacts(sets)` (count, mean, lowest and highest height, inclination, period, speed, plane count and planes) and `clusterPlanes(sets)` (the right ascension of the ascending node, cut at gaps wider than 10 degrees: GPS 6 planes, Galileo and GLONASS 3, Iridium 6, OneWeb 12; Starlink is one blob and says `clustered: false`), with the map's geometry (`projectFlat`, `unprojectFlat`, `zoomAbout`, `clampView`, `groundPoint`), the colours and the English and Japanese words.
|
|
12
|
+
- **Docs and tests.** A demo page `flat.html` and a guide in English and Japanese (the Japanese read by the Japanese reviewer), two tested usage examples (`examples/node/flat.mjs`, `examples/flat.html`), unit tests, `e2e/flat.demo.ts` (desk, phone, Chromium and WebKit), and in the freeze test: nothing drawn at rest, a frame at a time at 600 times real time, nothing out of sight or in a hidden tab, canvases inside 6 million pixels.
|
|
13
|
+
- **Decision needed, not applied: one orbit-level definition.** The site's `levelOf` (hero-src/orbit-levels.ts) and this package's `classOfElements` disagree on 53 of the site's 16,903 satellites, and in their rules: the site has no eccentricity test (a low orbit is anything under 2,000 km at the top), keeps the geostationary band at 2,500 km (the package 1,500 km), takes Medium up to 32,000 km (the package 34,286 km), splits Medium at 8,000 km into Outer and Medium, and puts everything left in Far (the package says `heo` from an eccentricity of 0.25 and `other` for the rest). Its heights use 6,378.137 km, the package's 6,371 km. On the file: 46 are Far in the site and `heo` here (the same set, named differently); 5 are Far there and `other` here; 1 is Far there and `meo` here (apogee 32,000 to 34,286 km); 1 is Geostationary there and `other` here (outside 1,500 km, inside 2,500 km). Proposal: make `classOfElements` and `orbitClass` follow `levelOf` (2,500 km band, 32,000 km, no eccentricity rule, `outer` as a class) in a minor release with a note here, and have the census follow the same numbers. Nothing in the flat map reads a class.
|
|
14
|
+
|
|
5
15
|
## 0.52.0 - 2026-11-16
|
|
6
16
|
|
|
7
17
|
- **A drag in a ride turns the view from where the vehicle is, not the vehicle round the camera** (MODULES-1374). In a ride of a satellite with the `outside` viewpoint (the default), dragging looked about but took the camera round the satellite as it looked, so the satellite was seen from every side and the whole vehicle seemed to be moved. A drag now turns the view where the camera is, like turning your head, in both looks (`horizon`, Ride along, and `down`, Ride above): the camera keeps its place 25 km behind and above the satellite and the scene turns round it; the satellite is at its share and seat of the picture while you do not drag and leaves it as you look away. **A change of behaviour**: `ride-drag="orbit"` (property `rideDrag`, option `drag` of `ride`, field `drag` of `Riding`) brings the old look-around back; the default is `head`. `outsidePose` takes an optional `rest` (the pose with no drag) and keeps the camera where that puts it; without it, it works as before. Inside the satellite, the `follow` and `above` views and riding a body are unchanged. Tests: unit tests of the pose maths (the camera does not move under any drag in `head`, the satellite holds its place in `orbit`, the pace of the ground), and `e2e/ride-outside.gl.ts` for both looks and both modes. English and Japanese guides and the upgrading page.
|
package/README.md
CHANGED
|
@@ -554,6 +554,7 @@ The reference is a site, made from the source's own doc comments: every export h
|
|
|
554
554
|
| `.../meteors` | The year's meteor showers, and when and where their meteors fall. No DOM, no dependency. |
|
|
555
555
|
| `.../door` | The data door: sources of your own maps and orbit data with their licence and credit, `creditLine`, the package's own sources. No DOM, no dependency. |
|
|
556
556
|
| `.../passes`, `.../passes/element` | Passes of a satellite over a place, the sky dome, `<chikyu-passes>`; `satellite.js`. |
|
|
557
|
+
| `.../flat`, `.../flat/define` | The facts and orbital planes of a group of satellites (no dependency), and `<chikyu-flat>`, satellites on a flat world map; `satellite.js` for the element. |
|
|
557
558
|
| `.../catalogue` | The Earth-orbit catalogue's pure parts: the class of an orbit from its elements, the kind of an object, colours, legend, fleets, and the packed file of up to 200,000 objects. No data, no DOM, no dependency. |
|
|
558
559
|
|
|
559
560
|
## Guides
|
|
@@ -572,6 +573,7 @@ Each guide has a Japanese twin in [docs/guides/ja](docs/guides/ja/getting-starte
|
|
|
572
573
|
| [Satellites](docs/guides/satellites.md) | SGP4 and the space view |
|
|
573
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 |
|
|
574
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 |
|
|
575
577
|
| [Ride along](docs/guides/ride-along.md) | A camera on a moving body |
|
|
576
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 |
|
|
577
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 |
|
|
@@ -612,7 +614,7 @@ console.log(countryList().filter((country) => country.alpha2 === null).map((coun
|
|
|
612
614
|
|
|
613
615
|
## How to cite
|
|
614
616
|
|
|
615
|
-
> Morris, J. (2026). *Chikyu Earth* (version 0.
|
|
617
|
+
> Morris, J. (2026). *Chikyu Earth* (version 0.53.0) [Computer software]. https://github.com/johnmorrisdotca/chikyu-earth
|
|
616
618
|
|
|
617
619
|
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.
|
|
618
620
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The colour of each of the package's satellite groups, the same as the demo draws them, for a dark map.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { GROUP_COLOURS } from "@johnmorrisdotca/chikyu-earth/flat";
|
|
7
|
+
*
|
|
8
|
+
* console.log(GROUP_COLOURS["gps"]);
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare const GROUP_COLOURS: Readonly<Record<string, string>>;
|
|
12
|
+
/**
|
|
13
|
+
* The colours of the planes of a group, in order: `A` is the first, and the twelfth is followed by the first again.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { PLANE_COLOURS } from "@johnmorrisdotca/chikyu-earth/flat";
|
|
18
|
+
*
|
|
19
|
+
* console.log(PLANE_COLOURS.length, PLANE_COLOURS[0]);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const PLANE_COLOURS: readonly string[];
|
|
23
|
+
/**
|
|
24
|
+
* The grey of the satellites that are in no plane.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* import { SPARE_COLOUR } from "@johnmorrisdotca/chikyu-earth/flat";
|
|
29
|
+
*
|
|
30
|
+
* console.log(SPARE_COLOUR);
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const SPARE_COLOUR = "#9aa5b1";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// The colours of the flat map: one for each group of the package, and twelve for the orbital planes of a group. Chosen for a dark sea; each is read against the map's own colours.
|
|
2
|
+
/**
|
|
3
|
+
* The colour of each of the package's satellite groups, the same as the demo draws them, for a dark map.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { GROUP_COLOURS } from "@johnmorrisdotca/chikyu-earth/flat";
|
|
8
|
+
*
|
|
9
|
+
* console.log(GROUP_COLOURS["gps"]);
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export const GROUP_COLOURS = {
|
|
13
|
+
stations: "#ffd54f",
|
|
14
|
+
famous: "#ff8a65",
|
|
15
|
+
science: "#b39ddb",
|
|
16
|
+
"earth-observation": "#69f0ae",
|
|
17
|
+
weather: "#4dd0e1",
|
|
18
|
+
geostationary: "#f48fb1",
|
|
19
|
+
gps: "#ffb74d",
|
|
20
|
+
glonass: "#ef5350",
|
|
21
|
+
galileo: "#64b5f6",
|
|
22
|
+
beidou: "#fff176",
|
|
23
|
+
amateur: "#aed581",
|
|
24
|
+
oneweb: "#ce93d8",
|
|
25
|
+
iridium: "#80cbc4",
|
|
26
|
+
starlink: "#7fd4ff",
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The colours of the planes of a group, in order: `A` is the first, and the twelfth is followed by the first again.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { PLANE_COLOURS } from "@johnmorrisdotca/chikyu-earth/flat";
|
|
34
|
+
*
|
|
35
|
+
* console.log(PLANE_COLOURS.length, PLANE_COLOURS[0]);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export const PLANE_COLOURS = ["#ff7a59", "#ffd23f", "#6ee7a0", "#4cc9f0", "#a78bfa", "#ff9ecb", "#f4a261", "#b8e986", "#5eead4", "#7aa2ff", "#e879f9", "#fde68a"];
|
|
39
|
+
/**
|
|
40
|
+
* The grey of the satellites that are in no plane.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* import { SPARE_COLOUR } from "@johnmorrisdotca/chikyu-earth/flat";
|
|
45
|
+
*
|
|
46
|
+
* console.log(SPARE_COLOUR);
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export const SPARE_COLOUR = "#9aa5b1";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Registers <chikyu-flat>. Importing this entry point (`@johnmorrisdotca/chikyu-earth/flat/define`) defines the tag once; it needs satellite.js (an optional peer).
|
|
2
|
+
import { ChikyuFlat } from "./element.js";
|
|
3
|
+
export { ChikyuFlat };
|
|
4
|
+
if (typeof customElements !== "undefined" && !customElements.get("chikyu-flat")) {
|
|
5
|
+
customElements.define("chikyu-flat", ChikyuFlat);
|
|
6
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { ElementSet } from "../satellites/types.ts";
|
|
2
|
+
import { type GroupFacts, type Plane } from "./facts.ts";
|
|
3
|
+
import { type FlatLang } from "./words.ts";
|
|
4
|
+
/**
|
|
5
|
+
* One satellite of a group, as a page is told of it: what `chikyu-flat-pick` carries.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import type { FlatPick } from "@johnmorrisdotca/chikyu-earth/flat";
|
|
10
|
+
*
|
|
11
|
+
* const show = (pick: FlatPick): string => `${pick.name} (${pick.id}) in ${pick.group}`;
|
|
12
|
+
* console.log(typeof show);
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export interface FlatPick {
|
|
16
|
+
/** The NORAD catalogue number. */
|
|
17
|
+
id: number;
|
|
18
|
+
/** Where it is in its group's element sets. */
|
|
19
|
+
index: number;
|
|
20
|
+
group: string;
|
|
21
|
+
name: string;
|
|
22
|
+
/** The letter of its orbital plane (`A`), or null when it is in none. */
|
|
23
|
+
plane: string | null;
|
|
24
|
+
altitudeKm: number;
|
|
25
|
+
/** What chose it: a pointer going over it (`hover`), a tap or click (`tap`), or the keyboard (`key`). */
|
|
26
|
+
via: "hover" | "tap" | "key";
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* An orbital plane of a loaded group, with the group's id and the colour the map gives it: what the element's `planes` lists.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* import type { FlatPlane } from "@johnmorrisdotca/chikyu-earth/flat";
|
|
34
|
+
*
|
|
35
|
+
* const chip = (plane: FlatPlane): string => `${plane.group} ${plane.id} (${plane.count})`;
|
|
36
|
+
* console.log(typeof chip);
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export interface FlatPlane extends Plane {
|
|
40
|
+
group: string;
|
|
41
|
+
colour: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* How a group looks and is called, when the package does not already know it (`SATELLITE_GROUPS` names the 14 it knows).
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* import type { GroupStyle } from "@johnmorrisdotca/chikyu-earth/flat";
|
|
49
|
+
*
|
|
50
|
+
* const style: GroupStyle = { colour: "#ffffff", label: "My satellites", labelJa: "私の衛星" };
|
|
51
|
+
* console.log(style.label);
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export interface GroupStyle {
|
|
55
|
+
colour?: string;
|
|
56
|
+
label?: string;
|
|
57
|
+
labelJa?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The `<chikyu-flat>` custom element: satellites on a flat map of the world, at the places SGP4 puts them for the time shown. Import `@johnmorrisdotca/chikyu-earth/flat/define` to register the tag; it needs `satellite.js` (an optional peer).
|
|
61
|
+
*
|
|
62
|
+
* The page gives it orbital elements: `setGroup(id, sets)` for each group (the ids of `SATELLITE_GROUPS` are known by name and colour), or the `elements` property for one, or `elements-src` (an address, read once, through `fetchElements`' rules). The package fetches nothing of its own.
|
|
63
|
+
* 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),
|
|
64
|
+
* `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; the footprint is of the chosen satellite, or of every one shown when there are 80 or fewer),
|
|
65
|
+
* `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`, `shade` (`off` for no night),
|
|
66
|
+
* `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).
|
|
67
|
+
*
|
|
68
|
+
* 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 }`),
|
|
69
|
+
* `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).
|
|
70
|
+
* 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`.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts no-run
|
|
74
|
+
* import "@johnmorrisdotca/chikyu-earth/flat/define";
|
|
75
|
+
* import type { ChikyuFlat } from "@johnmorrisdotca/chikyu-earth/flat/define";
|
|
76
|
+
* import type { ElementSet } from "@johnmorrisdotca/chikyu-earth/satellites";
|
|
77
|
+
*
|
|
78
|
+
* declare const gpsElements: ElementSet[]; // your page's own element sets
|
|
79
|
+
* const flat = document.createElement("chikyu-flat") as ChikyuFlat;
|
|
80
|
+
* flat.setAttribute("center", "139.7");
|
|
81
|
+
* flat.setAttribute("colour-by", "plane");
|
|
82
|
+
* flat.setGroup("gps", gpsElements);
|
|
83
|
+
* document.body.append(flat);
|
|
84
|
+
* flat.addEventListener("chikyu-flat-pick", (event) => console.log((event as CustomEvent).detail.name));
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export declare class ChikyuFlat extends HTMLElement {
|
|
88
|
+
#private;
|
|
89
|
+
static observedAttributes: string[];
|
|
90
|
+
/**
|
|
91
|
+
* Hand over a group's orbital elements, or take the group away with `null`. The satellites start SGP4 here (a Starlink-sized group takes a fraction of a second), the facts and orbital planes are worked out, and the next draw shows them.
|
|
92
|
+
* `id` is a name of `SATELLITE_GROUPS` (`gps`, `starlink`: its words and colour are known) or any name of the page's own, with `style` for its colour and words.
|
|
93
|
+
*
|
|
94
|
+
* @param id - The group's name.
|
|
95
|
+
* @param sets - Its element sets, as `createSatellites` takes them; `null` removes the group.
|
|
96
|
+
* @param style - The colour and the English and Japanese names of a group the package does not know.
|
|
97
|
+
*/
|
|
98
|
+
setGroup(id: string, sets: readonly ElementSet[] | null, style?: GroupStyle): void;
|
|
99
|
+
/** The element sets of the group the attributes name (`group`, else `satellites`): a shorthand for one group. Setting it calls `setGroup`. */
|
|
100
|
+
get elements(): readonly ElementSet[];
|
|
101
|
+
set elements(sets: readonly ElementSet[]);
|
|
102
|
+
/** The groups loaded, in the order they were given: their name, words, colour and how many satellites started SGP4. */
|
|
103
|
+
get groups(): readonly {
|
|
104
|
+
id: string;
|
|
105
|
+
label: string;
|
|
106
|
+
labelJa: string;
|
|
107
|
+
colour: string;
|
|
108
|
+
count: number;
|
|
109
|
+
}[];
|
|
110
|
+
/** The facts (`groupFacts`) of a loaded group, or undefined. */
|
|
111
|
+
facts(id: string): GroupFacts | undefined;
|
|
112
|
+
/** The orbital planes of every loaded group (by right ascension of the ascending node; see `clusterPlanes`): the letter, how many satellites, the colour the map gives it. A group with no planes to show has none here. */
|
|
113
|
+
get planes(): readonly FlatPlane[];
|
|
114
|
+
/** The groups on show: those the `group` attribute names, or the ones a chip chose; every loaded group when none is chosen. Set to a list of ids, or `null` for all. */
|
|
115
|
+
get visibleGroups(): readonly string[];
|
|
116
|
+
set visibleGroups(ids: readonly string[] | null);
|
|
117
|
+
/** The NORAD number of the chosen satellite, or null. Set it to choose one from code (no `chikyu-flat-pick` is sent), `null` to clear. */
|
|
118
|
+
get selected(): number | null;
|
|
119
|
+
set selected(id: number | null);
|
|
120
|
+
/** The longitude in the middle, degrees. Set it to centre the map there; a reader's pan changes it, and `chikyu-flat-view` tells the page. */
|
|
121
|
+
get center(): number;
|
|
122
|
+
set center(lon: number);
|
|
123
|
+
/** The zoom: 1 shows the whole world, up to 8. */
|
|
124
|
+
get zoom(): number;
|
|
125
|
+
set zoom(value: number);
|
|
126
|
+
/** The moment shown, in milliseconds since the Unix epoch. Set it to a number (or a `Date`) to move the clock, or "now" to go live. */
|
|
127
|
+
get time(): number;
|
|
128
|
+
set time(value: number | Date | "now");
|
|
129
|
+
/** How fast the clock runs: 1 is real time, 0 holds, 86400 is a day a second, negative runs backwards. */
|
|
130
|
+
get speed(): number;
|
|
131
|
+
set speed(value: number);
|
|
132
|
+
/** True while the clock is held with its speed kept (the page's Pause): nothing is drawn but what the reader changes. Setting it false carries on from the moment shown at the same speed. */
|
|
133
|
+
get paused(): boolean;
|
|
134
|
+
set paused(value: boolean);
|
|
135
|
+
/** The language of the words: the `lang` attribute, else the page's. */
|
|
136
|
+
get language(): FlatLang;
|
|
137
|
+
/** 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. */
|
|
138
|
+
get stats(): {
|
|
139
|
+
draws: number;
|
|
140
|
+
mapDraws: number;
|
|
141
|
+
dots: number;
|
|
142
|
+
lastDrawMs: number;
|
|
143
|
+
maxDrawMs: number;
|
|
144
|
+
running: boolean;
|
|
145
|
+
paused: boolean;
|
|
146
|
+
fast: boolean;
|
|
147
|
+
averageDrawMs: number;
|
|
148
|
+
canvases: {
|
|
149
|
+
width: number;
|
|
150
|
+
height: number;
|
|
151
|
+
}[];
|
|
152
|
+
};
|
|
153
|
+
/** Where a satellite is on the screen as of the last draw, in CSS pixels from the map's top left, or null when it is not drawn (not loaded, filtered out, off the map or too old). */
|
|
154
|
+
placeOf(id: number): {
|
|
155
|
+
x: number;
|
|
156
|
+
y: number;
|
|
157
|
+
lon: number;
|
|
158
|
+
lat: number;
|
|
159
|
+
altitudeKm: number;
|
|
160
|
+
} | null;
|
|
161
|
+
connectedCallback(): void;
|
|
162
|
+
disconnectedCallback(): void;
|
|
163
|
+
attributeChangedCallback(name: string): void;
|
|
164
|
+
/** Choose a satellite from code, as a reader's tap would, without sending `chikyu-flat-pick`. A NORAD number the groups do not hold, or `null`, clears the choice. */
|
|
165
|
+
pick(id: number | null): void;
|
|
166
|
+
}
|
|
167
|
+
declare global {
|
|
168
|
+
interface HTMLElementTagNameMap {
|
|
169
|
+
"chikyu-flat": ChikyuFlat;
|
|
170
|
+
}
|
|
171
|
+
}
|