本文へ移動

Chikyu Earth地球

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

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

目次

リファレンス · 太陽、月、惑星: 計算部分

rideTiltLimits関数

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

The range of the controls' tilt that does something in the horizon look: from straight down to a little above the horizon. A tilt beyond it moves nothing, so a page holds the tilt to it, and a drag back starts moving at once instead of after the excess is dragged back. It depends on the height (the horizon is further from straight down the higher the camera is) and the zoom. The down look has no such range.

インポート

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

定義

function rideTiltLimits(distance: number, look: RideLook, zoom: number): { min: number; max: number; } | null

引数

名前型説明
distancenumber

The camera's distance from the Earth's centre, in Earth radii.

lookRideLook

The look.

zoomnumber

The shared controls' zoom.

戻り値

{ min: number; max: number; } | null

The lowest and highest tilt, or null for the down look.

例

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

const range = rideTiltLimits(1.066, "horizon", 1);
console.log(range && `${range.min.toFixed(0)} to ${range.max.toFixed(0)}`, rideTiltLimits(1.066, "down", 1));
-35 to 38 null

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

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

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