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 · Build a mesh and a drawing

LineupOptionstype

What a lineup is asked for: the items by key, how many pixels make a metre, and optionally the look, the view, what to show, a ruler and labels.

Import it

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

Definition

interface LineupOptions {
    items: readonly string[];
    unit: number;
    look?: LookName;
    view?: ViewName;
    show?: string;
    ruler?: boolean;
    labels?: boolean;
    real?: boolean;
    filter?: "all" | "rockets" | "fleet";
    fit?: {
        width?: number;
        height?: number;
    };
    pose?: "stand";
}

Members

NameTypeDescription
itemsreadonly string[]

"starship:v1,starship:v3,person,building".

unitnumber

Pixels a metre.

look (optional)"line" | "thick" | "painted" | undefined
view (optional)"three-quarter" | "front" | "back" | "side" | "below" | undefined
show (optional)string | undefined
ruler (optional)boolean | undefined
labels (optional)boolean | undefined
real (optional)boolean | undefined

Real craft for scale: Starship with Super Heavy, Saturn V, SLS and the ISS lie sideways in the fleet band, at the same scale as the fleet ships, nose right, each labelled with its name and length. Left out: not drawn. Only where the fleet band is.

filter (optional)"all" | "rockets" | "fleet" | undefined

rockets or fleet leaves out the other kind; all (the default) draws both. A fleet ship (a rocket whose id starts with fleet-) lies lengthwise in its own band below the rockets, unless pose is stand.

fit (optional){ width?: number; height?: number; } | undefined

Shrinks the scale, never grows it, until the whole drawing fits this many pixels across and down (either may be left out). Without it the scale is unit, as it always was.

pose (optional)"stand" | undefined

stand draws each fleet ship upright in the row, beside the others, at the same scale, and view turns it. Left out, a fleet ship lies in its own band, as it always has.

Examples

import { lineupSvg, type LineupOptions } from "@johnmorrisdotca/uchusen-rockets/build";

const options: LineupOptions = { items: ["starship:v2", "starship:v3", "building"], unit: 3, ruler: true, labels: true };
console.log(lineupSvg(options).width);
342

What it prints (run when this page was built)

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