Reference · Rockets, variants, parts and the fit check
labelsOffunction
The labels of a ship: one for every named section of every module, each pointing at its part, alternating sides so a sheet can carry them on both sides. A label's point follows the module wherever the list puts it.
Import it
import { labelsOf } from "@johnmorrisdotca/uchusen-rockets";
Definition
function labelsOf(ship: ShipList): Label[]
Parameters
| Name | Type | Description |
|---|---|---|
ship | ShipList | The ship's list. |
Returns
Label[]
The labels, bottom of the spine first.
Examples
import { labelsOf, SAMPLE_SHIPS } from "@johnmorrisdotca/uchusen-rockets";
const labels = labelsOf(SAMPLE_SHIPS.hauler);
console.log(labels.length, labels.filter((label) => label.side === "left").length);93 46What it prints (run when this page was built)