starWheelPosterfunction
A wheel to cut out of a big poster: the disc and the plate side by side, as one SVG string measured in millimetres, diameterMm across each. Give it to kazoku-ui's tilePoster to cut it over several pages.
Import it
import { starWheelPoster } from "@johnmorrisdotca/hoshi-stars/sheets";
Definition
function starWheelPoster(latitude: number, options?: { diameterMm?: number; lang?: Lang; type?: "kid" | "normal"; }): { svg: string; widthMm: number; heightMm: number; }
Parameters
| Name | Type | Description |
|---|---|---|
latitude | number | Degrees north (negative south). |
options (optional) | { diameterMm?: number; lang?: Lang; type?: "kid" | "normal"; } |
|
Returns
{ svg: string; widthMm: number; heightMm: number; }
The <svg> markup and its size.
Examples
import { starWheelPoster } from "@johnmorrisdotca/hoshi-stars/sheets";
const poster = starWheelPoster(50, { diameterMm: 400 });
console.log(poster.widthMm, poster.heightMm, poster.svg.includes('data-cut="plate"'));810 406 trueWhat it prints (run when this page was built)