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

rideTurnDegreesfunction

How many degrees the camera turns for a change of the controls' yaw at a zoom. The controls wrap their yaw into -180 to 180, so a page adds up the turns itself, change by change (wrapYaw of the change, scaled by this at the zoom of the moment), and hands the total to ridePose as turn: a drag the whole way round is then a turn the whole way round, and the pace follows the field of view at any zoom.

Import it

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

Definition

function rideTurnDegrees(change: number, zoom: number): number

Parameters

NameTypeDescription
changenumber

The change of yaw, in degrees, between two views of the controls (already brought into -180 to 180).

zoomnumber

The shared controls' zoom at the moment.

Returns

number

The turn, in degrees.

Examples

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

console.log(rideTurnDegrees(180, 1), rideTurnDegrees(180, 6));
90 15

What it prints (run when this page was built)

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