リファレンス · 子ども向けのぬりえ: 太陽・惑星・大きな衛星を太い線の絵にして、本当の色と3つのことがらをつけます。すべての惑星を同じ縮尺で一列にならべた絵も。英語と日本語
colouringArt関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A body as a colouring picture: thick black outlines on white (the outline 3 mm, every line inside 2.5 mm), its big features, its rings, and the Sun's rays. The picture is drawn at its centre (cx, cy) with r
millimetres for the body's radius. outline is the outline's thickness; the lines inside are 2.5 mm or, for a thinner outline, a little less.
インポート
import { colouringArt } from "@johnmorrisdotca/wakusei-planets/sheets";
定義
function colouringArt(id: BodyId, cx: number, cy: number, r: number, outline?: number): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | BodyId | The body's name. |
cx | number | The centre's place, in millimetres. |
cy | number | The centre's place, in millimetres. |
r | number | The body's radius, in millimetres. |
outline (省略可) | number | The outline's thickness in millimetres. Default 3. |
戻り値
string
The SVG markup of the body, to put inside an <svg> measured in millimetres.
例
import { colouringArt } from "@johnmorrisdotca/wakusei-planets/sheets";
console.log(colouringArt("mars", 50, 50, 40).startsWith("<g"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。