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

spinAtfunction

How far the Earth has turned after ms milliseconds, in degrees.

Import it

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

Definition

function spinAt(ms: number): number

Parameters

NameTypeDescription
msnumber

A time span in milliseconds.

Returns

number

The turn in degrees; a whole SIDEREAL_DAY_MS is 360.

Examples

import { SIDEREAL_DAY_MS, spinAt } from "@johnmorrisdotca/chikyu-earth";

console.log(spinAt(SIDEREAL_DAY_MS / 4));
90

What it prints (run when this page was built)

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