Reference
Bodies as objects for your own three.js scene
import { … } from "@johnmorrisdotca/wakusei-planets/painter";
Exports
| Name | Kind | What it is |
|---|---|---|
createPainter | function | Make a painter that takes its pictures from the given folders (jsDelivr's copy of this version by default). |
LOOKS | constant | The 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). |
moonOffset | function | Where a moon is from its planet's centre, in planet radii, in the scene's axes (x to the vernal equinox, y north). |
MoonSite | type | One 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. |
orientation | function | The 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). |
PaintContext | type | What the caller gives the painter when it makes a body. |
painter | constant | The painter with its default pictures: pass it to chikyu-earth's setBodyPainter. |
PainterLook | type | One of the looks in LOOKS: realistic or painted. |
PainterOptions | type | Where the pictures are, if not on jsDelivr: a folder address that ends in a slash. |
PaintInfo | type | What 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. |
Painting | type | One body made by the painter: an object of radius 1 at the origin for the caller to move and scale. |
WakuseiPainter | type | A painter: makes the bodies as three.js objects (make) and tells where a planet's moons are (moons). |