starWheelDiscfunction
The star disc of a wheel for a latitude as an SVG string measured in millimetres: the stars to magnitude 3.5 (kid) or 5 (normal), the figures, the equator and the ecliptic dashed, the names of the best known constellations and the ring of dates.
Import it
import { starWheelDisc } from "@johnmorrisdotca/hoshi-stars/sheets";
Definition
function starWheelDisc(latitude: number, options: { widthMm: number; heightMm: number; lang?: Lang; type?: "kid" | "normal"; }): string
Parameters
| Name | Type | Description |
|---|---|---|
latitude | number | Degrees north of the equator (negative south); a wheel is made for 20 to 70 degrees, and a latitude outside is moved to the nearest. |
options | { widthMm: number; heightMm: number; lang?: Lang; type?: "kid" | "normal"; } |
|
Returns
string
The <svg> markup.
Examples
import { starWheelDisc } from "@johnmorrisdotca/hoshi-stars/sheets";
const disc = starWheelDisc(45, { widthMm: 184.6, heightMm: 200, lang: "en" });
console.log(disc.includes('data-cut="disc"'), disc.includes('data-month="12"'));true trueWhat it prints (run when this page was built)