Reference · Rockets, variants, parts and the fit check
Labeltype
One label: what it says, the part it points at in the ship's metres (so a 3D view moves it with the part), which side of the ship its text goes, and where it comes from.
Import it
import type { Label } from "@johnmorrisdotca/uchusen-rockets";
Definition
interface Label {
id: string;
place: number;
module: string;
text: string;
does: string;
role: SectionRole;
at: Vec3;
side: "left" | "right";
deck?: number;
}
Members
| Name | Type | Description |
|---|---|---|
id | string | |
place | number | The place in the ship's list and the module's id. |
module | string | |
text | string | |
does | string | |
role | SectionRole | |
at | Vec3 | The point the leader line ends on, in the ship's metres. |
side | "left" | "right" | Which side of the sheet the text stands: |
deck (optional) | number | undefined | The deck number in the ship, for a deck. |
Examples
import { labelsOf, SAMPLE_SHIPS, type Label } from "@johnmorrisdotca/uchusen-rockets";
const first: Label = labelsOf(SAMPLE_SHIPS.scout)[0];
console.log(first.text, first.at, first.side);Three nozzles, magnetic nozzles [ 3.99, 2.784, 0 ] rightWhat it prints (run when this page was built)