@johnmorrisdotca/chikyu-earth 0.10.0 → 0.12.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.
@@ -1,5 +1,5 @@
1
1
  export declare const SURFACE_VERT = "\nvarying vec2 vUv;\nvarying vec3 vNormal;\nvarying vec3 vWorld;\nvoid main() {\n vUv = uv;\n vNormal = normalize(mat3(modelMatrix) * position);\n vWorld = (modelMatrix * vec4(position, 1.0)).xyz;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}";
2
- export declare const SURFACE_FRAG = "\nuniform sampler2D dayMap;\nuniform sampler2D nightMap;\nuniform sampler2D waterMap;\nuniform vec3 sunDir;\nuniform float lights;\nuniform float ortho;\nvarying vec2 vUv;\nvarying vec3 vNormal;\nvarying vec3 vWorld;\nvoid main() {\n vec3 n = normalize(vNormal);\n vec3 toEye = ortho > 0.5 ? vec3(0.0, 0.0, 1.0) : normalize(cameraPosition - vWorld);\n float ndl = dot(n, sunDir);\n float day = smoothstep(-0.10, 0.22, ndl);\n vec3 albedo = texture2D(dayMap, vUv).rgb;\n float water = texture2D(waterMap, vUv).r;\n\n vec3 lit = albedo * (0.07 + 1.0 * pow(max(ndl, 0.0), 0.5));\n float dusk = smoothstep(-0.14, 0.0, ndl) * (1.0 - smoothstep(0.0, 0.30, ndl));\n lit += vec3(0.55, 0.28, 0.14) * dusk * 0.30 * (0.35 + 0.65 * albedo.g);\n\n vec3 h = normalize(sunDir + toEye);\n float glint = pow(max(dot(n, h), 0.0), 220.0) * water * day;\n lit += vec3(1.0, 0.93, 0.80) * glint * 0.7;\n\n vec3 night = texture2D(nightMap, vUv).rgb;\n night = night * night * vec3(1.6, 1.5, 1.3) * lights + night * 0.25;\n vec3 col = mix(night, lit, day);\n\n float rim = pow(1.0 - clamp(dot(n, toEye), 0.0, 1.0), 3.0);\n float sunSide = 0.12 + 0.88 * smoothstep(-0.25, 0.5, ndl);\n col += vec3(0.20, 0.45, 1.0) * rim * sunSide * 0.55;\n gl_FragColor = vec4(col, 1.0);\n}";
2
+ export declare const SURFACE_FRAG = "\nuniform sampler2D dayMap;\nuniform sampler2D nightMap;\nuniform sampler2D waterMap;\nuniform vec3 sunDir;\nuniform float lights;\nuniform float boost;\nuniform float ortho;\nvarying vec2 vUv;\nvarying vec3 vNormal;\nvarying vec3 vWorld;\nvoid main() {\n vec3 n = normalize(vNormal);\n vec3 toEye = ortho > 0.5 ? vec3(0.0, 0.0, 1.0) : normalize(cameraPosition - vWorld);\n float ndl = dot(n, sunDir);\n float day = smoothstep(-0.10, 0.22, ndl);\n vec3 albedo = texture2D(dayMap, vUv).rgb;\n float water = texture2D(waterMap, vUv).r;\n\n vec3 lit = albedo * (0.07 + 1.0 * pow(max(ndl, 0.0), 0.5));\n float dusk = smoothstep(-0.14, 0.0, ndl) * (1.0 - smoothstep(0.0, 0.30, ndl));\n lit += vec3(0.55, 0.28, 0.14) * dusk * 0.30 * (0.35 + 0.65 * albedo.g);\n\n vec3 h = normalize(sunDir + toEye);\n float glint = pow(max(dot(n, h), 0.0), 220.0) * water * day;\n lit += vec3(1.0, 0.93, 0.80) * glint * 0.7;\n\n vec3 night = texture2D(nightMap, vUv).rgb;\n night = night * night * vec3(1.6, 1.5, 1.3) * lights + night * 0.25;\n vec3 col = mix(night, lit, day);\n col += pow(albedo, vec3(0.75)) * boost * 0.65 * (1.0 - day);\n\n float rim = pow(1.0 - clamp(dot(n, toEye), 0.0, 1.0), 3.0);\n float sunSide = 0.12 + 0.88 * smoothstep(-0.25, 0.5, ndl);\n col += vec3(0.20, 0.45, 1.0) * rim * sunSide * 0.55;\n gl_FragColor = vec4(col, 1.0);\n}";
3
3
  export declare const CLOUD_FRAG = "\nuniform sampler2D cloudMap;\nuniform vec3 sunDir;\nuniform float shift;\nuniform float opacity;\nvarying vec2 vUv;\nvarying vec3 vNormal;\nvoid main() {\n vec3 n = normalize(vNormal);\n float ndl = dot(n, sunDir);\n float c = texture2D(cloudMap, vec2(vUv.x + shift, vUv.y)).r;\n float a = smoothstep(0.28, 0.88, c) * opacity;\n float day = smoothstep(-0.10, 0.25, ndl);\n vec3 col = mix(vec3(0.015, 0.02, 0.04), vec3(1.0), day * (0.18 + 0.82 * pow(max(ndl, 0.0), 0.45)));\n col += vec3(0.55, 0.28, 0.14) * smoothstep(-0.14, 0.0, ndl) * (1.0 - smoothstep(0.0, 0.25, ndl)) * 0.35;\n gl_FragColor = vec4(col, a);\n}";
4
4
  export declare const ATMOSPHERE_VERT = "\nvarying vec3 vPosView;\nvarying vec3 vNormalView;\nvoid main() {\n vec4 view = modelViewMatrix * vec4(position, 1.0);\n vPosView = view.xyz;\n vNormalView = normalize(normalMatrix * position);\n gl_Position = projectionMatrix * view;\n}";
5
5
  export declare const ATMOSPHERE_FRAG = "\nuniform vec3 sunView;\nuniform float outer;\nuniform float ortho;\nvarying vec3 vPosView;\nvarying vec3 vNormalView;\nvoid main() {\n vec3 n = normalize(vNormalView);\n vec3 v = ortho > 0.5 ? vec3(0.0, 0.0, 1.0) : normalize(-vPosView);\n float nz = clamp(dot(n, v), -1.0, 1.0);\n float rho = outer * sqrt(max(0.0, 1.0 - nz * nz));\n float t = clamp((rho - 1.0) / (outer - 1.0), 0.0, 1.0);\n vec2 dir = normalize(n.xy + vec2(1e-5, 0.0));\n float side = smoothstep(-0.40, 0.55, dot(vec3(dir, 0.0), sunView));\n float glow = pow(1.0 - t, 3.0) * (0.10 + 0.90 * side);\n vec3 col = mix(vec3(0.10, 0.22, 0.60), vec3(0.42, 0.68, 1.0), side);\n gl_FragColor = vec4(col, glow * 0.9);\n}";
