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

placesForfunction

Where each part stands: up the stack joint to joint, or spread apart on a diagonal of the ground, or one part alone.

Import it

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

Definition

function placesFor(parts: readonly { slot: string; part: PartRecord; }[], show: string, widthOf: WidthOf): Place[]

Parameters

NameTypeDescription
partsreadonly { slot: string; part: PartRecord; }[]

The parts with their slots, from the bottom.

showstring

What to show.

widthOfWidthOf

The width of a part, for spacing when they are apart.

Returns

Place[]

A place for each part.

Examples

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

const rocket = build({ rocket: "falcon-9", variant: "block-5" });
const parts = rocket.parts.map((part) => ({ slot: part.slot, part: part.record }));
console.log(placesFor(parts, "apart", (part) => part.diameter / 2).map((place) => place.slot));
[ 'first-stage', 'second-stage', 'fairing' ]

What it prints (run when this page was built)

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