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

PaintedMaptype

The painted look of a body: a surface map in the package's textures folder, as widths from the smallest up.

Import it

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

Definition

interface PaintedMap {
    map: string;
    widths: readonly number[];
    far?: number;
    relief?: number;
    turn?: "bands" | "hexagon";
    rings?: {
        map: string;
        width: number;
        from: number;
        to: number;
    };
    credit?: string;
}

Members

NameTypeDescription
mapstring

The file name before -<width>.webp, for example mars.

widthsreadonly number[]

The widths made, smallest first: the smallest is drawn first and sharper ones are fetched when the view is zoomed in.

far (optional)number | undefined

The smallest width that is not in the npm package: it is fetched from the repository's own files (see texture-far-base).

relief (optional)number | undefined

How much of the map's brightness is also relief. Default 0.

turn (optional)"bands" | "hexagon" | undefined

Weather drawn on the map so a turn can be seen. bands is a wave and a spot that move with longitude. hexagon is that wave plus the six-sided storm at the north pole. A map of plain bands shows no turn without it.

rings (optional){ map: string; width: number; from: number; to: number; } | undefined

A picture of the body's rings for this look, one pixel high: colour and opacity from the inner edge to the outer, width samples. Used instead of the table's strip when it loads.

credit (optional)string | undefined

The painted pictures' credit line, for the page.

Examples

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

const map: PaintedMap = { map: "mars", widths: [512, 1024, 2048] };
console.log(map.widths.length);
3

What it prints (run when this page was built)

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