Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · The Sun, Moon and planets: pure parts

BodyPaintertype

The seam for drawing the Sun, the planets and their moons. The space view places them, sizes them, lights them and labels them; a painter only makes what is drawn at each place. The default (plainPainter) is a sphere in the body's colour, and a glow for the Sun. Another package can supply better looking ones: @johnmorrisdotca/wakusei-planets/painter draws the real Sun, planets, Pluto and moons. make may return a drawing at once or later (a promise); a drawing may update itself and ask for a redraw when a picture arrives. moons is optional: the moons the painter can draw for a planet at a moment, which the view shows round the planet when it is near enough to see them. looks names what context.look may be.

Import it

import type { BodyPainter } from "@johnmorrisdotca/chikyu-earth/space";

Definition

interface BodyPainter {
    make(three: ThreeParts, name: string, context?: PaintContext): BodyDrawing | Promise<BodyDrawing>;
    moons?(planet: PlanetName, ms: number): readonly BodyMoon[];
    looks?: readonly string[];
}

Members

NameTypeDescription
make(three: ThreeParts, name: string, context?: PaintContext): BodyDrawing | Promise<BodyDrawing>
moons (optional)((planet: PlanetName, ms: number) => readonly BodyMoon[]) | undefined
looks (optional)readonly string[] | undefined

Examples

import { plainPainter, type BodyPainter } from "@johnmorrisdotca/chikyu-earth/space";

const painter: BodyPainter = { make: (three, name) => plainPainter.make(three, name) };
console.log(typeof painter.make);

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.11.0.