本文へ移動

Chikyu Earth地球

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

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

目次

リファレンス · リアルな地球の計算部分

cameraCentre関数

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

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 { cameraCentre } from "@johnmorrisdotca/chikyu-earth/realistic";

定義

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

引数

名前型説明
modelPick<EarthModel, "time" | "centre" | "camera" | "cameraSpin">

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

戻り値

GeoPoint

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

例

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

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

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

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