Reference
/space/no-cultures
import { … } from "@johnmorrisdotca/chikyu-earth/space/no-cultures";
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. |
CameraMode | type | The camera at the centre of the Earth's view: ground is held over a place on the ground (the Earth keeps still, the clock moves the light), space is held in the stars at the direction the place was in when it was set (the Earth turns beneath it), sun is held on the Sun's side (the day and night line keeps its place while the Earth turns). |
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); 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 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; face opens looking one way (see face); 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, follow or above), where it looks, the facing it looks round from (null when none was chosen), 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). |
setSatellitePainter | function | Where the 3D models of large satellites come from if the page has any: the package ships none. |
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). |