dotsSvgfunction
One page of a connect-the-dots sheet as an SVG string measured in millimetres: the dots (and the numbers, unless the level is hard), the words that say what to do, and on an answer page the lines too, 1 mm thick for the kid type (0.4 mm for normal).
Import it
import { dotsSvg } from "@johnmorrisdotca/hoshi-stars/sheets";
Definition
function dotsSvg(text: string, options: { level?: DotLevel; widthMm: number; heightMm: number; lang?: Lang; answer?: boolean; type?: "kid" | "normal"; }): string
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The constellation. |
options | { level?: DotLevel; widthMm: number; heightMm: number; lang?: Lang; answer?: boolean; type?: "kid" | "normal"; } |
|
Returns
string
The <svg> markup.
Examples
import { dotsSvg } from "@johnmorrisdotca/hoshi-stars/sheets";
const page = dotsSvg("Cas", { level: "easy", widthMm: 184.6, heightMm: 190, lang: "en" });
console.log(page.includes("Join the dots from 1 to"), page.includes("<circle"));true trueWhat it prints (run when this page was built)