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

addBodyfunction

Add a body to a scene (once), in its place in the order of the sky for an automatic layout, or at the front and to the right of the others for a manual one.

Import it

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

Definition

function addBody(scene: Portrait, body: BodyId): Portrait

Parameters

NameTypeDescription
scenePortrait

The scene to add to; it is not changed.

bodyBodyId

The body's name.

Returns

Portrait

A new scene with the body, or the same one when it is already there.

Examples

import { addBody, defaultPortrait } from "@johnmorrisdotca/wakusei-planets";

const scene = addBody(addBody(defaultPortrait(), "saturn"), "earth");
console.log(scene.items.map((item) => item.body).join(", "));
earth, saturn

What it prints (run when this page was built)

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