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

FitErrorclass

Raised by build when a description does not fit. Its report says why, in the same words check gives.

Import it

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

Definition

class FitError
new FitError(report: FitReport): FitError

Parameters

NameTypeDescription
reportFitReport

The report of the fit check that failed.

Members

NameTypeDescription
reportFitReport
namestring
messagestring
stack (optional)string | undefined
cause (optional)unknown

Examples

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

try {
  build({ rocket: "starship", variant: "v3", parts: { booster: "starship-v3-ship" } });
} catch (error) {
  if (error instanceof FitError) console.log(error.report.issues[0]?.message);
}
Ship, Block 3 (V3) is a ship; this slot takes a booster.

What it prints (run when this page was built)

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