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
引数
| 名前 | 型 | 説明 |
|---|---|---|
numbers | StarNumbers | The star's numbers. |
options (省略可) | StarLookOptions |
|
戻り値
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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。