@johnmorrisdotca/chikyu-earth 0.34.1 → 0.36.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 +20 -0
- package/NOTICE.md +23 -1
- package/README.md +20 -2
- package/dist/borders/layer.d.ts +75 -0
- package/dist/borders/layer.js +136 -0
- package/dist/borders/lines.d.ts +138 -0
- package/dist/borders/lines.js +227 -0
- package/dist/cities/host.d.ts +9 -0
- package/dist/cities/host.js +14 -2
- package/dist/country-names/geometry.d.ts +264 -0
- package/dist/country-names/geometry.js +372 -0
- package/dist/country-names/host.d.ts +82 -0
- package/dist/country-names/host.js +212 -0
- package/dist/grid/layer.d.ts +45 -0
- package/dist/grid/layer.js +66 -0
- package/dist/grid/lines.d.ts +85 -0
- package/dist/grid/lines.js +113 -0
- package/dist/markers/go-to-place.d.ts +27 -0
- package/dist/markers/go-to-place.js +35 -0
- package/dist/markers/index.d.ts +2 -1
- package/dist/markers/index.js +2 -1
- package/dist/markers/layer.d.ts +7 -0
- package/dist/markers/layer.js +7 -0
- package/dist/markers/place-layer.d.ts +58 -7
- package/dist/markers/place-layer.js +326 -64
- package/dist/markers/place-sprites.d.ts +33 -0
- package/dist/markers/place-sprites.js +161 -0
- package/dist/markers/places.d.ts +91 -6
- package/dist/markers/places.js +135 -6
- package/dist/realistic/earth.d.ts +11 -0
- package/dist/realistic/earth.js +54 -0
- package/dist/realistic/element.d.ts +84 -4
- package/dist/realistic/element.js +224 -27
- package/dist/realistic/immersive.d.ts +7 -0
- package/dist/realistic/immersive.js +17 -0
- package/dist/realistic/index.d.ts +7 -0
- package/dist/realistic/index.js +3 -0
- package/dist/realistic/textures.d.ts +3 -0
- package/dist/sky/culture-lines.d.ts +56 -0
- package/dist/sky/culture-lines.js +82 -0
- package/dist/sky/figure-pick.d.ts +75 -0
- package/dist/sky/figure-pick.js +200 -0
- package/dist/sky/host.d.ts +17 -1
- package/dist/sky/host.js +615 -71
- package/dist/sky/keep-clear.d.ts +63 -0
- package/dist/sky/keep-clear.js +55 -0
- package/dist/space/element.d.ts +105 -10
- package/dist/space/element.js +275 -18
- package/dist/space/index.d.ts +2 -2
- package/dist/space/index.js +1 -1
- package/dist/space/satellite-model.d.ts +22 -0
- package/dist/space/satellite-model.js +38 -0
- package/dist/space/scene.d.ts +56 -7
- package/dist/space/scene.js +124 -23
- package/package.json +3 -3
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A place where the sky's names must not go, as the property `keepClear` of `<chikyu-space>` and `<chikyu-earth-realistic>` takes it: a rectangle in the element's own CSS pixels from its top left, or an element of the page whose box is read (on a resize, not every frame).
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import type { SkyKeepClear } from "@johnmorrisdotca/chikyu-earth/realistic";
|
|
7
|
+
*
|
|
8
|
+
* const areas: SkyKeepClear[] = [{ x: 24, y: 40, width: 480, height: 220 }];
|
|
9
|
+
* console.log(areas.length);
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export type SkyKeepClear = {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
} | {
|
|
18
|
+
getBoundingClientRect(): {
|
|
19
|
+
left: number;
|
|
20
|
+
top: number;
|
|
21
|
+
right: number;
|
|
22
|
+
bottom: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/** A keep-clear area as the layer holds it: its edges, from the picture's top left, in CSS pixels. */
|
|
26
|
+
export interface KeepBox {
|
|
27
|
+
l: number;
|
|
28
|
+
t: number;
|
|
29
|
+
r: number;
|
|
30
|
+
b: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The edges of a keep-clear area, from the picture's top left.
|
|
34
|
+
*
|
|
35
|
+
* @param area - A rectangle in the picture's own pixels, or an element of the page.
|
|
36
|
+
* @param own - The picture's box on the page (`getBoundingClientRect`), to read an element's box against.
|
|
37
|
+
* @param into - The box to write, or one is made.
|
|
38
|
+
* @returns The box.
|
|
39
|
+
*/
|
|
40
|
+
export declare function keepBox(area: SkyKeepClear, own: {
|
|
41
|
+
left: number;
|
|
42
|
+
top: number;
|
|
43
|
+
}, into?: KeepBox): KeepBox;
|
|
44
|
+
/**
|
|
45
|
+
* Whether a box touches any of the keep-clear areas.
|
|
46
|
+
*
|
|
47
|
+
* @param areas - The areas, from `keepBox`.
|
|
48
|
+
* @param left - The box's left.
|
|
49
|
+
* @param top - The top.
|
|
50
|
+
* @param right - The right.
|
|
51
|
+
* @param bottom - The bottom.
|
|
52
|
+
* @returns True where the box and an area overlap.
|
|
53
|
+
*/
|
|
54
|
+
export declare function touchesKeep(areas: readonly KeepBox[], left: number, top: number, right: number, bottom: number): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether a point is inside any of the keep-clear areas.
|
|
57
|
+
*
|
|
58
|
+
* @param areas - The areas, from `keepBox`.
|
|
59
|
+
* @param x - The point's x.
|
|
60
|
+
* @param y - The point's y.
|
|
61
|
+
* @returns True where the point is in an area.
|
|
62
|
+
*/
|
|
63
|
+
export declare function inKeep(areas: readonly KeepBox[], x: number, y: number): boolean;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Places on the picture where the sky's names must not go: a page's own text laid over the element. Types and pure helpers; `host.ts` measures and uses them.
|
|
2
|
+
/**
|
|
3
|
+
* The edges of a keep-clear area, from the picture's top left.
|
|
4
|
+
*
|
|
5
|
+
* @param area - A rectangle in the picture's own pixels, or an element of the page.
|
|
6
|
+
* @param own - The picture's box on the page (`getBoundingClientRect`), to read an element's box against.
|
|
7
|
+
* @param into - The box to write, or one is made.
|
|
8
|
+
* @returns The box.
|
|
9
|
+
*/
|
|
10
|
+
export function keepBox(area, own, into = { l: 0, t: 0, r: 0, b: 0 }) {
|
|
11
|
+
if ("getBoundingClientRect" in area) {
|
|
12
|
+
const rect = area.getBoundingClientRect();
|
|
13
|
+
into.l = rect.left - own.left;
|
|
14
|
+
into.t = rect.top - own.top;
|
|
15
|
+
into.r = rect.right - own.left;
|
|
16
|
+
into.b = rect.bottom - own.top;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
into.l = area.x;
|
|
20
|
+
into.t = area.y;
|
|
21
|
+
into.r = area.x + area.width;
|
|
22
|
+
into.b = area.y + area.height;
|
|
23
|
+
}
|
|
24
|
+
return into;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Whether a box touches any of the keep-clear areas.
|
|
28
|
+
*
|
|
29
|
+
* @param areas - The areas, from `keepBox`.
|
|
30
|
+
* @param left - The box's left.
|
|
31
|
+
* @param top - The top.
|
|
32
|
+
* @param right - The right.
|
|
33
|
+
* @param bottom - The bottom.
|
|
34
|
+
* @returns True where the box and an area overlap.
|
|
35
|
+
*/
|
|
36
|
+
export function touchesKeep(areas, left, top, right, bottom) {
|
|
37
|
+
for (const a of areas)
|
|
38
|
+
if (left < a.r && right > a.l && top < a.b && bottom > a.t)
|
|
39
|
+
return true;
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Whether a point is inside any of the keep-clear areas.
|
|
44
|
+
*
|
|
45
|
+
* @param areas - The areas, from `keepBox`.
|
|
46
|
+
* @param x - The point's x.
|
|
47
|
+
* @param y - The point's y.
|
|
48
|
+
* @returns True where the point is in an area.
|
|
49
|
+
*/
|
|
50
|
+
export function inKeep(areas, x, y) {
|
|
51
|
+
for (const a of areas)
|
|
52
|
+
if (x >= a.l && x <= a.r && y >= a.t && y <= a.b)
|
|
53
|
+
return true;
|
|
54
|
+
return false;
|
|
55
|
+
}
|
package/dist/space/element.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { type ViewController } from "@johnmorrisdotca/kazoku-ui/view-controls";
|
|
2
2
|
import type { GeoPoint } from "../types.ts";
|
|
3
3
|
import { type BodyLabelSettings } from "../realistic/body-label.ts";
|
|
4
|
+
import type { SkyKeepClear } from "../sky/keep-clear.ts";
|
|
4
5
|
import type { SkyLabelStyle } from "../sky/style.ts";
|
|
5
6
|
import { type Place, type PlaceLook } from "../markers/places.ts";
|
|
6
7
|
import { type CityNamesStyle } from "../cities/host.ts";
|
|
8
|
+
import { type BorderSets } from "../borders/lines.ts";
|
|
9
|
+
import type { BorderData, BorderStats } from "../borders/layer.ts";
|
|
10
|
+
import type { GridStats } from "../grid/layer.ts";
|
|
11
|
+
import { type CountryNamesStats, type CountryNamesStyle } from "../country-names/host.ts";
|
|
7
12
|
import { setThreeLoader } from "../realistic/shared.ts";
|
|
8
13
|
import type { LightMode } from "../realistic/earth.ts";
|
|
9
14
|
import type { SatelliteInfo, SatelliteRef, Satellites } from "../satellites/types.ts";
|
|
@@ -87,7 +92,8 @@ export type SpaceState = "loading" | "live" | "unavailable" | "lost" | "idle";
|
|
|
87
92
|
export type SpacePreset = "earth" | "moon" | "sun" | "inner" | "solar-system" | `${Exclude<PlanetName, "Mercury" | "Venus">}-moons`;
|
|
88
93
|
/**
|
|
89
94
|
* 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,
|
|
90
|
-
* for a satellite; a planet or the Moon is kept at the distance the zoom says); `
|
|
95
|
+
* for a satellite; a planet or the Moon is kept at the distance the zoom says); `above` (a satellite only; a body is followed) puts it on the line from the Earth's centre through the satellite, `distanceKm` (divided by the zoom) above it, looking straight down at it with the way it is going at the top
|
|
96
|
+
* of the picture, the satellite held in the middle while the Earth turns beneath (a drag turns the picture about the satellite and tips the camera back or ahead of it); `look` `down` (the default) or `horizon` is where a camera at the body points; `smooth` (the default) glides
|
|
91
97
|
* from the old camera to the new one in about a second and a bit, and jumps instead for a reader who asked for reduced motion.
|
|
92
98
|
*
|
|
93
99
|
* @example
|
|
@@ -99,7 +105,7 @@ export type SpacePreset = "earth" | "moon" | "sun" | "inner" | "solar-system" |
|
|
|
99
105
|
* ```
|
|
100
106
|
*/
|
|
101
107
|
export interface RideOptions {
|
|
102
|
-
view?: "from" | "follow";
|
|
108
|
+
view?: "from" | "follow" | "above";
|
|
103
109
|
look?: RideLook;
|
|
104
110
|
distanceKm?: number;
|
|
105
111
|
smooth?: boolean;
|
|
@@ -117,7 +123,7 @@ export interface RideOptions {
|
|
|
117
123
|
*/
|
|
118
124
|
export interface Riding {
|
|
119
125
|
target: RideTarget;
|
|
120
|
-
view: "from" | "follow";
|
|
126
|
+
view: "from" | "follow" | "above";
|
|
121
127
|
look: RideLook;
|
|
122
128
|
distanceKm: number;
|
|
123
129
|
}
|
|
@@ -136,13 +142,21 @@ type SatelliteStats = {
|
|
|
136
142
|
/**
|
|
137
143
|
* The `<chikyu-space>` custom element: the Earth, the Moon, the Sun and the planets where they are at a date and time, drawn with three.js through the shared renderer. It takes `center`, `time` (`now` or an ISO date), `speed` (1 is real time, 0 holds, 86400 is a day a second, negative runs backwards), `scale` (`compressed` or `true`), `labels` and `orbits` (`off` hides them); positions are computed in the browser by astronomy-engine, an optional peer dependency. It draws only when something changes, and nothing while it is out of sight.
|
|
138
144
|
*
|
|
139
|
-
* It carries kazoku-ui's controls itself: a drag turns the view, two fingers pinch, Ctrl and the wheel zoom (a plain wheel at Fit scrolls the page) and the arrow keys, + and - work once it is focused. The zoom runs from a millionth of Fit (the whole solar system) to 2.5 times, and from 0.5 to 6 times while riding from a body. `controls="none"` turns the hands off; `zoom-min` and `zoom-max` change the range. A `<kazoku-view-controls for="...">` on the element takes the hands over, and the page applies its events with `setView`.
|
|
145
|
+
* It carries kazoku-ui's controls itself: a drag turns the view, two fingers pinch, Ctrl and the wheel zoom (a plain wheel at Fit scrolls the page) and the arrow keys, + and - work once it is focused. The zoom runs from a millionth of Fit (the whole solar system) to 2.5 times, and from 0.5 to 6 times while riding from a body. `controls="none"` turns the hands off; `zoom-min` and `zoom-max` change the range. A `<kazoku-view-controls for="...">` on the element takes the hands over, and the page applies its events with `setView`. `immersive` is the full-screen mode: any shape of box, a plain wheel zooms and a drag anywhere turns.
|
|
146
|
+
*
|
|
147
|
+
* With a body painter that carries a `credit` (`setBodyPainter`), the credit of its pictures is written under the picture while it draws the bodies; `bodies-credit="off"` takes the line away.
|
|
140
148
|
*
|
|
141
149
|
* While time runs (`speed` is not 0) it sends `chikyu-timechange` with `detail: { time, running: true }`, `time` being the moment shown in milliseconds since 1970, at most four times a second however fast the picture is
|
|
142
150
|
* drawn (and, with the clock at real time, as often as it steps: once a minute, or once a second with satellites or a ride on show), only while the tab is shown, and once with `running: false` when the clock holds
|
|
143
151
|
* (`speed` set to 0): a page writes the date into its date box from it. It is not sent for a `time` the page sets itself. `chikyu-time` is the older event of every step the clock takes (up to thirty a second):
|
|
144
152
|
* it is kept for pages that use it, but a page that shows the date wants `chikyu-timechange`.
|
|
145
153
|
*
|
|
154
|
+
* `borders` draws the borders on the Earth's land as thin lines that turn with it, as on `<chikyu-earth-realistic>`: `countries`, `regions` (from the page's `borderData.regions`, once the Earth is
|
|
155
|
+
* large enough), or both with a bare attribute; `chikyu-borders-unavailable` is sent when the shapes cannot be loaded.
|
|
156
|
+
*
|
|
157
|
+
* `grid` draws the meridians and parallels on the Earth, and `country-names` names its countries, as on `<chikyu-earth-realistic>`: the names keep clear of the bodies', the places' and the
|
|
158
|
+
* cities' names and stay on the Earth's disc; `chikyu-country-names-unavailable` is sent when the outlines cannot be loaded.
|
|
159
|
+
*
|
|
146
160
|
* @example
|
|
147
161
|
* ```ts no-run
|
|
148
162
|
* import type { ChikyuSpace } from "@johnmorrisdotca/chikyu-earth/space/element";
|
|
@@ -165,6 +179,12 @@ export declare class ChikyuSpace extends HTMLElement {
|
|
|
165
179
|
connectedCallback(): void;
|
|
166
180
|
disconnectedCallback(): void;
|
|
167
181
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
182
|
+
/**
|
|
183
|
+
* True for the full-screen mode (the `immersive` attribute): the element fills its box in any shape (the Earth fits the shorter side with its glow inside it, `earth-size`), a plain wheel zooms instead of scrolling
|
|
184
|
+
* the page, a drag anywhere on it turns the view, and a touch drag turns it instead of scrolling. A notch of the wheel is about 1.2 times; out far enough the Moon, the Sun and the planets come into view.
|
|
185
|
+
*/
|
|
186
|
+
get immersive(): boolean;
|
|
187
|
+
set immersive(value: boolean);
|
|
168
188
|
/**
|
|
169
189
|
* Meteors seen from space, on or off (the attribute `meteors`): short streaks where meteors burn, on the dark side of the Earth and in its twilight, more of them under an active shower, only while the
|
|
170
190
|
* clock runs, and for a reader who prefers reduced motion only once the page has set a `speed` (a Play). Each streak's place and moment are drawn at random, and a line under the picture says so
|
|
@@ -197,13 +217,46 @@ export declare class ChikyuSpace extends HTMLElement {
|
|
|
197
217
|
get skyStyle(): Partial<SkyLabelStyle>;
|
|
198
218
|
set skyStyle(value: Partial<SkyLabelStyle>);
|
|
199
219
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
|
|
220
|
+
* The constellation that is picked, by its IAU abbreviation (`Ori`), or `null`. A reader picks one by a click or a tap on its lines or inside its figure (and with the key `C`, or `Shift`+`C` for the previous, while the element has the focus); a click on empty sky, or `Escape`, lets it go. The picked figure's lines are lit and its name is
|
|
221
|
+
* shown at the middle of the part of it in view, until another is picked or it is let go. A page sets the property to pick one itself, which sends no event. `chikyu-constellation-pick` is sent at each pick of the reader's, with `detail` `{ abbreviation, id, name, english, japanese, kind, culture }` (`culture` is `iau` unless `constellation-culture` names another), and `null` when it is let go; `chikyu-constellation-hover` is sent the same way as a mouse rests on a figure and leaves it.
|
|
222
|
+
* Needs `constellation-lines` set. `constellation-culture` (`iau` by default, `western`, `japanese` or `chinese`; each is fetched only when asked for, and the value is exactly what the page sets) makes the figures, the pick and the names those of that sky culture. The attribute `constellation-names` (off by default) writes the name of every figure in view at the middle of the part of it that is on the picture, quieter than the star names and clear of them, of the Earth, the Moon, the Sun, the places and satellites named, and of the places kept clear (`keepClear`).
|
|
223
|
+
*/
|
|
224
|
+
get constellation(): string | null;
|
|
225
|
+
set constellation(value: string | null);
|
|
226
|
+
/**
|
|
227
|
+
* Places on the picture where the sky's names must not go: a page's own text laid over the element, say. Each is a rectangle in the element's own CSS pixels from its top left (`{ x, y, width, height }`), or an element of the page whose box is read. A star name whose box touches
|
|
228
|
+
* one is left out, and so is a star whose point is in one (the next star is named instead); the picked constellation's name is moved clear of it. The lines are still drawn. The boxes are read when the list changes, when the page or an element is resized or scrolled, and not at each frame: a
|
|
229
|
+
* page that moves its text without resizing it sets the property again. The attribute `keep-clear` takes a CSS selector for the same (`keep-clear=".hero h1, .hero .lead"`). Nothing is redrawn at rest.
|
|
230
|
+
*/
|
|
231
|
+
get keepClear(): SkyKeepClear[];
|
|
232
|
+
set keepClear(value: readonly SkyKeepClear[] | null);
|
|
233
|
+
/**
|
|
234
|
+
* Places marked on the Earth (the attribute `places`, a JSON array): each `{ id, lon, lat, label, kind, color }`, `kind` being `here` (where the reader is: drawn bright and taller, with a quiet pulse) or `favourite`
|
|
235
|
+
* (the default: quieter), and `color` an optional CSS colour of its own. The first `PLACE_MARKS` in sight (`here` first, then in the order given) stand up out of the ground with their names; every other place
|
|
236
|
+
* is a ring on the ground, all of them one draw call, and places that crowd are gathered into one ring with their count. They turn with the Earth, are hidden on its far side, are dimmer on its night side
|
|
237
|
+
* and keep their size in pixels at any zoom. Names never overlap one another or the bodies' names; one with no room is left out. The element stores nothing and sends nothing: the page hands the places
|
|
238
|
+
* over and keeps them where it likes. Setting the property writes the attribute; at most `MAX_PLACES` are drawn. Nothing is drawn again at rest: the pulse is the page's own animation, stopped out of sight
|
|
239
|
+
* and for a reader who asked for less motion.
|
|
204
240
|
*/
|
|
205
241
|
get places(): Place[];
|
|
206
242
|
set places(value: readonly Place[]);
|
|
243
|
+
/**
|
|
244
|
+
* Turn the view so a place of `places` is in the middle, at a pace a reader can follow (at once with `smooth: false`, for a reader who asked for less motion, or before the picture is live); the zoom stays.
|
|
245
|
+
* The place is named by its `id`, or by its label in any case. The camera must be looking at the Earth: while it rides along or looks at another body nothing moves. The tilt is held to 90 degrees either
|
|
246
|
+
* way, so a place more than 90 degrees of latitude from `center` comes as near the middle as that allows.
|
|
247
|
+
*
|
|
248
|
+
* @param text - The place's id or label.
|
|
249
|
+
* @param options - `smooth` (true by default).
|
|
250
|
+
* @returns The place, once the turn has started; `undefined` when there is no such place or the camera is not looking at the Earth.
|
|
251
|
+
*/
|
|
252
|
+
goToPlace(text: string, options?: {
|
|
253
|
+
smooth?: boolean;
|
|
254
|
+
}): Promise<Place | undefined>;
|
|
255
|
+
/**
|
|
256
|
+
* Whether places that crowd are gathered into one ring with their count (the attribute `place-groups`): on by default, `off` leaves every place its own ring. Setting the property writes the attribute.
|
|
257
|
+
*/
|
|
258
|
+
get placeGroups(): boolean;
|
|
259
|
+
set placeGroups(value: boolean);
|
|
207
260
|
/** How the places are drawn (the attribute `places-look`): `beam` (a light rising out of the ground with a ring at its foot, the default), `pin` (a thin stick with a round head) or `ring` (only the ring on the ground). */
|
|
208
261
|
get placesLook(): PlaceLook;
|
|
209
262
|
set placesLook(value: PlaceLook);
|
|
@@ -212,6 +265,27 @@ export declare class ChikyuSpace extends HTMLElement {
|
|
|
212
265
|
*/
|
|
213
266
|
get cityNamesStyle(): CityNamesStyle;
|
|
214
267
|
set cityNamesStyle(value: CityNamesStyle);
|
|
268
|
+
/** Whether the meridians and parallels are drawn on the Earth (the attribute `grid`). Setting it writes the attribute, or takes it away. */
|
|
269
|
+
get grid(): boolean;
|
|
270
|
+
set grid(value: boolean);
|
|
271
|
+
/**
|
|
272
|
+
* The look of the names of countries (`country-names`): font, weight, colour, the outline round the text, and the smallest and largest text size. Any of them may be left out; the Earth's size, the
|
|
273
|
+
* language and the data are not set here.
|
|
274
|
+
*/
|
|
275
|
+
get countryNamesStyle(): CountryNamesStyle;
|
|
276
|
+
set countryNamesStyle(value: CountryNamesStyle);
|
|
277
|
+
/**
|
|
278
|
+
* Which borders are drawn on the Earth (the attribute `borders`): the countries' at any size, and the regions' (provinces, states, prefectures) once the Earth is large enough on the screen to tell them apart.
|
|
279
|
+
* Setting it writes the attribute: both sets as `borders="countries regions"`, one as its own word, none takes the attribute away.
|
|
280
|
+
*/
|
|
281
|
+
get borders(): BorderSets;
|
|
282
|
+
set borders(value: BorderSets);
|
|
283
|
+
/**
|
|
284
|
+
* Where the borders' shapes come from (see `BorderData`): `countries` in place of chizu's `world-geo`, and `regions`, a country's regions by its code, which draws the regions; without it none are drawn.
|
|
285
|
+
* Set it before `borders` is switched on: shapes already loaded are kept.
|
|
286
|
+
*/
|
|
287
|
+
get borderData(): BorderData;
|
|
288
|
+
set borderData(value: BorderData);
|
|
215
289
|
/**
|
|
216
290
|
* How many times its real thickness the air is drawn, from 1 (the true thickness) to 5 (the attribute `air-thickness`; 3 when the page says nothing): see `<chikyu-earth-realistic>`. While it is above 1 the element says so in a line
|
|
217
291
|
* under the picture (`air-label="off"` takes the line away, for a page that says it itself).
|
|
@@ -395,11 +469,14 @@ export declare class ChikyuSpace extends HTMLElement {
|
|
|
395
469
|
quaternion: [number, number, number, number];
|
|
396
470
|
fov: number;
|
|
397
471
|
};
|
|
398
|
-
/** What the body painter has made at the last draw: the Sun and planets with a drawing,
|
|
472
|
+
/** What the body painter has made at the last draw: the Sun and planets with a drawing, the moons shown round a planet that is near and the moons held (shown, or gone from the view for less than four seconds), whether the Moon is the painter's (`moon`), and the bodies with finer map tiles on them (`tiles`). */
|
|
399
473
|
bodies: {
|
|
400
474
|
look: string;
|
|
401
475
|
painted: number;
|
|
402
476
|
moons: number;
|
|
477
|
+
held: number;
|
|
478
|
+
moon: boolean;
|
|
479
|
+
tiles: number;
|
|
403
480
|
};
|
|
404
481
|
/** The meteors: whether they are on, the streaks alive now and started so far, the streaks a second being drawn, and the strongest active shower's code and rate. */
|
|
405
482
|
meteors: {
|
|
@@ -425,6 +502,10 @@ export declare class ChikyuSpace extends HTMLElement {
|
|
|
425
502
|
names: number;
|
|
426
503
|
figures: number;
|
|
427
504
|
picked: string | null;
|
|
505
|
+
pick: string | null;
|
|
506
|
+
hover: string | null;
|
|
507
|
+
constellations: number;
|
|
508
|
+
culture: string;
|
|
428
509
|
renders: number;
|
|
429
510
|
lang: string;
|
|
430
511
|
stars: {
|
|
@@ -438,8 +519,12 @@ export declare class ChikyuSpace extends HTMLElement {
|
|
|
438
519
|
x: number;
|
|
439
520
|
y: number;
|
|
440
521
|
shown: boolean;
|
|
522
|
+
parts: number;
|
|
441
523
|
} | null;
|
|
442
|
-
/**
|
|
524
|
+
/**
|
|
525
|
+
* The places: how many were handed over, how many are in sight at the last draw (`shown`, those gathered into groups included), how many stand up as markers of their own (`marks`) and are named (`labels`),
|
|
526
|
+
* how many rings the one draw call draws (`sprites`) and how many of those are groups (`groups`), the satellites ringed and named, and how many times they were laid out.
|
|
527
|
+
*/
|
|
443
528
|
places: {
|
|
444
529
|
places: number;
|
|
445
530
|
shown: number;
|
|
@@ -447,6 +532,10 @@ export declare class ChikyuSpace extends HTMLElement {
|
|
|
447
532
|
renders: number;
|
|
448
533
|
rings: number;
|
|
449
534
|
satelliteNames: number;
|
|
535
|
+
marks: number;
|
|
536
|
+
groups: number;
|
|
537
|
+
sprites: number;
|
|
538
|
+
omitted: number;
|
|
450
539
|
};
|
|
451
540
|
/** The names of cities: whether `city-names` is set and the most it asks for, the Earth's radius on the screen, the tiers of kuni's cities that have arrived and how many cities, the names shown at the last draw and how many times the layer was drawn. */
|
|
452
541
|
cityNames: {
|
|
@@ -458,6 +547,12 @@ export declare class ChikyuSpace extends HTMLElement {
|
|
|
458
547
|
names: number;
|
|
459
548
|
renders: number;
|
|
460
549
|
};
|
|
550
|
+
/** The borders: the segments of each set, whether each was drawn at the last draw, the countries whose regions have arrived, how many times a set's lines were made, and whether a set could not be loaded. */
|
|
551
|
+
borders: BorderStats;
|
|
552
|
+
/** The grid: whether it was drawn at the last draw, whether every 15 degrees (else 30), its segments then, how many times its lines were made, and whether it could not be made. */
|
|
553
|
+
grid: GridStats;
|
|
554
|
+
/** The names of countries: whether `country-names` is set and the most it asks for, the countries loaded, the names shown at the last draw, how many times they were laid out, and whether the outlines could not be loaded. */
|
|
555
|
+
countryNames: CountryNamesStats;
|
|
461
556
|
};
|
|
462
557
|
}
|
|
463
558
|
declare global {
|