exploded関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The exploded assembly of a ship: every module moved apart along the spine by gap metres so none touches, with its name and its mounting points (the centre of each collar's face and each port) in the exploded positions.
Modules hung beside the spine move out along their own direction.
インポート
import { exploded } from "@johnmorrisdotca/uchusen-rockets";
定義
function exploded(ship: ShipList, gap?: number): ExplodedModule[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
ship | ShipList | The ship's list. |
gap (省略可) | number | undefined | The gap between modules, in metres. Left out: a tenth of the ship's length, at most 20. |
戻り値
ExplodedModule[]
One entry for each module, bottom first.
例
import { exploded, SAMPLE_SHIPS } from "@johnmorrisdotca/uchusen-rockets";
for (const one of exploded(SAMPLE_SHIPS.scout)) console.log(one.name, one.mounts.length);Fusion engine cluster, 3 1
Cryogenic fuel tank, 12 m 2
Fusion reactor module 2
Adapter L to M 2
Header tank, 9 m 2
Habitat ring, 16 m 2
Mission pod, medical and rescue 2
Laboratory module 2
Radiator array, deployed 2
Navigation deck 2
Sensor mast 1出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。