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 globe as an SVG string

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

Exports

NameKindWhat it is
centreRotationfunctionThe rotation that puts centre in the middle of the disc: d3-geo's rotate is the negative of the point.
cleanStylefunctionA value from outside (an attribute, a query parameter) as a style's name: the default for anything else.
COUNTRIESconstantEvery country the globe draws, as GeoJSON in longitude and latitude (177 features, Antarctica included), each with its English name, its Japanese name and its two-letter code.
countryListfunctionEvery country the globe draws, with its kuni name and code.
CountryPropstypeWhat one country's outline carries: its English and Japanese name and its ISO alpha-2 code, all from kuni.
DEFAULT_STYLEconstantThe style a drawing is in when none is named.
DEGREES_PER_MSconstantHow far the Earth turns in one millisecond, in degrees.
GeoPointtypeA point on the globe, in degrees: lon from -180 to 180 (east is positive), lat from -90 to 90 (north is positive).
globefunctionThe globe as an SVG string, turned to rotation and drawn in style, size pixels square.
globeBaseScalefunctionThe radius of an unzoomed globe in a square of size pixels.
GlobeOptionstypeWhat globe() may be asked.
GlobeViewtypeWhat a shared view controller tells the globe: its turn (yaw, degrees), tip (tilt, degrees), zoom (1 is Fit) and pan (panX and panY, CSS pixels).
HOME_VIEWconstantThe view when it opens: the home centre, upright, at 1x with no pan.
projectionViewfunctionWhat the projection is given for a view: yaw turns longitude, tilt tips latitude, zoom scales and pan moves the disc in CSS pixels.
ProjectionViewtypeWhat d3-geo's orthographic projection is given for a view: its rotation, scale and translation.
RotationtypeHow the globe is turned: [lambda, phi] in degrees, the pair d3-geo's rotate takes.
rotationAtfunctionThe rotation at now for a globe that was centred on centre at start.
SIDEREAL_DAY_MSconstantOne sidereal day — the Earth's turn against the stars, 23 h 56 min 4.0905 s — in milliseconds.
spinAtfunctionHow far the Earth has turned after ms milliseconds, in degrees.
StyletypeThe lines and fills of one look: colours and widths only, never the geometry.
STYLE_NAMESconstantEvery style's name, in the order they are listed.
StyleNametypeThe name of a look: "line" or "thick".
STYLESconstantThe looks the globe is drawn in, by name: line (thin outlines) and thick.

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