Reference · Rockets, variants, parts and the fit check
FlightFrametype
Everything the picture needs at one place on the timeline: the phase, how each part stands, which engines burn, how far the ground has fallen, and how much smoke stands on the pad.
Import it
import type { FlightFrame } from "@johnmorrisdotca/uchusen-rockets";
Definition
interface FlightFrame {
index: number;
phase: FlightPhase;
poses: Readonly<Record<string, PoseNow>>;
burns: Readonly<Record<string, number>>;
groundY: number;
smoke: number;
air: number;
separated: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
index | number | |
phase | FlightPhase | |
poses | Readonly<Record<string, PoseNow>> | |
burns | Readonly<Record<string, number>> | |
groundY | number | Metres. |
smoke | number | |
air | number | |
separated | boolean | A part stands away from the stack. |
Examples
import { flightOf, frameAt, type FlightFrame } from "@johnmorrisdotca/uchusen-rockets";
const flight = flightOf("falcon-9", "block-5");
const frame: FlightFrame | undefined = flight ? frameAt(flight, 0, [{ slot: "first-stage", baseY: 0 }], 70) : undefined;
console.log(frame?.phase.name, frame?.separated);Ignition falseWhat it prints (run when this page was built)