Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference

The <chikyu-space> element

import { … } from "@johnmorrisdotca/chikyu-earth/space/element";

Exports

NameKindWhat it is
BODY_NAMESconstantThe eleven bodies the space view places, names and lets a reader choose: the Earth, the Sun, the Moon, the seven other planets and Pluto.
BodyInfotypeWhat a page can tell a reader about a body now.
BodyNametypeThe name of one of the bodies in BODY_NAMES.
ChikyuSpaceclassThe <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.
RideOptionstypeHow 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.
RideTargettypeWhat a camera can ride along with: the name of one of the bodies, or a satellite of a group ({ group, index }).
RidingtypeWhat 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.
setBodyPainterfunctionChange 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).
setThreeLoaderfunctionWhere three.js comes from, if a page wants to hand it over itself (before the first element connects).
SpacePresettypeA 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).
SpaceStatetypeWhat 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).

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.11.0.