Skip to the content

Uchusen Rockets宇宙船

Rockets drawn from sourced sizes: line drawings and painted 3D views you drop into a page, take apart and turn round, and a typed model that checks whether a rocket really goes together.

Uchusen is the Japanese word 宇宙船 for spaceship. About the name

Contents

Reference · Rockets, variants, parts and the fit check

phasePositionfunction

The place on the timeline of a phase by its id, or null for one the flight does not have.

Import it

import { phasePosition } from "@johnmorrisdotca/uchusen-rockets";

Definition

function phasePosition(flight: Flight, id: string | null | undefined): number | null

Parameters

NameTypeDescription
flightFlight

A flight.

idstring | null | undefined

A phase's id, or null or undefined.

Returns

number | null

The place of that phase on the timeline, or null for an id the flight does not have.

Examples

import { flightOf, phasePosition } from "@johnmorrisdotca/uchusen-rockets";

const flight = flightOf("falcon-9", "block-5");
if (flight) console.log(phasePosition(flight, "nonsense"));
null

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/uchusen-rockets 0.14.0.