assemble関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Puts a ship's list of modules in place and checks that every joint mates. On the spine each module stands on the end of the one before; hung from a port it stands on that port of an earlier place;
beside it stands parallel to the spine at an offset.
インポート
import { assemble } from "@johnmorrisdotca/uchusen-rockets";
定義
function assemble(ship: ShipList): Assembly
引数
| 名前 | 型 | 説明 |
|---|---|---|
ship | ShipList | A ship's list of places, the bottom of the spine first. |
戻り値
Assembly
Where each module stands, the ship's mass and size, and any problem (a collar of the wrong class, an unknown module, a port that is not there or is taken).
例
import { assemble } from "@johnmorrisdotca/uchusen-rockets";
const ship = assemble([{ module: "engine-fusion-7" }, { module: "tank-cryo-12" }]);
console.log(ship.ok, ship.length, ship.mass);true 23.6 1660出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。