本文へ移動

Wakusei Planets惑星

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

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

目次

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

starLook関数

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

Everything the package draws a star with, from the numbers alone: the same numbers always give the same star. Throws a RangeError that names the number when one is out of range.

The colour is the black body of temperatureK. The surface is grained by the luminosity class (and faint on hot stars, smooth on a white dwarf), spotted by activity (none on hot stars by default, many on cool dwarfs), darker toward the edge by the temperature, flattened by oblateness with hotter poles, and ringed with a soft corona. The cells and the spots are invented; parts says which parts are not.

インポート

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

定義

function starLook(numbers: StarNumbers, options?: StarLookOptions): StarLook

引数

名前型説明
numbersStarNumbers

The star's numbers.

options (省略可)StarLookOptions

quality: "low" for a cheaper drawing for weak devices (no boiling granulation, no prominences or flares); the default is full.

戻り値

StarLook

The star ready to draw.

例

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

const rigel = starLook({ name: "Rigel", temperatureK: 12100, radiusSun: 78.9, luminosityClass: "Ia", rotationDays: 25 });
console.log(rigel.colour, rigel.activity, rigel.parts.filter((part) => part.status === "illustrative").length);
#bfd3ff 0 3

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

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

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