check関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Asks whether a rocket goes together, from the parts' records alone, with no three.js and no DOM. A rocket labelled as a real version uses only parts true for it; any mix is a custom build and says so.
インポート
import { check } from "@johnmorrisdotca/uchusen-rockets";
定義
function check(description: Description): FitReport
引数
| 名前 | 型 | 説明 |
|---|---|---|
description | Description | The rocket, its variant and any other part in a slot. |
戻り値
FitReport
A report that says whether it fits and why, with the size and the credits.
例
import { check } from "@johnmorrisdotca/uchusen-rockets";
const report = check({ rocket: "starship", variant: "v3", parts: { booster: "starship-v3-ship" } });
console.log(report.ok, report.issues[0]?.message);false Ship, Block 3 (V3) is a ship; this slot takes a booster.出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。