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

EmbedOptionstype

What the reader chose: the body, how it is drawn, and whether it is a portrait or the sky at a date.

Import it

import type { EmbedOptions } from "@johnmorrisdotca/wakusei-planets";

Definition

interface EmbedOptions {
    body: BodyId;
    look?: Look;
    time?: string;
    moons?: boolean;
    turn?: number;
    size?: number;
    zoom?: number;
}

Members

NameTypeDescription
bodyBodyId
look (optional)Look | undefined
time (optional)string | undefined

The date and time as an ISO string, or now: the body as the Earth sees it then. Left out, a portrait.

moons (optional)boolean | undefined

A planet with its moons on their orbits (needs time).

turn (optional)number | undefined

Degrees a second it turns by itself; left out or 0, it is still.

size (optional)number | undefined

Pixels across.

zoom (optional)number | undefined

How far in the embed page starts, as its zoom address key has it (1 is the whole body). Left out or 1, the page starts at Fit. Only the iframe way carries it: the element's own start is Fit.

Examples

import { embedCode, type EmbedOptions } from "@johnmorrisdotca/wakusei-planets";

const options: EmbedOptions = { body: "saturn", look: "painted", size: 320, turn: 12 };
console.log(embedCode(options, "html"));
<script type="module" src="https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.24.0/element/+esm"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.24.0/saturn/+esm"></script>

<wakusei-body body="saturn" look="painted" turn="12"></wakusei-body>

What it prints (run when this page was built)

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