lineSvg関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A body as a line drawing, as an SVG string: the outline (squeezed by its flattening and leaning at its axial tilt), bands and features, rings with their gaps, and the dark side
dashed off. Give it a time to draw the body as the Earth sees it then; leave it out for a portrait. moons: true draws a planet with its moons on their orbits.
インポート
import { lineSvg } from "@johnmorrisdotca/wakusei-planets";
定義
function lineSvg(id: BodyId, options?: LineOptions): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | BodyId | The body's name: |
options (省略可) | LineOptions | The size, the pose ( |
戻り値
string
The SVG markup, <svg ...> to </svg>.
例
import { lineSvg } from "@johnmorrisdotca/wakusei-planets";
const svg = lineSvg("saturn", { size: 320 });
console.log(svg.startsWith("<svg"), svg.includes("Saturn"));true true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。