本文へ移動

Chikyu Earth地球

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

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

目次

リファレンス · <chikyu-space> 要素

SpacePreset型

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

A named distance for zoomFor: the Earth, the Moon, the Sun, the inner planets, the whole solar system, or a planet with its nearer moons (Jupiter-moons: the zoom that shows them, when a body painter that draws moons is set).

インポート

import type { SpacePreset } from "@johnmorrisdotca/chikyu-earth/space/element";

定義

type SpacePreset = "earth" | "moon" | "sun" | "inner" | "solar-system" | `${Exclude<PlanetName, "Mercury" | "Venus">}-moons`;

例

import type { ChikyuSpace, SpacePreset } from "@johnmorrisdotca/chikyu-earth/space/element";

const zoomTo = (space: ChikyuSpace, preset: SpacePreset): number => space.zoomFor(preset);
console.log(typeof zoomTo);

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

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