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

genericSatellitefunction

A generic satellite as a drawing of radius 1 about the origin, its long axis along +x (the way it flies), its top along +z and its left along +y, the family's convention for a model, with its own light that light(toSun) turns to the Sun. One group of a few meshes, made once and disposed with dispose.

Import it

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

Definition

function genericSatellite(three: typeof THREE, kind: SatelliteKind, shared?: { sun: THREE.DirectionalLight; }): BodyDrawing

Parameters

NameTypeDescription
threetypeof THREE

three.js (the parts the demo's subset holds: Group, Mesh, BoxGeometry, CylinderGeometry, MeshLambertMaterial, DirectionalLight, AmbientLight).

kindSatelliteKind

What to draw.

shared (optional){ sun: THREE.DirectionalLight; } | undefined

A Sun light the scene owns ({ sun }), in the scene's own axes: the drawing then makes none of its own and light points that one. A scene with the light always in it keeps the same number of lights whether or not a drawing is shown, so three keeps one program for each material, not one for each state of the lights.

Returns

BodyDrawing

The drawing, with light and dispose.

Examples

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

const three = await import("three");
const drawing = genericSatellite(three, "communications");
console.log(drawing.object.children.length);
drawing.dispose();

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