Reference · Facts, line drawings and positions
PortraitItemtype
One body in the scene: which body, where it is and how big, how it is turned and how fast it turns by itself.
Import it
import type { PortraitItem } from "@johnmorrisdotca/wakusei-planets";
Definition
interface Item {
body: BodyId;
x: number;
y: number;
r: number;
spin: number;
tilt?: number;
pitch?: number;
turn: number;
}
Members
| Name | Type | Description |
|---|---|---|
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 (optional) | number | undefined | The pole's lean on the page, degrees; the body's own tilt when left out. |
pitch (optional) | 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. |
Examples
import { addBody, defaultPortrait, type PortraitItem } from "@johnmorrisdotca/wakusei-planets";
const saturn: PortraitItem = addBody(defaultPortrait(), "saturn").items[0]!;
console.log(saturn.body, saturn.turn);saturn 0What it prints (run when this page was built)