本文へ移動

Wakusei Planets惑星

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

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

目次

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

RideOptions型

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

How a ride along is done: view from (the default) puts the camera at the target looking at the body it goes round, follow keeps it a distance from the target looking at it (distanceKm, 3000 by default, for a point of your own; a body or a moon is kept at the distance the zoom says); look down (the default) or horizon is where a camera at the target points; around is the body a point of your own goes round (the Earth by default); smooth (the default) glides from the old camera to the new one in about a second and a bit, and jumps instead for a reader who asked for reduced motion.

インポート

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

定義

interface RideOptions {
    view?: "from" | "follow";
    look?: RideLook;
    distanceKm?: number;
    around?: SpaceBody;
    smooth?: boolean;
}

メンバー

名前型説明
view (省略可)"from" | "follow" | undefined
look (省略可)RideLook | undefined
distanceKm (省略可)number | undefined
around (省略可)"sun" | "mercury" | "venus" | "earth" | "mars" | "jupiter" | "saturn" | "uranus" | "neptune" | "pluto" | "moon" | undefined
smooth (省略可)boolean | undefined

例

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

const options: RideOptions = { view: "from", look: "horizon", around: "mars" };
console.log(options.look);

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

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