Reference · Facts, line drawings and positions
LineupBodytype
Something the line-up draws: a star of the table, or a planet from the package's facts. The size, the error and what to say about it are all here.
Import it
import type { LineupBody } from "@johnmorrisdotca/wakusei-planets";
Definition
interface LineupBody {
id: string;
kind: "star" | "planet";
name: {
en: string;
ja: string;
};
radiusSun: number;
radiusKm: number;
minus: number;
plus: number;
body?: "earth" | "jupiter";
row?: RadiusRow;
flattening: number;
}
Members
| Name | Type | Description |
|---|---|---|
id | string | |
kind | "star" | "planet" | |
name | { en: string; ja: string; } | |
radiusSun | number | |
radiusKm | number | |
minus | number | The error in solar radii below and above (0 for a planet and the Sun). |
plus | number | |
body (optional) | "earth" | "jupiter" | undefined | A planet: the body's id in the package's facts. |
row (optional) | RadiusRow | undefined | A star: its row of the table. |
flattening | number | How flattened the body is at its poles, 0 to 1. |
Examples
import { lineupBodies, type LineupBody } from "@johnmorrisdotca/wakusei-planets";
const first: LineupBody = lineupBodies({ planets: true })[0]!;
console.log(first.kind, first.id, first.radiusKm);planet earth 6378.137What it prints (run when this page was built)