リファレンス · 自分の three.js シーンに置く天体
WakuseiPainter型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A painter: makes the bodies as three.js objects (make) and tells where a planet's moons are (moons). Its shape is chikyu-earth's BodyPainter, so setBodyPainter(painter) is all the wiring.
インポート
import type { WakuseiPainter } from "@johnmorrisdotca/wakusei-planets/painter";
定義
interface WakuseiPainter {
readonly looks: readonly PainterLook[];
make(three: object, name: string, context?: PaintContext): Painting;
moons(planet: string, ms: number): MoonSite[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
looks | readonly ("realistic" | "painted")[] | The looks |
make | (three: object, name: string, context?: PaintContext): Painting |
|
moons | (planet: string, ms: number): MoonSite[] | The moons the painter draws for a planet (none for the Earth: its Moon is the viewer's own), where they are at a time, nearest first. |
例
import { createPainter, type WakuseiPainter } from "@johnmorrisdotca/wakusei-planets/painter";
const mine: WakuseiPainter = createPainter({ textureBase: "/pictures/", farBase: "/pictures/" });
console.log(mine.looks.join(", "));この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。