リファレンス · 自分の three.js シーンに置く天体
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.
インポート
import type { PaintInfo } from "@johnmorrisdotca/wakusei-planets/painter";
定義
interface PaintInfo {
toSun: Vec3;
ms: number;
radiusPx: number;
pose?: {
pole: Vec3;
meridian: Vec3;
};
occluders?: readonly (readonly [
number,
number,
number,
number
])[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
toSun | Vec3 | |
ms | number | |
radiusPx | number | |
pose (省略可) | { pole: Vec3; meridian: Vec3; } | undefined | The pole and the prime meridian to draw instead of the body's real ones at |
occluders (省略可) | readonly (readonly [number, number, number, number])[] | undefined | Spheres that may shade this body from the Sun: x, y, z (from this body's centre) and radius, all in this body's radii, in the scene's axes. At most six are used. |
例
import type { PaintInfo } from "@johnmorrisdotca/wakusei-planets/painter";
const info: PaintInfo = { toSun: [1, 0, 0], ms: Date.UTC(2026, 10, 2), radiusPx: 80 };
console.log(info.radiusPx);この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。