@@ -16,6 +16,7 @@ uniform sampler2D nightMap;
16
16
  uniform sampler2D waterMap;
17
17
  uniform vec3 sunDir;
18
18
  uniform float lights;
19
+ uniform float boost;
19
20
  uniform float ortho;
20
21
  varying vec2 vUv;
21
22
  varying vec3 vNormal;
@@ -39,6 +40,7 @@ void main() {
39
40
  vec3 night = texture2D(nightMap, vUv).rgb;
40
41
  night = night * night * vec3(1.6, 1.5, 1.3) * lights + night * 0.25;
41
42
  vec3 col = mix(night, lit, day);
43
+ col += pow(albedo, vec3(0.75)) * boost * 0.65 * (1.0 - day);
42
44
 
43
45
  float rim = pow(1.0 - clamp(dot(n, toEye), 0.0, 1.0), 3.0);
44
46
  float sunSide = 0.12 + 0.88 * smoothstep(-0.25, 0.5, ndl);
@@ -0,0 +1,109 @@
1
+ /**
2
+ * What kind of orbit a satellite or a group is in: `leo` (low, below 2,000 km), `meo` (medium, up to about 35,000 km: the navigation satellites), `geo` (about 35,786 km up, where a satellite goes round once
3
+ * a day; over the equator it sits still over one place), `heo` (a long oval that swings far out) or `mixed` (a group with more than one kind).
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import type { OrbitKind } from "@johnmorrisdotca/chikyu-earth/satellites";
8
+ *
9
+ * const sitsStill = (orbit: OrbitKind): boolean => orbit === "geo";
10
+ * console.log(sitsStill("geo"));
11
+ * ```
12
+ */
13
+ export type OrbitKind = "leo" | "meo" | "geo" | "heo" | "mixed";
14
+ /**
15
+ * A group of satellites the demo offers as one button: what it is, in English and Japanese, and where its elements come from (a CelesTrak list name, or single catalogue numbers).
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * import { SATELLITE_GROUPS } from "@johnmorrisdotca/chikyu-earth/satellites";
20
+ *
21
+ * const gps = SATELLITE_GROUPS.find((group) => group.id === "gps");
22
+ * console.log(gps?.celestrak, gps?.orbit);
23
+ * ```
24
+ */
25
+ export interface SatelliteGroupInfo {
26
+ /** A short name for an address or a button, lower case with hyphens. */
27
+ id: string;
28
+ label: string;
29
+ labelJa: string;
30
+ /** A line on what the group is. */
31
+ about: string;
32
+ aboutJa: string;
33
+ orbit: OrbitKind;
34
+ /** True when the satellites of this group sit still over one place (geostationary), so a reader is not surprised that they do not move. */
35
+ still: boolean;
36
+ /** The name of the CelesTrak list (`GROUP=` in its address) that holds the group, when there is one. */
37
+ celestrak?: string;
38
+ /** Single NORAD catalogue numbers to ask for one by one, when the group has no list of its own. */
39
+ catnr?: readonly number[];
40
+ }
41
+ /**
42
+ * One satellite worth naming: its NORAD catalogue number (the number every source uses), its usual name, the group it is shown in, its orbit and a line on what it is.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * import { CATALOGUE } from "@johnmorrisdotca/chikyu-earth/satellites";
47
+ *
48
+ * const oldest = CATALOGUE.find((entry) => entry.noradId === 5);
49
+ * console.log(oldest?.name, oldest?.about);
50
+ * ```
51
+ */
52
+ export interface CatalogueEntry {
53
+ noradId: number;
54
+ name: string;
55
+ group: string;
56
+ orbit: OrbitKind;
57
+ about: string;
58
+ aboutJa: string;
59
+ }
60
+ /**
61
+ * The groups, in the order the demo shows them. Each one is a CelesTrak list or a few single numbers; the elements are fetched by the page (or the demo's scheduled build), never by the package.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * import { SATELLITE_GROUPS } from "@johnmorrisdotca/chikyu-earth/satellites";
66
+ *
67
+ * console.log(SATELLITE_GROUPS.map((group) => group.label).join(", "));
68
+ * ```
69
+ */
70
+ export declare const SATELLITE_GROUPS: readonly SatelliteGroupInfo[];
71
+ /**
72
+ * The satellites worth naming, with the NORAD number every source uses for them: the stations, the famous ones, and a few of each group.
73
+ * JWST is not here on purpose: it is not in Earth orbit (it circles the Sun about 1.5 million km out, at the second Lagrange point).
74
+ *
75
+ * @example
76
+ * ```ts
77
+ * import { CATALOGUE } from "@johnmorrisdotca/chikyu-earth/satellites";
78
+ *
79
+ * console.log(CATALOGUE.filter((entry) => entry.group === "stations").map((entry) => entry.name));
80
+ * ```
81
+ */
82
+ export declare const CATALOGUE: readonly CatalogueEntry[];
83
+ /**
84
+ * Find catalogue entries by name, group name or NORAD number: "hubble", "hst", "25544" or "weather". Matching ignores case, spaces and punctuation, and a name that starts with the text comes before one that only has it inside.
85
+ *
86
+ * @param text - What the reader typed.
87
+ * @param limit - The most entries to give back (8 by default).
88
+ * @returns The matching entries, best first; none for empty text.
89
+ * @example
90
+ * ```ts
91
+ * import { findInCatalogue } from "@johnmorrisdotca/chikyu-earth/satellites";
92
+ *
93
+ * console.log(findInCatalogue("sentinel 2").map((entry) => entry.name));
94
+ * ```
95
+ */
96
+ export declare function findInCatalogue(text: string, limit?: number): CatalogueEntry[];
97
+ /**
98
+ * The catalogue entry for a NORAD number, if there is one.
99
+ *
100
+ * @param noradId - The NORAD catalogue number.
101
+ * @returns The entry, or undefined when the catalogue does not name that satellite.
102
+ * @example
103
+ * ```ts
104
+ * import { catalogueEntry } from "@johnmorrisdotca/chikyu-earth/satellites";
105
+ *
106
+ * console.log(catalogueEntry(25544)?.about);
107
+ * ```
108
+ */
109
+ export declare function catalogueEntry(noradId: number): CatalogueEntry | undefined;
@@ -0,0 +1,249 @@
1
+ // A small curated catalogue of satellites worth following: the groups the demo offers as buttons and the famous ones by name. Facts (names, NORAD numbers, orbit types) and our own words;
2
+ // no orbital elements are here, and nothing is fetched. The elements come from the page (see docs/satellite-sources.md for the sources and their terms).
3
+ /**
4
+ * The groups, in the order the demo shows them. Each one is a CelesTrak list or a few single numbers; the elements are fetched by the page (or the demo's scheduled build), never by the package.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { SATELLITE_GROUPS } from "@johnmorrisdotca/chikyu-earth/satellites";
9
+ *
10
+ * console.log(SATELLITE_GROUPS.map((group) => group.label).join(", "));
11
+ * ```
12
+ */
13
+ export const SATELLITE_GROUPS = [
14
+ {
15
+ id: "stations",
16
+ label: "Stations",
17
+ labelJa: "宇宙ステーション",
18
+ about: "The ISS and China's Tiangong, with the craft docked to them. Both circle about 400 km up, once round in about 92 minutes.",
19
+ aboutJa: "ISS と中国の天宮、つながっている宇宙船です。どちらも高さ約400 km を、約92分で1周します。",
20
+ orbit: "leo",
21
+ still: false,
22
+ celestrak: "stations",
23
+ },
24
+ {
25
+ id: "famous",
26
+ label: "Famous",
27
+ labelJa: "有名な衛星",
28
+ about: "Vanguard 1 (the oldest satellite still in orbit), Hubble, the Chandra X-ray telescope, LAGEOS 1 and Envisat.",
29
+ aboutJa: "いちばん古い現役の軌道上の衛星バンガード1、ハッブル、チャンドラ X線望遠鏡、LAGEOS 1、エンビサットです。",
30
+ orbit: "mixed",
31
+ still: false,
32
+ catnr: [5, 8820, 20580, 25867, 27386],
33
+ },
34
+ {
35
+ id: "science",
36
+ label: "Science",
37
+ labelJa: "科学衛星",
38
+ about: "Space telescopes and research satellites: Hubble, Swift, Fermi, XMM-Newton, the four MMS craft. A few swing out far beyond the rest.",
39
+ aboutJa: "宇宙望遠鏡や研究用の衛星です。ハッブル、Swift、Fermi、XMM-Newton、MMS の4機など。ほかよりずっと遠くまで行くものもあります。",
40
+ orbit: "mixed",
41
+ still: false,
42
+ celestrak: "science",
43
+ },
44
+ {
45
+ id: "earth-observation",
46
+ label: "Earth observation",
47
+ labelJa: "地球観測",
48
+ about: "Satellites that photograph or measure the land, ice and seas: Landsat 8 and 9, the Sentinels, Terra, Aqua and many more. Most circle from pole to pole at about 700 km.",
49
+ aboutJa: "陸、氷、海を撮影したり測ったりする衛星です。Landsat 8 と 9、Sentinel、Terra、Aqua など。多くは高さ約700 km で、極から極へ回ります。",
50
+ orbit: "leo",
51
+ still: false,
52
+ celestrak: "resource",
53
+ },
54
+ {
55
+ id: "weather",
56
+ label: "Weather",
57
+ labelJa: "気象衛星",
58
+ about: "Weather satellites. The polar ones (NOAA-20 and -21, Metop, Fengyun 3) pass over each place twice a day; the others (GOES, Himawari, Meteosat, Fengyun 2 and 4) hang over the equator and sit still.",
59
+ aboutJa: "気象衛星です。極を回るもの (NOAA-20、-21、Metop、風雲3号) は、同じ場所の上を1日に2回通ります。ほかのもの (GOES、ひまわり、Meteosat、風雲2号と4号) は赤道の上で止まって見えます。",
60
+ orbit: "mixed",
61
+ still: false,
62
+ celestrak: "weather",
63
+ },
64
+ {
65
+ id: "geostationary",
66
+ label: "Geostationary",
67
+ labelJa: "静止衛星",
68
+ about: "Satellites 35,786 km above the equator. They go round once a day, as fast as the Earth turns, so each one sits still over one place.",
69
+ aboutJa: "赤道の上、高さ35,786 km の衛星です。1日に1周して、地球の回る速さと同じなので、1つの場所の上で止まって見えます。",
70
+ orbit: "geo",
71
+ still: true,
72
+ celestrak: "geo",
73
+ },
74
+ {
75
+ id: "gps",
76
+ label: "GPS",
77
+ labelJa: "GPS",
78
+ about: "The American GPS satellites, about 20,200 km up, twice round the Earth a day.",
79
+ aboutJa: "アメリカの GPS 衛星です。高さ約20,200 km で、1日に2周します。",
80
+ orbit: "meo",
81
+ still: false,
82
+ celestrak: "gps-ops",
83
+ },
84
+ {
85
+ id: "glonass",
86
+ label: "GLONASS",
87
+ labelJa: "GLONASS",
88
+ about: "Russia's GLONASS satellites, about 19,100 km up, once round in about 11 hours 15 minutes.",
89
+ aboutJa: "ロシアの GLONASS 衛星です。高さ約19,100 km で、約11時間15分で1周します。",
90
+ orbit: "meo",
91
+ still: false,
92
+ celestrak: "glo-ops",
93
+ },
94
+ {
95
+ id: "galileo",
96
+ label: "Galileo",
97
+ labelJa: "ガリレオ",
98
+ about: "Europe's Galileo satellites, about 23,200 km up, once round in about 14 hours.",
99
+ aboutJa: "ヨーロッパのガリレオ衛星です。高さ約23,200 km で、約14時間で1周します。",
100
+ orbit: "meo",
101
+ still: false,
102
+ celestrak: "galileo",
103
+ },
104
+ {
105
+ id: "beidou",
106
+ label: "BeiDou",
107
+ labelJa: "北斗",
108
+ about: "China's BeiDou satellites. Most are about 21,500 km up; some are geostationary or on tilted orbits that stay near one place.",
109
+ aboutJa: "中国の北斗衛星です。多くは高さ約21,500 km にあります。静止しているものや、傾いた軌道で1つの場所の近くにとどまるものもあります。",
110
+ orbit: "mixed",
111
+ still: false,
112
+ celestrak: "beidou",
113
+ },
114
+ {
115
+ id: "amateur",
116
+ label: "Amateur radio",
117
+ labelJa: "アマチュア無線",
118
+ about: "Satellites built or used by radio amateurs: FUNcube-1, SO-50, RS-44, the Fox satellites, and old ones like OSCAR 7 from 1974.",
119
+ aboutJa: "アマチュア無線の人たちが作ったり使ったりする衛星です。FUNcube-1、SO-50、RS-44、Fox 衛星、1974年の OSCAR 7 などの古いものもあります。",
120
+ orbit: "mixed",
121
+ still: false,
122
+ celestrak: "amateur",
123
+ },
124
+ {
125
+ id: "oneweb",
126
+ label: "OneWeb",
127
+ labelJa: "OneWeb",
128
+ about: "About 650 OneWeb internet satellites, 1,200 km up on orbits that pass near the poles.",
129
+ aboutJa: "インターネット用の OneWeb 衛星、約650機です。高さ1,200 km で、極の近くを通る軌道を回ります。",
130
+ orbit: "leo",
131
+ still: false,
132
+ celestrak: "oneweb",
133
+ },
134
+ {
135
+ id: "iridium",
136
+ label: "Iridium",
137
+ labelJa: "イリジウム",
138
+ about: "The Iridium NEXT satellites for phones and data anywhere on Earth, 780 km up on orbits that pass near the poles.",
139
+ aboutJa: "地球のどこでも電話やデータが使える、イリジウム NEXT の衛星です。高さ780 km で、極の近くを通ります。",
140
+ orbit: "leo",
141
+ still: false,
142
+ celestrak: "iridium-NEXT",
143
+ },
144
+ {
145
+ id: "starlink",
146
+ label: "Starlink",
147
+ labelJa: "Starlink",
148
+ about: "SpaceX's Starlink: thousands of small internet satellites, mostly about 550 km up.",
149
+ aboutJa: "SpaceX の Starlink です。小さなインターネット衛星が何千機もあり、多くは高さ約550 km にあります。",
150
+ orbit: "leo",
151
+ still: false,
152
+ celestrak: "starlink",
153
+ },
154
+ ];
155
+ /**
156
+ * The satellites worth naming, with the NORAD number every source uses for them: the stations, the famous ones, and a few of each group.
157
+ * JWST is not here on purpose: it is not in Earth orbit (it circles the Sun about 1.5 million km out, at the second Lagrange point).
158
+ *
159
+ * @example
160
+ * ```ts
161
+ * import { CATALOGUE } from "@johnmorrisdotca/chikyu-earth/satellites";
162
+ *
163
+ * console.log(CATALOGUE.filter((entry) => entry.group === "stations").map((entry) => entry.name));
164
+ * ```
165
+ */
166
+ export const CATALOGUE = [
167
+ { noradId: 25544, name: "ISS (ZARYA)", group: "stations", orbit: "leo", about: "The International Space Station, lived in without a break since November 2000, about 420 km up and tilted 51.6 degrees.", aboutJa: "国際宇宙ステーション。2000年11月から、ずっと人が滞在しています。高さ約420 km で、傾きは51.6度です。" },
168
+ { noradId: 48274, name: "CSS (TIANHE)", group: "stations", orbit: "leo", about: "Tianhe, the core of China's Tiangong station, tilted 41.5 degrees.", aboutJa: "中国の宇宙ステーション、天宮の中心になる天和です。傾きは41.5度です。" },
169
+ { noradId: 5, name: "VANGUARD 1", group: "famous", orbit: "heo", about: "A grapefruit-sized sphere launched on 17 March 1958: the oldest satellite still in orbit, on a long oval that takes it about 3,800 km out.", aboutJa: "1958年3月17日に打ち上げた、グレープフルーツくらいの球です。今も軌道にある、いちばん古い衛星で、いちばん遠いところは高さ約3,800 km です。" },
170
+ { noradId: 20580, name: "HST", group: "famous", orbit: "leo", about: "The Hubble Space Telescope, in orbit since 1990, about 94 minutes round and tilted 28.5 degrees.", aboutJa: "ハッブル宇宙望遠鏡です。1990年から軌道にあり、約94分で1周します。傾きは28.5度です。" },
171
+ { noradId: 25867, name: "CXO", group: "famous", orbit: "heo", about: "The Chandra X-ray Observatory, launched 1999, on a long oval that swings out to about a third of the way to the Moon.", aboutJa: "チャンドラ X線天文台です。1999年に打ち上げ、月までの約3分の1の遠さまで行く、細長い軌道を回ります。" },
172
+ { noradId: 8820, name: "LAGEOS 1", group: "famous", orbit: "meo", about: "A 60 cm ball covered in mirrors that lasers on the ground bounce light off, to measure the Earth's shape and the slow drift of its continents. Launched 1976.", aboutJa: "地上のレーザーの光を返す鏡で全体をおおった、直径60 cm の球です。地球の形や、大陸のゆっくりした動きを測ります。1976年に打ち上げました。" },
173
+ { noradId: 27386, name: "ENVISAT", group: "famous", orbit: "leo", about: "Europe's Earth-watching satellite, working from 2002 until contact was lost in 2012. Still up there, one of the biggest pieces of space junk.", aboutJa: "ヨーロッパの地球観測衛星です。2002年から働き、2012年に連絡が取れなくなりました。今も軌道にあり、大きな宇宙ごみの1つです。" },
174
+ { noradId: 28485, name: "SWIFT", group: "science", orbit: "leo", about: "NASA's Swift, which turns within a minute to look at gamma-ray bursts, the flashes of exploding stars.", aboutJa: "NASA の Swift です。星の爆発で起こるガンマ線バーストを、1分もかからず向きを変えて見ます。" },
175
+ { noradId: 33053, name: "FGRST (GLAST)", group: "science", orbit: "leo", about: "NASA's Fermi gamma-ray telescope, which maps the whole sky every few hours.", aboutJa: "NASA の Fermi ガンマ線望遠鏡です。数時間ごとに、空全体を調べます。" },
176
+ { noradId: 25989, name: "XMM-NEWTON", group: "science", orbit: "heo", about: "Europe's X-ray telescope, on a long oval orbit that takes it more than 100,000 km out.", aboutJa: "ヨーロッパの X線望遠鏡です。高さ10万 km 以上まで行く、細長い軌道を回ります。" },
177
+ { noradId: 49954, name: "IXPE", group: "science", orbit: "leo", about: "NASA's Imaging X-ray Polarimetry Explorer, which orbits right over the equator.", aboutJa: "NASA の IXPE です。赤道のすぐ上を回ります。" },
178
+ { noradId: 57800, name: "XRISM", group: "science", orbit: "leo", about: "The X-ray satellite JAXA launched in 2023, built with NASA and ESA.", aboutJa: "NASA と ESA といっしょに作り、2023年に JAXA が打ち上げた X線天文衛星です。" },
179
+ { noradId: 36395, name: "SDO", group: "science", orbit: "geo", about: "NASA's Solar Dynamics Observatory, which watches the Sun all day from a tilted orbit that takes a day to go round, so it draws a figure eight over one place.", aboutJa: "NASA の太陽観測衛星です。傾いた軌道を1日で1周して、1つの場所の上で8の字をえがきながら、いつも太陽を見ています。" },
180
+ { noradId: 40482, name: "MMS 1", group: "science", orbit: "heo", about: "One of NASA's four MMS craft that fly in a tight group through the Earth's magnetic field.", aboutJa: "NASA の MMS の4機のうちの1機です。4機は近くに並んで、地球の磁場の中を飛びます。" },
181
+ { noradId: 25994, name: "TERRA", group: "earth-observation", orbit: "leo", about: "NASA's Terra, launched 1999, which crosses the equator on the day side every morning at the same hour.", aboutJa: "1999年に打ち上げた NASA の Terra です。毎日同じ時刻の午前中に、昼間の赤道を通ります。" },
182
+ { noradId: 27424, name: "AQUA", group: "earth-observation", orbit: "leo", about: "NASA's Aqua, Terra's partner, which crosses in the afternoon and watches water in the air, sea and ice.", aboutJa: "Terra の仲間の NASA の Aqua です。午後に通り、空気、海、氷の水を見ています。" },
183
+ { noradId: 39084, name: "LANDSAT 8", group: "earth-observation", orbit: "leo", about: "Landsat 8, part of the longest unbroken record of the Earth's land seen from space, since 1972.", aboutJa: "Landsat 8 です。1972年から続く、宇宙から見た地球の陸の、いちばん長い記録の一部です。" },
184
+ { noradId: 49260, name: "LANDSAT 9", group: "earth-observation", orbit: "leo", about: "Landsat 9, launched 2021, flying half an orbit apart from Landsat 8 so the pair sees any place every eight days.", aboutJa: "2021年に打ち上げた Landsat 9 です。Landsat 8 と半周ずれて飛び、2機で同じ場所を8日ごとに見ます。" },
185
+ { noradId: 40697, name: "SENTINEL-2A", group: "earth-observation", orbit: "leo", about: "One of Europe's Copernicus Sentinel-2 pair that photograph land and coasts in colour.", aboutJa: "ヨーロッパの Copernicus の Sentinel-2 の2機のうちの1機です。陸と海岸をカラーで撮影します。" },
186
+ { noradId: 42063, name: "SENTINEL-2B", group: "earth-observation", orbit: "leo", about: "The other of the Sentinel-2 pair.", aboutJa: "Sentinel-2 の、もう1機です。" },
187
+ { noradId: 39634, name: "SENTINEL-1A", group: "earth-observation", orbit: "leo", about: "A Copernicus radar satellite that sees through cloud and at night.", aboutJa: "雲があっても夜でも見える、Copernicus のレーダー衛星です。" },
188
+ { noradId: 46984, name: "SENTINEL-6A", group: "earth-observation", orbit: "leo", about: "The reference satellite for the height of the sea, higher up than most (about 1,300 km).", aboutJa: "海面の高さを測る基準の衛星です。ほかの多くより高く、約1,300 km にあります。" },
189
+ { noradId: 43613, name: "ICESAT-2", group: "earth-observation", orbit: "leo", about: "NASA's laser satellite that measures the height of ice sheets.", aboutJa: "氷床の高さを測る、NASA のレーザー衛星です。" },
190
+ { noradId: 54754, name: "SWOT", group: "earth-observation", orbit: "leo", about: "A NASA and CNES satellite that measures the height of the water in oceans, lakes and rivers.", aboutJa: "海、湖、川の水面の高さを測る、NASA と CNES の衛星です。" },
191
+ { noradId: 43013, name: "NOAA 20 (JPSS-1)", group: "weather", orbit: "leo", about: "An American polar weather satellite that sees every place on Earth twice a day.", aboutJa: "アメリカの極軌道の気象衛星です。地球のどこでも、1日に2回見ます。" },
192
+ { noradId: 54234, name: "NOAA 21 (JPSS-2)", group: "weather", orbit: "leo", about: "NOAA 20's partner, half an orbit apart.", aboutJa: "NOAA 20 の仲間で、半周ずれて飛びます。" },
193
+ { noradId: 37849, name: "SUOMI NPP", group: "weather", orbit: "leo", about: "The satellite that took the Black Marble night pictures of the Earth's lights.", aboutJa: "地球の夜の明かりの写真、ブラックマーブルを撮った衛星です。" },
194
+ { noradId: 38771, name: "METOP-B", group: "weather", orbit: "leo", about: "One of Europe's Metop polar weather satellites.", aboutJa: "ヨーロッパの極軌道の気象衛星 Metop の1機です。" },
195
+ { noradId: 60133, name: "GOES 19", group: "weather", orbit: "geo", about: "An American weather satellite that sits still over the equator, watching the Americas all day.", aboutJa: "アメリカの気象衛星です。赤道の上で止まって見え、南北アメリカを1日中見ています。" },
196
+ { noradId: 41836, name: "HIMAWARI-9", group: "weather", orbit: "geo", about: "Japan's Himawari (sunflower) weather satellite, sitting still over the western Pacific.", aboutJa: "日本の気象衛星ひまわりです。西太平洋の上で止まって見えます。" },
197
+ { noradId: 54743, name: "METEOSAT-12 (MTG-I1)", group: "weather", orbit: "geo", about: "Europe's newest weather imager, sitting still over the Gulf of Guinea.", aboutJa: "ヨーロッパの新しい気象衛星です。ギニア湾の上で止まって見えます。" },
198
+ { noradId: 41882, name: "FENGYUN 4A", group: "weather", orbit: "geo", about: "A Chinese weather satellite that sits still over the equator.", aboutJa: "赤道の上で止まって見える、中国の気象衛星です。" },
199
+ { noradId: 7530, name: "OSCAR 7 (AO-7)", group: "amateur", orbit: "leo", about: "A radio-amateur satellite launched in 1974 that went silent in 1981 and came back to life in 2002.", aboutJa: "1974年に打ち上げたアマチュア無線の衛星です。1981年に止まり、2002年に動き出しました。" },
200
+ { noradId: 39444, name: "FUNCUBE-1 (AO-73)", group: "amateur", orbit: "leo", about: "A cubesat made for schools, with a radio beacon anyone can listen to.", aboutJa: "学校のために作られた小さな衛星です。だれでも聞ける電波を出しています。" },
201
+ { noradId: 27607, name: "SAUDISAT 1C (SO-50)", group: "amateur", orbit: "leo", about: "A long-lived FM voice repeater that hams use with a handheld radio.", aboutJa: "手持ちの無線機で使える、長く働いている FM の中継衛星です。" },
202
+ { noradId: 44909, name: "RS-44 & BREEZE-KM R/B", group: "amateur", orbit: "leo", about: "A Russian amateur satellite on a higher orbit than most (about 1,500 km), used for long-distance calls.", aboutJa: "ほかより高い、約1,500 km の軌道を回る、ロシアのアマチュア無線の衛星です。遠くの人との交信に使います。" },
203
+ { noradId: 40967, name: "FOX-1A (AO-85)", group: "amateur", orbit: "leo", about: "The first of AMSAT's Fox satellites, built with university students.", aboutJa: "AMSAT の Fox 衛星の1機目です。大学の学生といっしょに作りました。" },
204
+ ];
205
+ /** A name made easy to compare: upper case, letters and digits only. */
206
+ const squash = (text) => text.toUpperCase().replace(/[^A-Z0-9]+/g, "");
207
+ /**
208
+ * Find catalogue entries by name, group name or NORAD number: "hubble", "hst", "25544" or "weather". Matching ignores case, spaces and punctuation, and a name that starts with the text comes before one that only has it inside.
209
+ *
210
+ * @param text - What the reader typed.
211
+ * @param limit - The most entries to give back (8 by default).
212
+ * @returns The matching entries, best first; none for empty text.
213
+ * @example
214
+ * ```ts
215
+ * import { findInCatalogue } from "@johnmorrisdotca/chikyu-earth/satellites";
216
+ *
217
+ * console.log(findInCatalogue("sentinel 2").map((entry) => entry.name));
218
+ * ```
219
+ */
220
+ export function findInCatalogue(text, limit = 8) {
221
+ const wanted = squash(text);
222
+ if (!wanted)
223
+ return [];
224
+ const starts = [];
225
+ const inside = [];
226
+ for (const entry of CATALOGUE) {
227
+ const name = squash(entry.name);
228
+ if (String(entry.noradId) === wanted || name.startsWith(wanted))
229
+ starts.push(entry);
230
+ else if (name.includes(wanted) || squash(entry.group).includes(wanted) || squash(entry.about).includes(wanted))
231
+ inside.push(entry);
232
+ }
233
+ return [...starts, ...inside].slice(0, limit);
234
+ }
235
+ /**
236
+ * The catalogue entry for a NORAD number, if there is one.
237
+ *
238
+ * @param noradId - The NORAD catalogue number.
239
+ * @returns The entry, or undefined when the catalogue does not name that satellite.
240
+ * @example
241
+ * ```ts
242
+ * import { catalogueEntry } from "@johnmorrisdotca/chikyu-earth/satellites";
243
+ *
244
+ * console.log(catalogueEntry(25544)?.about);
245
+ * ```
246
+ */
247
+ export function catalogueEntry(noradId) {
248
+ return CATALOGUE.find((entry) => entry.noradId === noradId);
249
+ }
@@ -1,3 +1,4 @@
1
1
  export { createSatellites, type SatellitesOptions } from "./track.ts";
2
2
  export { DEFAULT_MAX_AGE_DAYS, MAX_SATELLITE_SPEED } from "./limits.ts";
3
3
  export type { ElementSet, RefusedElementSet, SatelliteInfo, SatelliteRef, Satellites } from "./types.ts";
4
+ export { CATALOGUE, SATELLITE_GROUPS, catalogueEntry, findInCatalogue, type CatalogueEntry, type OrbitKind, type SatelliteGroupInfo } from "./catalogue.ts";
@@ -1,3 +1,4 @@
1
1
  // The satellites' pure parts: orbital elements in, positions out (SGP4 by satellite.js, an optional peer). They import on a server. The space view takes a group with `setSatellites`.
2
2
  export { createSatellites } from "./track.js";
3
3
  export { DEFAULT_MAX_AGE_DAYS, MAX_SATELLITE_SPEED } from "./limits.js";
4
+ export { CATALOGUE, SATELLITE_GROUPS, catalogueEntry, findInCatalogue } from "./catalogue.js";
@@ -1,6 +1,8 @@
1
1
  import type { GeoPoint } from "../types.ts";
2
2
  import { setThreeLoader } from "../realistic/shared.ts";
3
+ import type { LightMode } from "../realistic/earth.ts";
3
4
  import type { SatelliteInfo, SatelliteRef, Satellites } from "../satellites/types.ts";
5
+ import { type PlanetName } from "./ephemeris.ts";
4
6
  import { type SatelliteStyle } from "./satellite-layer.ts";
5
7
  import type { RideLook } from "./ride.ts";
6
8
  import { type ScaleMode } from "./scale.ts";
@@ -53,7 +55,7 @@ export { setThreeLoader };
53
55
  */
54
56
  export type SpaceState = "loading" | "live" | "unavailable" | "lost" | "idle";
55
57
  /**
56
- * A named distance for `zoomFor`: the Earth, the Moon, the Sun, the inner planets or the whole solar system.
58
+ * A named distance for `zoomFor`: the Earth, the Moon, the Sun, the inner planets, the whole solar system, or a planet with its nearer moons (`Jupiter-moons`: the zoom that shows them, when a body painter that draws moons is set).
57
59
  *
58
60
  * @example
59
61
  * ```ts no-run
@@ -63,7 +65,7 @@ export type SpaceState = "loading" | "live" | "unavailable" | "lost" | "idle";
63
65
  * console.log(typeof zoomTo);
64
66
  * ```
65
67
  */
66
- export type SpacePreset = "earth" | "moon" | "sun" | "inner" | "solar-system";
68
+ export type SpacePreset = "earth" | "moon" | "sun" | "inner" | "solar-system" | `${Exclude<PlanetName, "Mercury" | "Venus">}-moons`;
67
69
  /**
68
70
  * How a ride along is done: `view` `from` (the default) puts the camera at the body looking at the Earth, `follow` keeps it a fixed distance from the body looking at it (`distanceKm`, 3000 by default,
69
71
  * for a satellite; a planet or the Moon is kept at the distance the zoom says); `look` `down` (the default) or `horizon` is where a camera at the body points; `smooth` (the default) glides
@@ -143,6 +145,17 @@ export declare class ChikyuSpace extends HTMLElement {
143
145
  set scale(value: ScaleMode);
144
146
  get labels(): boolean;
145
147
  set labels(value: boolean);
148
+ /**
149
+ * How the Sun, the planets, Pluto and their moons are drawn: one of the `looks` of the body painter set with `setBodyPainter` (wakusei-planets has `realistic` and `painted`), or `plain` (the sphere in the right colour, no moons); empty for the painter's first.
150
+ * With no painter they are plain spheres and this does nothing. Changing it draws the bodies again with the new look.
151
+ */
152
+ get bodies(): string;
153
+ set bodies(value: string);
154
+ /** How the Earth is lit: `sun` (true, the default), `lit` (always lit, as if by daylight from the camera's side, so a ride on the night side is never a black frame) or `boost` (the true terminator, with the night side raised). The Sun, the Moon and the planets keep their true places. */
155
+ get light(): LightMode;
156
+ set light(value: LightMode);
157
+ /** The looks the body painter offers (empty with no painter), for a page to build its choice from. */
158
+ get bodyLooks(): readonly string[];
146
159
  get orbits(): boolean;
147
160
  set orbits(value: boolean);
148
161
  /**
@@ -235,6 +248,12 @@ export declare class ChikyuSpace extends HTMLElement {
235
248
  position: [number, number, number];
236
249
  fov: number;
237
250
  };
251
+ /** What the body painter has made at the last draw: the Sun and planets with a drawing, and the moons shown round a planet that is near. */
252
+ bodies: {
253
+ look: string;
254
+ painted: number;
255
+ moons: number;
256
+ };
238
257
  };
