Reference · Rockets, variants, parts and the fit check
ExplodedModuletype
One module of an exploded assembly: its name, how far it moves from its place, and the points it mounts at.
Import it
import type { ExplodedModule } from "@johnmorrisdotca/uchusen-rockets";
Definition
interface ExplodedModule {
place: number;
module: string;
name: string;
assembled: Vec3;
exploded: Vec3;
mounts: {
id: string;
kind: "collar-top" | "collar-bottom" | "port";
collar: string;
diameter: number;
at: Vec3;
}[];
}
Members
| Name | Type | Description |
|---|---|---|
place | number | |
module | string | |
name | string | |
assembled | Vec3 | Where it stands assembled and where the exploded view puts it, as the origin of its base. |
exploded | Vec3 | |
mounts | { id: string; kind: "collar-top" | "collar-bottom" | "port"; collar: string; diameter: number; at: Vec3; }[] | Its mounting points: each collar (class, diameter and centre of its face, exploded) and each port. |
Examples
import { exploded, type ExplodedModule, SAMPLE_SHIPS } from "@johnmorrisdotca/uchusen-rockets";
const one: ExplodedModule = exploded(SAMPLE_SHIPS.scout)[0];
console.log(one.name, one.mounts.length);Fusion engine cluster, 3 1What it prints (run when this page was built)