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 Sun, Moon and planets: pure parts

placeMoonfunction

The Moon, from the Earth's centre.

Import it

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

Definition

function placeMoon(mode: ScaleMode, geo: Vec3): Vec3

Parameters

NameTypeDescription
modeScaleMode

The scale.

geoVec3

The Moon's place in astronomical units from the Earth's centre.

Returns

Vec3

Where to draw it, in Earth radii.

Examples

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

console.log(placeMoon("true", [0.00257, 0, 0]).map(Math.round));
[ 60, 0, 0 ]

What it prints (run when this page was built)

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