Reference
A star drawn from its numbers as SVG, and next to the Sun
import { … } from "@johnmorrisdotca/hoshi-stars/portrait";
3.6 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
portraitLook | function | The look a profile is drawn with, or undefined where it has no temperature to draw. |
PortraitLook | type | The look a star is drawn with: "supergiant" has a few huge convection cells, "giant" a dozen large ones, "sun-like" fine granulation, "red-dwarf" finer cells in a deeper red, "hot" a smooth disc (hot stars carry their energy by radiation and show no granulation we know of), and "fast-rotator" a smooth, flattened and gravity-darkened disc, drawn only for the stars with a measured shape. |
PortraitOptions | type | How a portrait or a comparison is drawn. |
starComparison | function | The star beside the Sun at one scale, as SVG text. |
starPortrait | function | A star drawn from its numbers as SVG text: a disc in the colour of its temperature, darker toward the edge by its limb-darkening coefficient, with a generic surface texture of the right kind of cells for its type, and, for Altair and Regulus, the flattened and gravity-darkened shape that interferometers measured, and for Vega the round face of a star seen over its pole. |