build関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A rocket from a description. Throws FitError when it does not go together.
インポート
import { build } from "@johnmorrisdotca/uchusen-rockets/build";
定義
function build(description: Description, options?: { detail?: DetailLevel; beside?: boolean | readonly Description[]; named?: boolean; scale?: number; docked?: string; }): Built
引数
| 名前 | 型 | 説明 |
|---|---|---|
description | Description | The rocket, its variant and any other part in a slot. |
options (省略可) | { detail?: DetailLevel; beside?: boolean | readonly Description[]; named?: boolean; scale?: number; docked?: string; } |
|
戻り値
Built
The built rocket. It throws a FitError when the description does not go together.
例
import { build } from "@johnmorrisdotca/uchusen-rockets/build";
const rocket = build({ rocket: "falcon-heavy" });
console.log(rocket.report.label, rocket.glb().bytes.length > 1000);Falcon Heavy true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。