PlacedItem型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A body of a scene as the layout puts it: its place and size now (stored, or worked out by an automatic layout), and how far its picture reaches past the disc.
インポート
import type { PlacedItem } from "@johnmorrisdotca/wakusei-planets";
定義
interface Placed extends Item {
index: number;
reach: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
index | number | |
reach | number | How far the picture of the body reaches from its centre (rings, the Sun's glow), in scene units. |
body | BodyId | |
x | number | |
y | number | |
r | number | The radius, in scene units. |
spin | number | The longitude at the middle of the disc, degrees east (with a date: turned this much from the real one). |
tilt (省略可) | number | undefined | The pole's lean on the page, degrees; the body's own tilt when left out. |
pitch (省略可) | number | undefined | How far the viewer looks over the pole, degrees; the usual for the body when left out. |
turn | number | Degrees a second it turns by itself, eastward. |
例
import { addBody, defaultPortrait, layoutPortrait, type PlacedItem } from "@johnmorrisdotca/wakusei-planets";
const placed: PlacedItem[] = layoutPortrait(addBody(defaultPortrait(), "saturn")).placed;
console.log(placed[0]?.reach, placed[0]?.r);0.8417508417508418 0.3477788484205139出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。