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 · How a body is drawn with three.js

registerStarLookfunction

Teach the package a star by name, so an element can be told star="Betelgeuse" and draw it from these numbers. The package holds no catalogue of stars: this is where a page puts the few it draws. The name is matched without regard to case. Registering a name again replaces it.

Import it

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

Definition

function registerStarLook(name: string, numbers: StarNumbers): StarLook

Parameters

NameTypeDescription
namestring

What the star is called in the star attribute.

numbersStarNumbers

The star's numbers.

Returns

StarLook

The star, ready to draw.

Examples

import { registerStarLook, starLookOf } from "@johnmorrisdotca/wakusei-planets/look";

registerStarLook("Proxima Centauri", { temperatureK: 3042, radiusSun: 0.154, luminosityClass: "V", rotationDays: 83 });
console.log(starLookOf("proxima centauri")?.colour);
#ffb371

What it prints (run when this page was built)

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