本文へ移動

Wakusei Planets惑星

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

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

目次

リファレンス · データ・線画・位置

lineupBodies関数

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

What the line-up draws for some choices, smallest first: the stars of a set (or the ids of your own list) and, with planets, the Earth and Jupiter. The radius of a planet is its equatorial radius from the package's facts. An id that is not in the table throws a RangeError.

インポート

import { lineupBodies } from "@johnmorrisdotca/wakusei-planets";

定義

function lineupBodies(options?: { set?: LineupSet | readonly string[]; planets?: boolean; }): LineupBody[]

引数

名前型説明
options (省略可){ set?: LineupSet | readonly string[]; planets?: boolean; }

set (all by default, or a list of ids from LINEUP_STARS) and planets (add the Earth and Jupiter).

戻り値

LineupBody[]

The bodies, ordered by radius.

例

import { lineupBodies } from "@johnmorrisdotca/wakusei-planets";

console.log(lineupBodies({ set: "bright", planets: true }).map((body) => body.id).join(", "));
earth, jupiter, sun, sirius-a, vega, arcturus, aldebaran, rigel, antares, betelgeuse

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

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

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