本文へ移動

Wakusei Planets惑星

太陽・惑星・衛星を、線画、陰影つきの絵、表面の地図で描きます。実際の大きさ・傾き・自転つきで、任意の日時の衛星の位置も分かります。

「惑星」(わくせい) は、太陽のまわりを回る大きな星のことです。 名前について(英語)

目次

リファレンス · <wakusei-space> 要素 (地球・月・太陽・惑星をその位置に)

Riding型

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

What the camera is riding along with now: the target, the body it goes round, how (from or follow), where it looks, and the distance kept for a point.

インポート

import type { Riding } from "@johnmorrisdotca/wakusei-planets/space/element";

定義

type Riding = RideState;

メンバー

名前型説明
targetRideTarget
around"sun" | "mercury" | "venus" | "earth" | "mars" | "jupiter" | "saturn" | "uranus" | "neptune" | "pluto" | "moon"

The body the target goes round: the Earth for a body of the view or a point (unless said), the planet for a moon.

view"from" | "follow"

from: the camera is at the target, looking at the body it goes round. follow: the camera keeps a distance from it, looking at it.

lookRideLook
distanceKmnumber

For follow a point: how far the camera keeps, in kilometres.

例

import type { Riding } from "@johnmorrisdotca/wakusei-planets/space/element";

const describe = (ride: Riding | null): string => (ride ? `${ride.view} ${typeof ride.target === "string" ? ride.target : "a point"}` : "not riding");
console.log(typeof describe);

ソースを見るGitHub で編集@johnmorrisdotca/wakusei-planets 0.24.0 のソースから作成しました。

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