239
258
  }
240
259
  declare global {
@@ -5,7 +5,7 @@ import { MAX_TEXTURE } from "../realistic/tiers.js";
5
5
  import { MAX_SATELLITE_SPEED } from "../satellites/limits.js";
6
6
  import { AU_IN_EARTH_RADII, EARTH_RADIUS_KM, frameAt } from "./ephemeris.js";
7
7
  import { MAX_ORBIT_GROUP } from "./satellite-layer.js";
8
- import { placeAround, placeMoon, placeSun } from "./scale.js";
8
+ import { placeAround, placeMoon, placeSun, RADIUS } from "./scale.js";
9
9
  import { BODY_NAMES, createSpaceItem, FIT_DISTANCE, newSpaceModel } from "./scene.js";
10
10
  export { BODY_NAMES };
11
11
  let painter;
@@ -27,8 +27,10 @@ export function setBodyPainter(next) {
27
27
  painter = next;
28
28
  }
29
29
  /** Mean radii in kilometres (IAU), for what a click tells. */
30
- const RADIUS_KM = { Sun: 695_700, Mercury: 2439.7, Venus: 6051.8, Earth: 6371, Moon: 1737.4, Mars: 3389.5, Jupiter: 69_911, Saturn: 58_232, Uranus: 25_362, Neptune: 24_622 };
30
+ const RADIUS_KM = { Sun: 695_700, Mercury: 2439.7, Venus: 6051.8, Earth: 6371, Moon: 1737.4, Mars: 3389.5, Jupiter: 69_911, Saturn: 58_232, Uranus: 25_362, Neptune: 24_622, Pluto: 1188.3 };
31
31
  export { setThreeLoader };
32
+ /** A `light` attribute: `lit` or `boost`, else the true sun. */
33
+ const readLight = (value) => (value === "lit" || value === "boost" ? value : "sun");
32
34
  const RAD = Math.PI / 180;
33
35
  /** The Earth's own turn, degrees a second. */
34
36
  const EARTH_RATE = 360 / 86_164.0905;
@@ -65,7 +67,7 @@ const STYLE = `:host{display:block;aspect-ratio:1/1;position:relative;overflow:h
65
67
  * ```
66
68
  */
67
69
  export class ChikyuSpace extends HTMLElement {
68
- static observedAttributes = ["center", "time", "speed", "scale", "labels", "orbits"];
70
+ static observedAttributes = ["center", "time", "speed", "scale", "labels", "orbits", "bodies", "light"];
69
71
  #model = newSpaceModel();
70
72
  #mode = "now";
71
73
  #speed = 1;
@@ -93,6 +95,8 @@ export class ChikyuSpace extends HTMLElement {
93
95
  this.#model.mode = this.getAttribute("scale") === "true" ? "true" : "compressed";
94
96
  this.#model.labels = this.getAttribute("labels") !== "off";
95
97
  this.#model.orbits = this.getAttribute("orbits") !== "off";
98
+ this.#model.bodies = this.getAttribute("bodies") ?? "";
99
+ this.#model.light = readLight(this.getAttribute("light"));
96
100
  this.#model.stepMs = Math.max(1000, Math.abs(this.#speed) * 1000);
97
101
  this.#model.speed = this.#speed;
98
102
  if (!this.hasAttribute("role"))
@@ -129,6 +133,7 @@ export class ChikyuSpace extends HTMLElement {
129
133
  onRideLost: () => this.#rideLost(),
130
134
  onSatellitesError: (error) => this.dispatchEvent(new CustomEvent("chikyu-satellites-unavailable", { detail: { reason: error instanceof Error ? error.message : String(error) } })),
131
135
  ...(painter ? { painter } : {}),
136
+ onPainterError: (error) => this.dispatchEvent(new CustomEvent("chikyu-bodies-unavailable", { detail: { reason: error instanceof Error ? error.message : String(error) } })),
132
137
  });
133
138
  this.#view = taken.renderer.view(this.#stage, item, { still: null });
134
139
  this.#set("loading");
@@ -170,6 +175,10 @@ export class ChikyuSpace extends HTMLElement {
170
175
  this.labels = value !== "off";
171
176
  else if (name === "orbits")
172
177
  this.orbits = value !== "off";
178
+ else if (name === "bodies")
179
+ this.bodies = value ?? "";
180
+ else if (name === "light")
181
+ this.light = readLight(value);
173
182
  }
174
183
  get centre() {
175
184
  return { ...this.#model.centre };
@@ -219,6 +228,29 @@ export class ChikyuSpace extends HTMLElement {
219
228
  label.hidden = true;
220
229
  this.#gate?.request();
221
230
  }
231
+ /**
232
+ * How the Sun, the planets, Pluto and their moons are drawn: one of the `looks` of the body painter set with `setBodyPainter` (wakusei-planets has `realistic` and `painted`), or `plain` (the sphere in the right colour, no moons); empty for the painter's first.
233
+ * With no painter they are plain spheres and this does nothing. Changing it draws the bodies again with the new look.
234
+ */
235
+ get bodies() {
236
+ return this.#model.bodies;
237
+ }
238
+ set bodies(value) {
239
+ this.#model.bodies = value;
240
+ this.#gate?.request();
241
+ }
242
+ /** How the Earth is lit: `sun` (true, the default), `lit` (always lit, as if by daylight from the camera's side, so a ride on the night side is never a black frame) or `boost` (the true terminator, with the night side raised). The Sun, the Moon and the planets keep their true places. */
243
+ get light() {
244
+ return this.#model.light;
245
+ }
246
+ set light(value) {
247
+ this.#model.light = value;
248
+ this.#gate?.request();
249
+ }
250
+ /** The looks the body painter offers (empty with no painter), for a page to build its choice from. */
251
+ get bodyLooks() {
252
+ return painter?.looks ?? [];
253
+ }
222
254
  get orbits() {
223
255
  return this.#model.orbits;
224
256
  }
@@ -394,6 +426,13 @@ export class ChikyuSpace extends HTMLElement {
394
426
  }
395
427
  /** The zoom that shows a part of the sky: the Earth alone, the Moon's orbit, the Sun, the planets out to Mars, or all of them, at this scale and moment. */
396
428
  zoomFor(preset) {
429
+ if (preset.endsWith("-moons")) {
430
+ const name = preset.slice(0, -6);
431
+ const sites = painter?.moons?.(name, this.#model.time) ?? [];
432
+ const reach = Math.max(1, ...sites.map((site) => Math.hypot(...site.offset)).filter((r) => r <= 22));
433
+ const radius = RADIUS[name][this.#model.mode];
434
+ return Math.min(1, (FIT_DISTANCE * radius) / ((reach * radius * 1.15) / Math.tan(17.5 * RAD)));
435
+ }
397
436
  const frame = this.#model.drawn?.frame ?? frameAt(this.#model.time);
398
437
  const mode = this.#model.mode;
399
438
  const sun = placeSun(mode, frame.sun);
@@ -423,6 +462,7 @@ export class ChikyuSpace extends HTMLElement {
423
462
  satellites: this.#satelliteStats(),
424
463
  ride: { riding: this.#model.ride !== null, lost: this.#model.rideLost, gliding: this.#model.transition !== null },
425
464
  camera: { position: [this.#model.pose.p[0], this.#model.pose.p[1], this.#model.pose.p[2]], fov: this.#model.pose.fov },
465
+ bodies: { look: this.#model.bodies || painter?.looks?.[0] || "plain", painted: this.#model.painted.bodies, moons: this.#model.painted.moons },
426
466
  };
427
467
  }
428
468
  #satelliteStats() {
@@ -20,9 +20,9 @@ export type Vec3 = [number, number, number];
20
20
  * console.log(PLANETS.join(", "));
21
21
  * ```
22
22
  */
23
- export declare const PLANETS: readonly ["Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"];
23
+ export declare const PLANETS: readonly ["Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto"];
24
24
  /**
25
- * One of the seven planets drawn, by name.
25
+ * One of the planets drawn (Pluto too), by name.
26
26
  *
27
27
  * @example
28
28
  * ```ts
@@ -11,7 +11,7 @@ import { Body, GeoVector, HelioVector, SiderealTime } from "astronomy-engine";
11
11
  * console.log(PLANETS.join(", "));
12
12
  * ```
13
13
  */
14
- export const PLANETS = ["Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"];
14
+ export const PLANETS = ["Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto"];
15
15
  /** Equatorial J2000 axes (x to the vernal equinox, z to the north pole) to the scene's (y up). */
16
16
  const scene = (v) => [v.x, v.z, -v.y];
17
17
  const AU_KM = 149_597_870.7;
@@ -157,7 +157,7 @@ export function createTrack(initialStepMs = 1000) {
157
157
  * ```
158
158
  */
159
159
  export function orbitPath(name, ms, count = 96) {
160
- const periodDays = { Mercury: 87.97, Venus: 224.7, Mars: 686.98, Jupiter: 4332.6, Saturn: 10759, Uranus: 30688, Neptune: 60182 }[name];
160
+ const periodDays = { Mercury: 87.97, Venus: 224.7, Mars: 686.98, Jupiter: 4332.6, Saturn: 10759, Uranus: 30688, Neptune: 60182, Pluto: 90560 }[name];
161
161
  const points = [];
162
162
  for (let i = 0; i <= count; i += 1)
163
163
  points.push(scene(HelioVector(Body[name], new Date(ms + (i / count) * periodDays * 86_400_000))));
@@ -1,4 +1,4 @@
1
1
  export { AU_IN_EARTH_RADII, blend, createTrack, EARTH_RADIUS_KM, frameAt, orbitPath, PLANETS, type Frame, type PlanetName, type Vec3 } from "./ephemeris.ts";
2
2
  export { compress, MOON_COMPRESSED, placeAround, placeMoon, placeSun, RADIUS, SUN_COMPRESSED, truePosition, type ScaleMode } from "./scale.ts";
3
- export { plainPainter, type BodyDrawing, type BodyPainter } from "./scene.ts";
3
+ export { plainPainter, type BodyDrawing, type BodyMoon, type BodyPainter, type PaintContext } from "./scene.ts";
4
4
  export { RIDE_FOV, ridePose, type RideInput, type RideLook, type RidePose } from "./ride.ts";
@@ -138,4 +138,5 @@ export const RADIUS = {
138
138
  Saturn: { true: 9.14, compressed: 1.6 },
139
139
  Uranus: { true: 3.98, compressed: 1.0 },
140
140
  Neptune: { true: 3.86, compressed: 1.0 },
141
+ Pluto: { true: 0.186, compressed: 0.4 },
141
142
  };