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

Paintingtype

One body made by the painter: an object of radius 1 at the origin for the caller to move and scale.

Import it

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

Definition

interface Painting {
    object: THREE.Object3D;
    billboard?: boolean;
    update(info: PaintInfo): void;
    dispose(): void;
}

Members

NameTypeDescription
objectTHREE.Object3D<THREE.Object3DEventMap>
billboard (optional)boolean | undefined

True to have the caller turn the object to face the camera (the Sun, which carries a glow).

update(info: PaintInfo): void

Call at each draw, after the object has been placed and scaled.

dispose(): void

Examples

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

const stop = (painting: Painting): void => painting.dispose();
console.log(typeof stop);

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