Reference
Stars: names, positions, distance and colour
import { … } from "@johnmorrisdotca/hoshi-stars";
Exports
| Name | Kind | What it is |
|---|---|---|
blackBodyColour | function | The colour of a black body at a temperature, as a #rrggbb string, for drawing a star. |
Star | type | One star, as the Yale Bright Star Catalogue gives it. |
starByHr | function | A star by its Bright Star Catalogue number. |
starByName | function | A star by its common name (Sirius), its name in katakana (シリウス) or its designation (α CMa, 9 CMa), ignoring case. |
starColour | function | The colour to draw a star: from its B-V index, or a plain white where the catalogue has none. |
starDistanceLightYears | function | A star's distance from its parallax, in light-years. |
starPosition | function | Where a star is at a moment: its J2000 position carried forward (or back) by its proper motion in a straight line. |
stars | function | The stars to a magnitude, brightest first. |
starTemperatureK | function | The surface temperature a colour index implies, in kelvin, by Ballesteros's relation between B-V and a black body. |
When | type | A moment: a Date or a number of milliseconds since 1970 (UTC, as JavaScript counts). |