本文へ移動

Chikyu Earth地球

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

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

目次

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

aboveModelShare関数

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

The share of the view's height that a model's radius takes when the camera is distanceKm above the satellite (a ride above it). A satellite is a few metres across, so the model is drawn larger than it is, but a model that stays a share of the picture at any height becomes a block thousands of kilometres across from far up. So the model keeps a fixed size in the world, about 16 km in radius, which is the share ABOVE_MODEL_SHARE at ABOVE_MODEL_KM: it is never larger than that, falls as one over the height above it, and from MODEL_FADE_FROM_KM is let down smoothly (a smooth step) to nothing at MODEL_FADE_TO_KM, where the satellite is its ordinary mark. Pure, so a test can ask it at any height.

インポート

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

定義

function aboveModelShare(distanceKm: number, lowest?: number): number

引数

名前型説明
distanceKmnumber

The camera's distance from the satellite, in kilometres.

lowest (省略可)number

The share at the lowest height, ABOVE_MODEL_SHARE by default (a page sets it with ride-model-share).

戻り値

number

The share, from 0 to 0.17.

例

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

console.log(aboveModelShare(150), aboveModelShare(1000) < aboveModelShare(150), aboveModelShare(6000));
0.17 true 0

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

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

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