Reference · A picture of each of the 88 constellations, in light and dark
constellationThumbnailfunction
The picture of one IAU constellation: its boundary (dashed, with a faint wash), its stick figure, its bright stars, and the neighbouring constellations' boundaries and stars faint round it. Every
constellation fills a square the same way, so the 88 make a tidy grid. thumbnailSvg is the same drawing for any other figure.
Import it
import { constellationThumbnail } from "@johnmorrisdotca/hoshi-stars/thumbnails";
Definition
function constellationThumbnail(text: string, options?: ThumbnailOptions): string
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The constellation, as the IAU abbreviation ( |
options (optional) | ThumbnailOptions | The look, the size and whether the neighbours are drawn. |
Returns
string
A standalone SVG document as a string.
Examples
import { constellationThumbnail } from "@johnmorrisdotca/hoshi-stars/thumbnails";
const dark = constellationThumbnail("Orion");
const light = constellationThumbnail("Ori", { theme: "light", size: 160 });
console.log(dark.length, light.includes('role="img"'));22937 trueWhat it prints (run when this page was built)