Reference
The <chikyu-space> element
import { … } from "@johnmorrisdotca/chikyu-earth/space/element";
Exports
| Name | Kind | What it is |
|---|---|---|
BODY_NAMES | constant | The eleven bodies the space view places, names and lets a reader choose: the Earth, the Sun, the Moon, the seven other planets and Pluto. |
BodyInfo | type | What a page can tell a reader about a body now. |
BodyName | type | The name of one of the bodies in BODY_NAMES. |
ChikyuSpace | class | 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. |
RideOptions | type | 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, 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 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. |
RideTarget | type | What a camera can ride along with: the name of one of the bodies, or a satellite of a group ({ group, index }). |
Riding | type | What the camera is riding along with now: the body or satellite, how (from or follow), where it looks, and the distance kept for a satellite. |
setBodyPainter | function | Change how the Sun and the planets are drawn (before the first element connects): the space view keeps their places, sizes, light, names and orbits and asks the painter only for what to draw at each place (see BodyPainter). |
setThreeLoader | function | Where three.js comes from, if a page wants to hand it over itself (before the first element connects). |
SpacePreset | type | 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). |
SpaceState | type | What the space view is doing: loading, live, unavailable (no WebGL), lost (the GPU took the context; it comes back by itself) or idle (another view has the page's one context). |