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

Bodies as objects for your own three.js scene

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

Exports

NameKindWhat it is
createPainterfunctionMake a painter that takes its pictures from the given folders (jsDelivr's copy of this version by default).
LOOKSconstantThe looks the painter draws: realistic (shaded from the body's real colours and features) and painted (a public-domain surface map, with the shaded look until it arrives).
moonOffsetfunctionWhere a moon is from its planet's centre, in planet radii, in the scene's axes (x to the vernal equinox, y north).
MoonSitetypeOne moon of a planet at a time: where it is from the planet's centre and how big it is, both in radii of the planet, in the scene's axes.
orientationfunctionThe north pole and the prime meridian of a body at a time, as unit vectors in the scene's axes (x to the vernal equinox, y north).
PaintContexttypeWhat the caller gives the painter when it makes a body.
painterconstantThe painter with its default pictures: pass it to chikyu-earth's setBodyPainter.
PainterLooktypeOne of the looks in LOOKS: realistic or painted.
PainterOptionstypeWhere the pictures are, if not on jsDelivr: a folder address that ends in a slash.
PaintInfotypeWhat the caller tells a painted body at each draw: the direction to the Sun (a unit vector in the scene's axes), the time, and how many CSS pixels across its radius the body is on the screen.
PaintingtypeOne body made by the painter: an object of radius 1 at the origin for the caller to move and scale.
WakuseiPaintertypeA painter: makes the bodies as three.js objects (make) and tells where a planet's moons are (moons).

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