starLineSvg関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A star as a line drawing, as an SVG string: its outline (squeezed when it is oblate), its cells and spots as outlines, a ring of rays, and, drawn round it, the Sun's size and the orbits of the Earth and Jupiter
wherever they fall in the picture, so the size can be read against what we know. A caption under it gives the radius, the temperature and the class. It takes the options of lineSvg (the size, pose, fill, zoom,
pan, lang and the colours); a picture of a star with no pose is a portrait of the Sun's axis.
インポート
import { starLineSvg } from "@johnmorrisdotca/wakusei-planets";
定義
function starLineSvg(star: StarNumbers | StarLook, options?: LineOptions): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
star | StarLook | StarNumbers | The star's numbers, or a star already made with |
options (省略可) | LineOptions | The drawing's size, pose and colours. |
戻り値
string
The SVG markup, <svg ...> to </svg>.
例
import { starLineSvg } from "@johnmorrisdotca/wakusei-planets";
const svg = starLineSvg({ name: "Betelgeuse", temperatureK: 3600, radiusSun: 760, luminosityClass: "Ia" }, { size: 320 });
console.log(svg.startsWith("<svg"), svg.includes("Earth's orbit"));true true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。