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

buildPartfunction

One part on its own, by its id.

Import it

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

Definition

function buildPart(id: string): { record: PartRecord; bounds: Bounds; glb: () => Glb; svg: (options?: SvgOptions) => string; }

Parameters

NameTypeDescription
idstring

A part's id, as PART_ENTRIES lists it.

Returns

{ record: PartRecord; bounds: Bounds; glb: () => Glb; svg: (options?: SvgOptions) => string; }

The part's record and bounds, a function for its .glb and one for its drawing. It throws for an id that is not a part.

Examples

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

const raptor = buildPart("raptor-vacuum");
console.log(raptor.record.name, raptor.bounds.max);
Raptor, vacuum [ 1.132528915964039, 4.4, 1.15 ]

What it prints (run when this page was built)

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