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 realistic Earth's pure parts

cameraCentrefunction

The place the camera looks at for a moment: the home centre as it is (ground), the home centre as it was when the camera was set, carried west by the Earth's turn since (space), or the home centre read from the Sun's own place (sun: 0,0 is straight at noon). It sets cameraSpin when the space camera has none yet. Pure apart from that.

Import it

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

Definition

function cameraCentre(model: Pick<EarthModel, "centre" | "camera" | "cameraSpin" | "time">): GeoPoint

Parameters

NameTypeDescription
modelPick<EarthModel, "time" | "centre" | "camera" | "cameraSpin">

The model: its centre, camera, camera spin and the moment shown.

Returns

GeoPoint

The longitude and latitude the view is turned from (yaw and tilt are added to it by lookAt).

Examples

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

const start = Date.UTC(2026, 10, 2, 12);
const model = { centre: { lon: 10, lat: 30 }, camera: "space" as const, cameraSpin: null, time: start };
cameraCentre(model);
model.time = start + 6 * 3_600_000;
console.log(cameraCentre(model).lon.toFixed(1));
-80.2

What it prints (run when this page was built)

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