Reference · Rockets, variants, parts and the fit check
VariantFactstype
The sourced numbers of a variant: its height and diameter, each part's height by slot, its engines, other facts and any sizes that are not a height or a width.
Import it
import type { VariantFacts } from "@johnmorrisdotca/uchusen-rockets";
Definition
interface VariantFacts {
height: Figure;
diameter: Figure;
parts: Readonly<Record<string, Figure>>;
engines: Readonly<Record<string, Figure<string>>>;
more: Readonly<Record<string, Figure<number | string>>>;
sizes?: Readonly<Record<string, Figure>>;
}
Members
| Name | Type | Description |
|---|---|---|
height | Figure<number> | Overall height with every part in place, metres. |
diameter | Figure<number> | |
parts | Readonly<Record<string, Figure<number>>> | Each part's height by its slot, metres. |
engines | Readonly<Record<string, Figure<string>>> | Engines by slot. |
more | Readonly<Record<string, Figure<string | number>>> | Other facts, each with its own source. |
sizes (optional) | Readonly<Record<string, Figure<number>>> | undefined | Sizes that are not a height or a width, shown as they are named here: "Deck length". |
Examples
import { variantOf, type VariantFacts } from "@johnmorrisdotca/uchusen-rockets";
const facts: VariantFacts | undefined = variantOf("falcon-9", "block-5")?.facts;
console.log(facts?.height.value, Object.keys(facts?.parts ?? {}));69.8 [ 'first-stage', 'second-stage', 'fairing' ]What it prints (run when this page was built)