本文へ移動

Uchusen Rockets宇宙船

出典つきの寸法から描いたロケットです。ページに置いて、分解して、回して見られる線画と彩色した3Dビューに加え、ロケットが本当に組み合わさるかを確かめる、型付きのデータモデルを備えています。

Uchusen は、宇宙を飛ぶ乗り物を意味する日本語「宇宙船」(うちゅうせん)から取った名前です。 名前について(英語)

目次

リファレンス

メッシュと図面を作る

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

リファレンスの説明と例は英語です。見出しと目次は日本語です。

エクスポート

名前種類概要
build関数A rocket from a description.
buildPart関数One part on its own, by its id.
Built型A 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.
BuiltPart型One part of a built rocket: its slot, its record, the pieces it is made of, its mesh and its bounds in metres.
CompareId型The name of a comparison shape that can stand in a lineup: person or building.
COMPARES定数Comparison shapes: plain round sizes, for scale, not facts about anything.
drawnPieces関数What a drawing draws of a part: in a stack, what nests inside the part below is out of sight.
FitErrorクラスRaised by build when a description does not fit.
Glb型A binary glTF file: its bytes and how many triangles it holds.
HEAVY_PIECES定数A 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.
LineupItem型One thing standing in a lineup: its key (starship:v3 or a comparison's name), its label and its height in metres.
LineupOptions型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.
lineupSvg関数The whole picture as SVG text.
REAL_CRAFT定数The real craft that lie in the fleet band for scale: Starship with Super Heavy, Saturn V, SLS and the International Space Station.
SvgOptions型What a drawing is asked for: the look, the view, what to show and whether the engines are lit.
toGlb関数Writes 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.

ソースを見るGitHub で編集@johnmorrisdotca/uchusen-rockets 0.14.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。