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

Atmospheretype

A rim of air: the colour it scatters (0 to 1 each), how strong it is and how thin the rim is.

Import it

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

Definition

interface Atmosphere {
    colour: readonly [
        number,
        number,
        number
    ];
    strength: number;
    power?: number;
}

Members

NameTypeDescription
colourreadonly [number, number, number]
strengthnumber
power (optional)number | undefined

How thin the rim is: higher is thinner. Default 3.

Examples

import { registerLook, type Atmosphere } from "@johnmorrisdotca/wakusei-planets/look";

const air: Atmosphere = { colour: [0.5, 0.7, 1], strength: 0.4 };
registerLook({ id: "venus", surface: "vec4 surface(vec3 p) { return vec4(vec3(0.9), 0.0); }", atmosphere: air });
console.log(air.strength);
0.4

What it prints (run when this page was built)

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