Reference · Facts, line drawings and positions
starLookfunction
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 it
import { starLook } from "@johnmorrisdotca/wakusei-planets";
Definition
function starLook(numbers: StarNumbers, options?: StarLookOptions): StarLook
Parameters
| Name | Type | Description |
|---|---|---|
numbers | StarNumbers | The star's numbers. |
options (optional) | StarLookOptions |
|
Returns
StarLook
The star ready to draw.
Examples
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 3What it prints (run when this page was built)