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 realistic Earth's pure parts

ThreePartstype

The parts of three.js the Earth and the space view use. A page can hand over a module that re-exports just these (see setThreeLoader) instead of all of three.

Import it

import type { ThreeParts } from "@johnmorrisdotca/chikyu-earth/realistic";

Definition

type ThreeParts = {
    [Name in "Texture" | "BufferGeometry" | "BufferAttribute" | "ShaderMaterial" | "Group" | "Mesh" | "Scene" | "OrthographicCamera" | "PerspectiveCamera" | "Vector3" | "WebGLRenderer" | "RepeatWrapping" | "ClampToEdgeWrapping" | "LinearMipmapLinearFilter" | "LinearFilter" | "BackSide" | "DoubleSide" | "LineLoop" | "LineBasicMaterial" | "Color"]: (typeof THREE)[Name];
} & {
    Points?: typeof THREE.Points;
};

Members

NameTypeDescription
Texturetypeof THREE.Texture
BufferGeometrytypeof THREE.BufferGeometry
BufferAttributetypeof THREE.BufferAttribute
ShaderMaterialtypeof THREE.ShaderMaterial
Grouptypeof THREE.Group
Meshtypeof THREE.Mesh
Scenetypeof THREE.Scene
OrthographicCameratypeof THREE.OrthographicCamera
PerspectiveCameratypeof THREE.PerspectiveCamera
Vector3typeof THREE.Vector3
WebGLRenderertypeof THREE.WebGLRenderer
RepeatWrapping1000
ClampToEdgeWrapping1001
LinearMipmapLinearFilter1008
LinearFilter1006
BackSide1
DoubleSide2
LineLooptypeof THREE.LineLoop
LineBasicMaterialtypeof THREE.LineBasicMaterial
Colortypeof THREE.Color
Points (optional)typeof THREE.Points | undefined

Only the satellites use it, so a loader that hands over a subset of three.js without it still draws everything else.

Examples

import type { ThreeParts } from "@johnmorrisdotca/chikyu-earth/realistic";

const load = (): Promise<ThreeParts> => import("three");
console.log(typeof load);

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