Reference · Rockets, variants, parts and the fit check
explodedfunction
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 it
import { exploded } from "@johnmorrisdotca/uchusen-rockets";
Definition
function exploded(ship: ShipList, gap?: number): ExplodedModule[]
Parameters
| Name | Type | Description |
|---|---|---|
ship | ShipList | The ship's list. |
gap (optional) | number | undefined | The gap between modules, in metres. Left out: a tenth of the ship's length, at most 20. |
Returns
ExplodedModule[]
One entry for each module, bottom first.
Examples
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 1What it prints (run when this page was built)