本文へ移動

Wakusei Planets惑星

太陽・惑星・衛星を、線画、陰影つきの絵、表面の地図で描きます。実際の大きさ・傾き・自転つきで、任意の日時の衛星の位置も分かります。

「惑星」(わくせい) は、太陽のまわりを回る大きな星のことです。 名前について(英語)

目次

リファレンス

自分の three.js シーンに置く天体

import { … } from "@johnmorrisdotca/wakusei-planets/painter";

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

エクスポート

名前種類概要
createPainter関数Make a painter that takes its pictures from the given folders (jsDelivr's copy of this version by default).
LOOKS定数The looks the painter draws: realistic (shaded from the body's real colours and features) and painted (a public-domain surface map, with the shaded look until it arrives).
moonOffset関数Where a moon is from its planet's centre, in planet radii, in the scene's axes (x to the vernal equinox, y north).
MoonSite型One moon of a planet at a time: where it is from the planet's centre and how big it is, both in radii of the planet, in the scene's axes.
orientation関数The north pole and the prime meridian of a body at a time, as unit vectors in the scene's axes (x to the vernal equinox, y north).
PaintContext型What the caller gives the painter when it makes a body.
painter定数The painter with its default pictures: pass it to chikyu-earth's setBodyPainter.
PainterLook型One of the looks in LOOKS: realistic or painted.
PainterOptions型Where the pictures are, if not on jsDelivr: a folder address that ends in a slash.
PaintInfo型What the caller tells a painted body at each draw: the direction to the Sun (a unit vector in the scene's axes), the time, and how many CSS pixels across its radius the body is on the screen.
Painting型One body made by the painter: an object of radius 1 at the origin for the caller to move and scale.
WakuseiPainter型A painter: makes the bodies as three.js objects (make) and tells where a planet's moons are (moons).

ソースを見るGitHub で編集@johnmorrisdotca/wakusei-planets 0.24.0 のソースから作成しました。

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