Reference · Rockets, variants, parts and the fit check
arrangementfunction
The general-arrangement views of a ship at one scale: side (the spine up the sheet), front (looking down the spine) and top, in a frame width by height pixels, with one scale for all three and a ruler along the length.
Import it
import { arrangement } from "@johnmorrisdotca/uchusen-rockets";
Definition
function arrangement(ship: ShipList, frame: { width: number; height: number; }): Arrangement
Parameters
| Name | Type | Description |
|---|---|---|
ship | ShipList | The ship's list. |
frame | { width: number; height: number; } | The room each view has, in pixels. |
Returns
Arrangement
The scale, the size of each view, a scale bar and the length ruler's ticks.
Examples
import { arrangement, SAMPLE_SHIPS } from "@johnmorrisdotca/uchusen-rockets";
const a = arrangement(SAMPLE_SHIPS.scout, { width: 400, height: 900 });
console.log(a.scale.toFixed(2), a.views.map((view) => view.id), a.lengthRuler.step);5.92 [ 'side', 'front', 'top' ] 20What it prints (run when this page was built)