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

shipPartsfunction

A ship's parts for the registry: one entry for each place, named <ship>-<place>-<module>, with a record that carries its joints and, for a module hung beside or on a port, where it stands.

Import it

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

Definition

function shipParts(ship: string, list: ShipList, options?: ModuleOptions, rocket?: string, variant?: string): ShipParts

Parameters

NameTypeDescription
shipstring

The ship's id, as its rocket and variant will name it.

listShipList

The ship's list of places.

options (optional)ModuleOptions

What to draw, for every module.

rocket (optional)string

The rocket the parts belong to. Left out: the ship's id.

variant (optional)string

The variant the parts are true for. Left out: the ship's id.

Returns

ShipParts

The entries, the slot names in stacking order, the slot-to-part ids, and the assembly.

Examples

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

const parts = shipParts("demo", [{ module: "engine-fusion-3" }, { module: "tank-cryo-12" }]);
console.log(parts.slots, parts.assembly.ok);
[ 'engine-fusion-3-1', 'tank-cryo-12-2' ] true

What it prints (run when this page was built)

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