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

spaceLengthfunction

The length still flying, in metres, rounded. Null when the picture is the whole variant. The table and the picture's name both use this.

Import it

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

Definition

function spaceLength(rocket: string, slots: readonly string[], parts: Readonly<Record<string, { value: unknown; }>> | undefined): number | null

Parameters

NameTypeDescription
rocketstring

The rocket's id.

slotsreadonly string[]

The variant's slots, from the bottom.

partsReadonly<Record<string, { value: unknown; }>> | undefined

The sourced length of each slot, when a source gave one.

Returns

number | null

The rounded length of the slots still flying, or null when nothing is spent.

Examples

import { spaceLength, variantOf } from "@johnmorrisdotca/uchusen-rockets";

const starship = variantOf("starship", "v3");
console.log(spaceLength("starship", starship?.slots ?? [], starship?.facts.parts));
52

What it prints (run when this page was built)

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