リファレンス · 子ども向けのぬりえ: 太陽・惑星・大きな衛星を太い線の絵にして、本当の色と3つのことがらをつけます。すべての惑星を同じ縮尺で一列にならべた絵も。英語と日本語
kidsSvg関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { kidsSvg } from "@johnmorrisdotca/wakusei-planets/sheets";
定義
function kidsSvg(id: KidsSheet, options: { widthMm: number; heightMm: number; lang?: Lang; }): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
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. |
戻り値
string
The <svg> markup.
例
import { kidsRoom, kidsSvg } from "@johnmorrisdotca/wakusei-planets/sheets";
const room = kidsRoom("a4");
console.log(kidsSvg("saturn", { ...room, lang: "en" }).includes("Colour me!"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。