Reference · Rockets, variants, parts and the fit check
PartRecordtype
The one record every part has: its id, kind and name, the rocket and variants it is true for, its height and diameter in metres, the sourced figures, its joints, any painted model, and where its shape came from.
Import it
import type { PartRecord } from "@johnmorrisdotca/uchusen-rockets";
Definition
interface PartRecord {
id: string;
kind: PartKind;
name: string;
rocket: string;
trueTo: readonly string[];
height: number;
diameter: number;
sourced: {
height: Figure;
diameter: Figure;
};
joints: {
readonly top?: Joint;
readonly bottom?: Joint;
};
strapOn?: {
x: number;
z: number;
y?: number;
};
painted: {
file: string;
credit: CreditId;
ownNozzle?: true;
also?: readonly CreditId[];
} | null;
drawnFrom: string;
}
Members
| Name | Type | Description |
|---|---|---|
id | string | |
kind | PartKind | |
name | string | |
rocket | string | The rocket and the variants it is true for. Empty: it was never part of a flown or announced vehicle. |
trueTo | readonly string[] | |
height | number | Metres, as drawn: equal to the sourced figure wherever there is one. |
diameter | number | |
sourced | { height: Figure; diameter: Figure; } | The sourced figures, blank where no source gives one. |
joints | { readonly top?: Joint; readonly bottom?: Joint; } | |
strapOn (optional) | { x: number; z: number; y?: number; } | undefined | It is placed rather than stacked, this far from the rocket's axis and this far up (left out: on the ground): a side booster beside the core, or a booster standing on a deck. |
painted | { file: string; credit: CreditId; ownNozzle?: true; also?: readonly CreditId[]; } | null | The painted look's mesh, when a licensed model gives one: its file under assets/models/ and whose it is. Otherwise this package's own code paints it. |
drawnFrom | string | What a reader should be told about where its shape came from. |
Examples
import { partEntry, type PartRecord } from "@johnmorrisdotca/uchusen-rockets";
const record: PartRecord | undefined = partEntry("starship-v3-ship")?.record;
console.log(record?.name, record?.height, record?.trueTo);Ship, Block 3 (V3) 52.1 [ 'v3' ]What it prints (run when this page was built)