Skip to the content

Wakusei Planets惑星

The Sun, the planets and their moons as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, tilt and rotation, and the moons where they are at any date and time.

Wakusei is the Japanese word 惑星 for a planet. About the name

Contents

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

NameTypeDescription
stars (optional)readonly string[] | "all" | "bright" | "largest" | undefined

all (the default), bright or largest, or a list of ids from LINEUP_STARS.

planets (optional)boolean | undefined

Add the Earth and Jupiter.

layout (optional)"row" | "stack" | undefined

row (the default) or stack.

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 at).

turn (optional)boolean | undefined

False stops the bodies turning by themselves.

look (optional)"realistic" | "painted" | undefined

The planets' look: realistic (the default) or painted.

lang (optional)"en" | "ja" | undefined

The words: en (the default) or ja.

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)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/wakusei-planets 0.29.0.