本文へ移動

Chikyu Earth地球

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

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

目次

リファレンス · 太陽、月、惑星: 計算部分

genericSatellite関数

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

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 { genericSatellite } from "@johnmorrisdotca/chikyu-earth/space";

定義

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

引数

名前型説明
threetypeof THREE

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

kindSatelliteKind

What to draw.

shared (省略可){ 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.

戻り値

BodyDrawing

The drawing, with light and dispose.

例

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();

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

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