リファレンス
メッシュと図面を作る
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. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。