LineupEmbed型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The size line-up to put in a page: which stars, the planets, how they stand, where the camera starts, and how wide it is.
インポート
import type { LineupEmbed } from "@johnmorrisdotca/wakusei-planets";
定義
interface LineupEmbed {
stars?: LineupSet | readonly string[];
planets?: boolean;
layout?: LineupLayout;
at?: string;
zoom?: number;
turn?: boolean;
look?: "realistic" | "painted";
lang?: "en" | "ja";
width?: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
stars (省略可) | readonly string[] | "all" | "bright" | "largest" | undefined |
|
planets (省略可) | boolean | undefined | Add the Earth and Jupiter. |
layout (省略可) | "row" | "stack" | undefined |
|
at (省略可) | string | undefined | The id of the body the camera starts on; the Sun when left out. |
zoom (省略可) | number | undefined | Where the camera starts, 0 to 1 (over |
turn (省略可) | boolean | undefined | False stops the bodies turning by themselves. |
look (省略可) | "realistic" | "painted" | undefined | The planets' look: |
lang (省略可) | "en" | "ja" | undefined | The words: |
width (省略可) | number | undefined | Pixels across; default 720. |
例
import { lineupCode, type LineupEmbed } from "@johnmorrisdotca/wakusei-planets";
const options: LineupEmbed = { stars: "bright", planets: true, at: "betelgeuse", width: 720 };
console.log(lineupCode(options, "html"));<script type="module" src="https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.29.0/lineup/+esm"></script>
<wakusei-lineup stars="bright" planets at="betelgeuse"></wakusei-lineup>出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。