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

PaintContexttype

What the caller gives the painter when it makes a body.

Import it

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

Definition

interface PaintContext {
    look?: string;
    invalidate?(): void;
    ratio?: number;
    maxTexture?: number;
}

Members

NameTypeDescription
look (optional)string | undefined

realistic (the default) or painted.

invalidate (optional)(() => void) | undefined

Ask for a new draw: a sharper picture has arrived.

ratio (optional)number | undefined

Device pixels to a CSS pixel; default 1.

maxTexture (optional)number | undefined

The widest picture the GPU should be given, in pixels; default 2048.

Examples

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

const context: PaintContext = { look: "painted", invalidate: () => undefined, ratio: 2 };
console.log(context.look);

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