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

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

Exports

NameKindWhat it is
buildfunctionA rocket from a description.
buildPartfunctionOne part on its own, by its id.
BuilttypeA rocket built from a description: the fit report, its parts, and the ways to ask for its size, where each part stands, its lit engines, a .glb file and a drawing.
BuiltParttypeOne part of a built rocket: its slot, its record, the pieces it is made of, its mesh and its bounds in metres.
CompareIdtypeThe name of a comparison shape that can stand in a lineup: person or building.
COMPARESconstantComparison shapes: plain round sizes, for scale, not facts about anything.
drawnPiecesfunctionWhat a drawing draws of a part: in a stack, what nests inside the part below is out of sight.
FitErrorclassRaised by build when a description does not fit.
GlbtypeA binary glTF file: its bytes and how many triangles it holds.
HEAVY_PIECESconstantA part with more pieces than this is not meshed until its triangles are asked for, and the mesh is not kept: a fleet ship's parts hold hundreds of thousands of triangles, and keeping them all as arrays of numbers took a gigabyte.
LineupItemtypeOne thing standing in a lineup: its key (starship:v3 or a comparison's name), its label and its height in metres.
LineupOptionstypeWhat 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.
lineupSvgfunctionThe whole picture as SVG text.
REAL_CRAFTconstantThe real craft that lie in the fleet band for scale: Starship with Super Heavy, Saturn V, SLS and the International Space Station.
SvgOptionstypeWhat a drawing is asked for: the look, the view, what to show and whether the engines are lit.
toGlbfunctionWrites parts into one small binary glTF file, in Node or a browser, with no dependency: one node for each part and one primitive for each material.

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