本文へ移動

Chikyu Earth地球

世界の国の輪郭を線で描いた地球儀です。地球と同じ速さで回ります。宇宙から見たような地球と、好きな場所の目印も使えます。

「地球」(ちきゅう) は、私たちが住む星の名前です。 名前について(英語)

目次

リファレンス · リアルな地球の計算部分

ThreeParts型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

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 type { ThreeParts } from "@johnmorrisdotca/chikyu-earth/realistic";

定義

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;
};

メンバー

名前型説明
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 (省略可)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.

例

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

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

ソースを見るGitHub で編集@johnmorrisdotca/chikyu-earth 0.11.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。