kidsSvgfunction
One sheet as an SVG string measured in millimetres: the picture of the body, the colours to colour it with and three facts, in English or Japanese; or the lineup of all the planets at one scale. widthMm and
heightMm are the room it is drawn for (kidsRoom), and the viewBox is that room, so a millimetre is a millimetre on paper.
Import it
import { kidsSvg } from "@johnmorrisdotca/wakusei-planets/sheets";
Definition
function kidsSvg(id: KidsSheet, options: { widthMm: number; heightMm: number; lang?: Lang; }): string
Parameters
| Name | Type | Description |
|---|---|---|
id | "sun" | "mercury" | "venus" | "earth" | "mars" | "jupiter" | "saturn" | "uranus" | "neptune" | "pluto" | "moon" | "io" | "europa" | "ganymede" | "callisto" | "titan" | "triton" | "charon" | "lineup" | A body with a sheet, or |
options | { widthMm: number; heightMm: number; lang?: Lang; } | The room, and the language. |
Returns
string
The <svg> markup.
Examples
import { kidsRoom, kidsSvg } from "@johnmorrisdotca/wakusei-planets/sheets";
const room = kidsRoom("a4");
console.log(kidsSvg("saturn", { ...room, lang: "en" }).includes("Colour me!"));trueWhat it prints (run when this page was built)