@johnmorrisdotca/wakusei-planets 0.69.0 → 0.70.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 +46 -0
- package/NOTICE.md +29 -1
- package/README.md +7 -7
- package/dist/bodies/moons-jupiter.js +2 -0
- package/dist/bodies/moons-mars.js +2 -2
- package/dist/bodies/moons-neptune.js +2 -1
- package/dist/bodies/moons-pluto.js +2 -2
- package/dist/bodies/moons-saturn.js +14 -2
- package/dist/data/discovery.js +225 -0
- package/dist/data/moon-catalogue.js +15 -15
- package/dist/data/orbits.js +15 -0
- package/dist/data/shapes/amalthea.d.ts +2 -0
- package/dist/data/shapes/amalthea.js +1 -0
- package/dist/data/shapes/atlas.d.ts +2 -0
- package/dist/data/shapes/atlas.js +1 -0
- package/dist/data/shapes/calypso.d.ts +2 -0
- package/dist/data/shapes/calypso.js +1 -0
- package/dist/data/shapes/daphnis.d.ts +2 -0
- package/dist/data/shapes/daphnis.js +1 -0
- package/dist/data/shapes/deimos.d.ts +2 -0
- package/dist/data/shapes/deimos.js +1 -0
- package/dist/data/shapes/epimetheus.d.ts +2 -0
- package/dist/data/shapes/epimetheus.js +1 -0
- package/dist/data/shapes/helene.d.ts +2 -0
- package/dist/data/shapes/helene.js +1 -0
- package/dist/data/shapes/hydra.d.ts +2 -0
- package/dist/data/shapes/hydra.js +1 -0
- package/dist/data/shapes/hyperion.d.ts +2 -0
- package/dist/data/shapes/hyperion.js +1 -0
- package/dist/data/shapes/janus.d.ts +2 -0
- package/dist/data/shapes/janus.js +1 -0
- package/dist/data/shapes/larissa.d.ts +2 -0
- package/dist/data/shapes/larissa.js +1 -0
- package/dist/data/shapes/nix.d.ts +2 -0
- package/dist/data/shapes/nix.js +1 -0
- package/dist/data/shapes/pan.d.ts +2 -0
- package/dist/data/shapes/pan.js +1 -0
- package/dist/data/shapes/pandora.d.ts +2 -0
- package/dist/data/shapes/pandora.js +1 -0
- package/dist/data/shapes/phobos.d.ts +2 -0
- package/dist/data/shapes/phobos.js +1 -0
- package/dist/data/shapes/phoebe.d.ts +2 -0
- package/dist/data/shapes/phoebe.js +1 -0
- package/dist/data/shapes/prometheus.d.ts +2 -0
- package/dist/data/shapes/prometheus.js +1 -0
- package/dist/data/shapes/proteus.d.ts +2 -0
- package/dist/data/shapes/proteus.js +1 -0
- package/dist/data/shapes/telesto.d.ts +2 -0
- package/dist/data/shapes/telesto.js +1 -0
- package/dist/data/shapes/thebe.d.ts +2 -0
- package/dist/data/shapes/thebe.js +1 -0
- package/dist/discovery.d.ts +1 -1
- package/dist/earth-places.d.ts +7 -6
- package/dist/earth-places.js +11 -8
- package/dist/facts.d.ts +21 -4
- package/dist/facts.js +71 -38
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/moon-catalogue.d.ts +1 -1
- package/dist/nearest.js +2 -0
- package/dist/picture-credits.js +3 -0
- package/dist/scene/body-places.js +4 -5
- package/dist/scene/body.js +10 -5
- package/dist/scene/earth-places.d.ts +110 -2
- package/dist/scene/earth-places.js +149 -9
- package/dist/scene/glsl.d.ts +2 -2
- package/dist/scene/glsl.js +11 -0
- package/dist/scene/look.d.ts +7 -0
- package/dist/scene/look.js +1 -0
- package/dist/scene/painter.js +18 -3
- package/dist/scene/recipes.js +6 -2
- package/dist/scene/rings.js +11 -2
- package/dist/scene/shape.d.ts +50 -0
- package/dist/scene/shape.js +110 -0
- package/dist/shape-basis.d.ts +43 -0
- package/dist/shape-basis.js +45 -0
- package/dist/space/all-moons.d.ts +6 -1
- package/dist/space/all-moons.js +5 -1
- package/dist/space/element.d.ts +28 -3
- package/dist/space/element.js +169 -40
- package/dist/space/orbit-lines.d.ts +66 -0
- package/dist/space/orbit-lines.js +118 -0
- package/dist/space/scale.d.ts +1 -1
- package/dist/space/scale.js +20 -5
- package/dist/space/scene.d.ts +8 -0
- package/dist/space/scene.js +116 -9
- package/dist/stops.js +12 -0
- package/dist/surface/element.js +3 -3
- package/dist/surface/glsl.d.ts +2 -2
- package/dist/surface/glsl.js +15 -3
- package/dist/surface/height.d.ts +7 -0
- package/dist/surface/height.js +10 -0
- package/dist/textures/deimos-1024.webp +0 -0
- package/dist/textures/deimos-512.webp +0 -0
- package/dist/textures/phobos-1024.webp +0 -0
- package/dist/textures/phobos-512.webp +0 -0
- package/dist/textures/phoebe-1024.webp +0 -0
- package/dist/textures/phoebe-512.webp +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The radii of a table in kilometres, `lat + 1` rows of `lon`, the first row at the north pole.
|
|
3
|
+
*
|
|
4
|
+
* @param table - The table.
|
|
5
|
+
* @returns The radii.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { shapeRadii } from "@johnmorrisdotca/wakusei-planets/look";
|
|
10
|
+
*
|
|
11
|
+
* console.log(shapeRadii({ lon: 2, lat: 1, unit: 2, steps: "BAAAAAAAAAAAAAAAAA==" }));
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export function shapeRadii(table) {
|
|
15
|
+
const raw = atob(table.steps);
|
|
16
|
+
const count = table.lon * (table.lat + 1);
|
|
17
|
+
if (raw.length < count * 2)
|
|
18
|
+
throw new RangeError(`a shape table of ${table.lon} by ${table.lat + 1} needs ${count * 2} bytes, not ${raw.length}`);
|
|
19
|
+
const whole = new Int32Array(count);
|
|
20
|
+
const out = new Float32Array(count);
|
|
21
|
+
for (let row = 0; row < table.lat + 1; row += 1) {
|
|
22
|
+
for (let column = 0; column < table.lon; column += 1) {
|
|
23
|
+
const i = row * table.lon + column;
|
|
24
|
+
let step = raw.charCodeAt(i * 2) | (raw.charCodeAt(i * 2 + 1) << 8);
|
|
25
|
+
if (step >= 0x8000)
|
|
26
|
+
step -= 0x10000;
|
|
27
|
+
const above = row > 0 ? whole[i - table.lon] : 0;
|
|
28
|
+
const left = column > 0 ? whole[i - 1] : 0;
|
|
29
|
+
const aboveLeft = row > 0 && column > 0 ? whole[i - table.lon - 1] : 0;
|
|
30
|
+
whole[i] = step + (column === 0 ? above : row === 0 ? left : left + above - aboveLeft);
|
|
31
|
+
out[i] = whole[i] / table.unit;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
// A cubic through four values (Catmull-Rom): the curve passes through the middle two.
|
|
37
|
+
const cubic = (a, b, c, d, t) => b + 0.5 * t * (c - a + t * (2 * a - 5 * b + 4 * c - d + t * (3 * (b - c) + d - a)));
|
|
38
|
+
/**
|
|
39
|
+
* The radius of a table in the direction of a vertex of a finer globe, by a cubic through the table's radii (round in longitude, held at the poles).
|
|
40
|
+
* A table of 96 by 48 on a globe of 192 by 96 gives its own radius at every second vertex and the smooth curve between.
|
|
41
|
+
*/
|
|
42
|
+
function radiusAt(radii, lon, lat, u, v) {
|
|
43
|
+
const x = u * lon;
|
|
44
|
+
const y = v * lat;
|
|
45
|
+
const x0 = Math.floor(x);
|
|
46
|
+
const y0 = Math.floor(y);
|
|
47
|
+
const tx = x - x0;
|
|
48
|
+
const ty = y - y0;
|
|
49
|
+
const rows = [];
|
|
50
|
+
for (let dy = -1; dy <= 2; dy += 1) {
|
|
51
|
+
const row = Math.min(lat, Math.max(0, y0 + dy));
|
|
52
|
+
const at = (dx) => radii[row * lon + ((((x0 + dx) % lon) + lon) % lon)];
|
|
53
|
+
rows.push(cubic(at(-1), at(0), at(1), at(2), tx));
|
|
54
|
+
}
|
|
55
|
+
return cubic(rows[0], rows[1], rows[2], rows[3], ty);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The globe moved to the moon's shape: positions in units of `meanKm` (1 is the moon's mean radius), normals from the moved mesh with the seam and the poles joined. The caller disposes it.
|
|
59
|
+
* The globe has the table's own steps of longitude and of latitude, or `grid`'s where one is given, with the table's radii carried to it by a smooth curve: a finer globe for a big picture, a coarser one for a small picture
|
|
60
|
+
* and for the many moons of a page (a globe of 192 by 96 steps is 0.8 MB of arrays, which three.js keeps in the page after the card has it, and a page can hold a dozen).
|
|
61
|
+
*
|
|
62
|
+
* @param three - The parts of three.js the bodies use.
|
|
63
|
+
* @param table - The moon's table.
|
|
64
|
+
* @param meanKm - The moon's mean radius in kilometres, which the picture takes as 1.
|
|
65
|
+
* @param grid - The steps of longitude and of latitude of the globe, if not the table's.
|
|
66
|
+
* @returns The geometry.
|
|
67
|
+
*/
|
|
68
|
+
export function shapeGeometry(three, table, meanKm, grid) {
|
|
69
|
+
const lon = grid?.lon ?? table.lon;
|
|
70
|
+
const lat = grid?.lat ?? table.lat;
|
|
71
|
+
const geometry = new three.SphereGeometry(1, lon, lat);
|
|
72
|
+
const radii = shapeRadii(table);
|
|
73
|
+
const position = geometry.getAttribute("position");
|
|
74
|
+
const wide = lon + 1;
|
|
75
|
+
for (let row = 0; row <= lat; row += 1) {
|
|
76
|
+
for (let column = 0; column <= lon; column += 1) {
|
|
77
|
+
const i = row * wide + column;
|
|
78
|
+
const r = radiusAt(radii, table.lon, table.lat, (column % lon) / lon, row / lat) / meanKm;
|
|
79
|
+
position.setXYZ(i, position.getX(i) * r, position.getY(i) * r, position.getZ(i) * r);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
geometry.computeVertexNormals();
|
|
83
|
+
const normal = geometry.getAttribute("normal");
|
|
84
|
+
const set = (i, x, y, z) => {
|
|
85
|
+
const length = Math.hypot(x, y, z) || 1;
|
|
86
|
+
normal.setXYZ(i, x / length, y / length, z / length);
|
|
87
|
+
};
|
|
88
|
+
// the seam: the first and the last vertex of a row are one point and take the one normal; a pole is one point, whose vertices take the sum of theirs
|
|
89
|
+
for (let row = 0; row <= lat; row += 1) {
|
|
90
|
+
const a = row * wide;
|
|
91
|
+
const b = a + lon;
|
|
92
|
+
set(a, normal.getX(a) + normal.getX(b), normal.getY(a) + normal.getY(b), normal.getZ(a) + normal.getZ(b));
|
|
93
|
+
normal.setXYZ(b, normal.getX(a), normal.getY(a), normal.getZ(a));
|
|
94
|
+
}
|
|
95
|
+
for (const row of [0, lat]) {
|
|
96
|
+
let x = 0;
|
|
97
|
+
let y = 0;
|
|
98
|
+
let z = 0;
|
|
99
|
+
for (let column = 0; column < lon; column += 1) {
|
|
100
|
+
const i = row * wide + column;
|
|
101
|
+
x += normal.getX(i);
|
|
102
|
+
y += normal.getY(i);
|
|
103
|
+
z += normal.getZ(i);
|
|
104
|
+
}
|
|
105
|
+
for (let column = 0; column <= lon; column += 1)
|
|
106
|
+
set(row * wide + column, x, y, z);
|
|
107
|
+
}
|
|
108
|
+
normal.needsUpdate = true;
|
|
109
|
+
return geometry;
|
|
110
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BodyId } from "./facts.ts";
|
|
2
|
+
/**
|
|
3
|
+
* How a moon's picture is known: `shape-and-map` (its shape model and its surface map are from a spacecraft), or `shape` (its shape model is, and its colour is from its measured brightness, as no map of it exists).
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { shapeBasis, type ShapeBasis } from "@johnmorrisdotca/wakusei-planets";
|
|
8
|
+
*
|
|
9
|
+
* const basis: ShapeBasis | undefined = shapeBasis("nix");
|
|
10
|
+
* console.log(basis);
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export type ShapeBasis = "shape-and-map" | "shape";
|
|
14
|
+
/**
|
|
15
|
+
* How the picture of a body rests on measurement, or `undefined` for a body drawn from its facts alone (a sphere or an ellipsoid).
|
|
16
|
+
*
|
|
17
|
+
* @param id - The body.
|
|
18
|
+
* @returns The basis, or `undefined` for a body drawn from its facts alone.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { shapeBasis } from "@johnmorrisdotca/wakusei-planets";
|
|
23
|
+
*
|
|
24
|
+
* console.log(shapeBasis("phobos"), shapeBasis("mars"));
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function shapeBasis(id: BodyId): ShapeBasis | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The line a card says about how the body is drawn: for a moon drawn with its measured shape, "shape measured; colour from its measured brightness" when it has no map, and "shape and surface measured by spacecraft" when it has one.
|
|
30
|
+
* An empty string for any other body.
|
|
31
|
+
*
|
|
32
|
+
* @param id - The body.
|
|
33
|
+
* @param lang - `en` or `ja`.
|
|
34
|
+
* @returns The line.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* import { shapeNote } from "@johnmorrisdotca/wakusei-planets";
|
|
39
|
+
*
|
|
40
|
+
* console.log(shapeNote("hydra", "en"));
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function shapeNote(id: BodyId, lang: "en" | "ja"): string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const NOTE = {
|
|
2
|
+
shape: { en: "shape measured; colour from its measured brightness", ja: "形は測定したもの。色は測定した明るさから" },
|
|
3
|
+
"shape-and-map": { en: "shape and surface measured by spacecraft", ja: "形も表面も探査機が測定したもの" },
|
|
4
|
+
};
|
|
5
|
+
// The moons drawn with a measured shape (their looks carry `shape`), and whether a mission map is drawn on them too. test/shape.test.ts holds this table to the looks.
|
|
6
|
+
const BASIS = {
|
|
7
|
+
phobos: "shape-and-map", deimos: "shape-and-map", phoebe: "shape-and-map",
|
|
8
|
+
nix: "shape", hydra: "shape", proteus: "shape", larissa: "shape", amalthea: "shape", thebe: "shape", hyperion: "shape", janus: "shape", epimetheus: "shape", prometheus: "shape", pandora: "shape",
|
|
9
|
+
atlas: "shape", pan: "shape", daphnis: "shape", helene: "shape", telesto: "shape", calypso: "shape",
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* How the picture of a body rests on measurement, or `undefined` for a body drawn from its facts alone (a sphere or an ellipsoid).
|
|
13
|
+
*
|
|
14
|
+
* @param id - The body.
|
|
15
|
+
* @returns The basis, or `undefined` for a body drawn from its facts alone.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { shapeBasis } from "@johnmorrisdotca/wakusei-planets";
|
|
20
|
+
*
|
|
21
|
+
* console.log(shapeBasis("phobos"), shapeBasis("mars"));
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export function shapeBasis(id) {
|
|
25
|
+
return BASIS[id];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The line a card says about how the body is drawn: for a moon drawn with its measured shape, "shape measured; colour from its measured brightness" when it has no map, and "shape and surface measured by spacecraft" when it has one.
|
|
29
|
+
* An empty string for any other body.
|
|
30
|
+
*
|
|
31
|
+
* @param id - The body.
|
|
32
|
+
* @param lang - `en` or `ja`.
|
|
33
|
+
* @returns The line.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* import { shapeNote } from "@johnmorrisdotca/wakusei-planets";
|
|
38
|
+
*
|
|
39
|
+
* console.log(shapeNote("hydra", "en"));
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export function shapeNote(id, lang) {
|
|
43
|
+
const basis = shapeBasis(id);
|
|
44
|
+
return basis === undefined ? "" : NOTE[basis][lang];
|
|
45
|
+
}
|
|
@@ -73,11 +73,16 @@ export interface MoonLayerDrawn {
|
|
|
73
73
|
/** The dots and the orbits of the view. */
|
|
74
74
|
export interface MoonLayer {
|
|
75
75
|
update(input: MoonLayerInput): MoonLayerDrawn;
|
|
76
|
-
/** The moons whose orbits a planet's `LineSegments` holds, in order, each with how many segments it has
|
|
76
|
+
/** The moons whose orbits a planet's `LineSegments` holds, in order, each with how many segments it has and its orbit's `#rrggbb`: segment number n of the object belongs to the moon where the running total passes n. For a hover on a line. */
|
|
77
77
|
orbitMoons(host: string): readonly {
|
|
78
78
|
id: string;
|
|
79
79
|
segments: number;
|
|
80
|
+
colour: string;
|
|
80
81
|
}[];
|
|
82
|
+
/** The planet's orbits, in the planet's radii round its centre, moved and scaled with the planet; `undefined` before they are built. For a hover on a line. */
|
|
83
|
+
orbitObject(host: string): THREE.LineSegments | undefined;
|
|
84
|
+
/** The opacity every orbit is drawn at, from `MOON_ORBIT_OPACITY` made fainter as the view crowds and goes out. Nothing is drawn by it. */
|
|
85
|
+
setOrbitOpacity(opacity: number): void;
|
|
81
86
|
dispose(): void;
|
|
82
87
|
}
|
|
83
88
|
/** The most dots drawn: more than every known moon, with room for the years of finds to come. */
|
package/dist/space/all-moons.js
CHANGED
|
@@ -96,7 +96,7 @@ export function createMoonLayer(T, parent) {
|
|
|
96
96
|
entry.geometry.setAttribute("position", new T.BufferAttribute(array, 3));
|
|
97
97
|
entry.geometry.setAttribute("color", new T.BufferAttribute(tint, 3));
|
|
98
98
|
entry.count = rings.length;
|
|
99
|
-
entry.moons = rings.map((ring) => ({ id: ring.moon.id, segments: ring.points.length - 1 }));
|
|
99
|
+
entry.moons = rings.map((ring) => ({ id: ring.moon.id, segments: ring.points.length - 1, colour: ring.moon.colors[input.by] }));
|
|
100
100
|
total += rings.length;
|
|
101
101
|
}
|
|
102
102
|
built = { source: input.source, key: orbitsKey(input), time: input.time };
|
|
@@ -152,6 +152,10 @@ export function createMoonLayer(T, parent) {
|
|
|
152
152
|
return { dots: count, orbits: orbitsDrawn, spots };
|
|
153
153
|
},
|
|
154
154
|
orbitMoons: (host) => lines.get(host)?.moons ?? [],
|
|
155
|
+
orbitObject: (host) => lines.get(host)?.object,
|
|
156
|
+
setOrbitOpacity(opacity) {
|
|
157
|
+
lineMaterial.opacity = opacity;
|
|
158
|
+
},
|
|
155
159
|
dispose() {
|
|
156
160
|
parent.remove(dots);
|
|
157
161
|
for (const entry of lines.values())
|
package/dist/space/element.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ import { SPACE_BODIES, type BodyPlace, type RidePoint, type RideState, type Ride
|
|
|
25
25
|
import { type PaintSpec } from "../paint/trail.ts";
|
|
26
26
|
export type { PaintSpec };
|
|
27
27
|
export { setPlacesLoader } from "../scene/place-layer.ts";
|
|
28
|
-
export { EARTH_PLACE_LOOKS, EARTH_PLACE_MARKS, type EarthPlace, type EarthPlaceKind, type EarthPlaceLook, type EarthPlaceMark } from "../scene/earth-places.ts";
|
|
28
|
+
export { EARTH_PLACE_LOOKS, EARTH_PLACE_MARKS, type EarthPlace, type EarthPlaceClickDetail, type EarthPlaceKind, type EarthPlaceLook, type EarthPlaceMark, type EarthPlaceNamePriority, type EarthPlaceSize } from "../scene/earth-places.ts";
|
|
29
29
|
export type { PlaceOnBody, PlaceOnBodyMark } from "../scene/body-places.ts";
|
|
30
30
|
export { setThreeLoader, SPACE_BODIES, type RidePoint, type RideTarget, type Sight, type SightEdge, type SpaceBody, type SpaceLight };
|
|
31
31
|
/** Where a body is on the screen, in CSS pixels in the element: its centre and its radius. */
|
|
@@ -258,10 +258,29 @@ export declare class WakuseiSpace extends HTMLElement {
|
|
|
258
258
|
/** How the places on the Earth are drawn (the attribute `earth-places-look`): `beam` (the default), `pin` or `ring`. Setting it writes the attribute. */
|
|
259
259
|
get earthPlacesLook(): EarthPlaceLook;
|
|
260
260
|
set earthPlacesLook(look: EarthPlaceLook | null);
|
|
261
|
-
/**
|
|
261
|
+
/**
|
|
262
|
+
* Which layers of places are shown (the attribute `earth-place-layers`, a JSON object of a layer's name to true or false), for `earthPlaces` and `bodyPlaces` alike: a place whose `layer` is named `false` is left out, with its name, and cannot be pressed; any other place,
|
|
263
|
+
* and any layer not named, is shown. The page hands over every place once and switches the layers, instead of building a list for each switch. Setting the property writes the attribute; an empty object takes it away. `earthPlacesShown.hidden` counts the places left out.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```ts no-run
|
|
267
|
+
* import "@johnmorrisdotca/wakusei-planets/earth-places";
|
|
268
|
+
* import type { WakuseiSpace } from "@johnmorrisdotca/wakusei-planets/space/element";
|
|
269
|
+
*
|
|
270
|
+
* const space = document.querySelector<WakuseiSpace>("wakusei-space")!;
|
|
271
|
+
* space.earthPlaceLayers = { harbours: false };
|
|
272
|
+
* space.setEarthPlaceLayer("harbours", true);
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
get earthPlaceLayers(): Record<string, boolean>;
|
|
276
|
+
set earthPlaceLayers(layers: Readonly<Record<string, boolean>> | null);
|
|
277
|
+
/** Show or hide one layer of places and leave the others as they are: `earthPlaceLayers` with that layer changed. */
|
|
278
|
+
setEarthPlaceLayer(name: string, shown: boolean): void;
|
|
279
|
+
/** The markers laid on the Earth now, as the last draw left them: each place's id and kind, where its foot is in CSS pixels from the view's top left and whether its name is drawn; `omitted` counts the places in sight beyond the first `EARTH_PLACE_MARKS`, and `hidden` the places left out because their layer is off. */
|
|
262
280
|
get earthPlacesShown(): {
|
|
263
281
|
marks: readonly EarthPlaceMark[];
|
|
264
282
|
omitted: number;
|
|
283
|
+
hidden: number;
|
|
265
284
|
};
|
|
266
285
|
/**
|
|
267
286
|
* The places laid on the bodies other than the Earth wherever the camera looks, drawn as the Earth's are (`earthPlaces`): a list of `{ body, id, lon, lat, label, kind, color }`, `body` being `moon`, `mars`, `ceres` and so on (an entry for `earth` is not drawn:
|
|
@@ -281,10 +300,11 @@ export declare class WakuseiSpace extends HTMLElement {
|
|
|
281
300
|
*/
|
|
282
301
|
get bodyPlaces(): PlaceOnBody[];
|
|
283
302
|
set bodyPlaces(list: readonly PlaceOnBody[] | null);
|
|
284
|
-
/** The markers laid on the other bodies now, as the last draw left them: each place's body, id and kind, where its foot is in CSS pixels from the view's top left and whether its name is drawn; `omitted` counts the places in sight beyond the first `EARTH_PLACE_MARKS
|
|
303
|
+
/** The markers laid on the other bodies now, as the last draw left them: each place's body, id and kind, where its foot is in CSS pixels from the view's top left and whether its name is drawn; `omitted` counts the places in sight beyond the first `EARTH_PLACE_MARKS`, and `hidden` the places left out because their layer is off. */
|
|
285
304
|
get bodyPlacesShown(): {
|
|
286
305
|
marks: readonly PlaceOnBodyMark[];
|
|
287
306
|
omitted: number;
|
|
307
|
+
hidden: number;
|
|
288
308
|
};
|
|
289
309
|
/**
|
|
290
310
|
* Go to a place on a body: the view glides to the body (as `goTo` does), or on the body looked at turns round it, and the camera comes to rest straight above the place. The place is an id (`mars/perseverance`) or an English or Japanese name, on the body looked at
|
|
@@ -863,6 +883,11 @@ export declare class WakuseiSpace extends HTMLElement {
|
|
|
863
883
|
miss: Record<string, number>;
|
|
864
884
|
hidden: string[];
|
|
865
885
|
faded: string[];
|
|
886
|
+
fade: {
|
|
887
|
+
crowd: number;
|
|
888
|
+
outness: number;
|
|
889
|
+
opacity: number;
|
|
890
|
+
};
|
|
866
891
|
};
|
|
867
892
|
/** The arrowheads on the orbit lines at the last draw, by line (`earth`, the planets, `moon`): where each is and the way it points, the way the body goes (not the way the clock runs). */
|
|
868
893
|
arrows: Record<string, {
|