Reference · Facts, line drawings and positions
LineupEmbedtype
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 it
import type { LineupEmbed } from "@johnmorrisdotca/wakusei-planets";
Definition
interface LineupEmbed {
stars?: LineupSet | readonly string[];
planets?: boolean;
layout?: LineupLayout;
at?: string;
zoom?: number;
turn?: boolean;
look?: "realistic" | "painted";
lang?: "en" | "ja";
width?: number;
}
Members
| Name | Type | Description |
|---|---|---|
stars (optional) | readonly string[] | "all" | "bright" | "largest" | undefined |
|
planets (optional) | boolean | undefined | Add the Earth and Jupiter. |
layout (optional) | "row" | "stack" | undefined |
|
at (optional) | string | undefined | The id of the body the camera starts on; the Sun when left out. |
zoom (optional) | number | undefined | Where the camera starts, 0 to 1 (over |
turn (optional) | boolean | undefined | False stops the bodies turning by themselves. |
look (optional) | "realistic" | "painted" | undefined | The planets' look: |
lang (optional) | "en" | "ja" | undefined | The words: |
width (optional) | number | undefined | Pixels across; default 720. |
Examples
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>What it prints (run when this page was built)