本文へ移動

Chikyu Earth地球

世界の国の輪郭を線で描いた地球儀です。地球と同じ速さで回ります。宇宙から見たような地球と、好きな場所の目印も使えます。

「地球」(ちきゅう) は、私たちが住む星の名前です。 名前について(英語)

目次

リファレンス · SVG文字列としての地球儀

rotationAt関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The rotation at now for a globe that was centred on centre at start. The tilt stays; the spin advances at the Earth's own rate, so the disc turns as the real Earth does and the centred place drifts with it.

インポート

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

定義

function rotationAt(centre: GeoPoint, now: number, start: number): Rotation

引数

名前型説明
centreGeoPoint

The place the globe was centred on at start.

nownumber

The time to draw for, in milliseconds.

startnumber

The time the globe was centred, in the same milliseconds as now.

戻り値

Rotation

The [lambda, phi] rotation at now.

例

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

const tokyo = { lon: 139.7, lat: 35.7 };
console.log(rotationAt(tokyo, SIDEREAL_DAY_MS / 2, 0));
[ 40.30000000000001, -35.7 ]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/chikyu-earth 0.11.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。