Reference · Facts, line drawings and positions
starLineSvgfunction
A star as a line drawing, as an SVG string: its outline (squeezed when it is oblate), its cells and spots as outlines, a ring of rays, and, drawn round it, the Sun's size and the orbits of the Earth and Jupiter
wherever they fall in the picture, so the size can be read against what we know. A caption under it gives the radius, the temperature and the class. It takes the options of lineSvg (the size, pose, fill, zoom,
pan, lang and the colours); a picture of a star with no pose is a portrait of the Sun's axis.
Import it
import { starLineSvg } from "@johnmorrisdotca/wakusei-planets";
Definition
function starLineSvg(star: StarNumbers | StarLook, options?: LineOptions): string
Parameters
| Name | Type | Description |
|---|---|---|
star | StarLook | StarNumbers | The star's numbers, or a star already made with |
options (optional) | LineOptions | The drawing's size, pose and colours. |
Returns
string
The SVG markup, <svg ...> to </svg>.
Examples
import { starLineSvg } from "@johnmorrisdotca/wakusei-planets";
const svg = starLineSvg({ name: "Betelgeuse", temperatureK: 3600, radiusSun: 760, luminosityClass: "Ia" }, { size: 320 });
console.log(svg.startsWith("<svg"), svg.includes("Earth's orbit"));true trueWhat it prints (run when this page was built)