本文へ移動

Chikyu Earth地球

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

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

目次

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

rideTurnDegrees関数

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

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

定義

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

引数

名前型説明
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.

戻り値

number

The turn, in degrees.

例

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

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

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

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

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