Reference · Rockets, variants, parts and the fit check
ScaleBartype
A scale bar: a length in metres, its pixels at the sheet's scale, and the ticks along it.
Import it
import type { ScaleBar } from "@johnmorrisdotca/uchusen-rockets";
Definition
interface ScaleBar {
metres: number;
pixels: number;
ticks: {
at: number;
label: string;
}[];
ratio: string;
}
Members
| Name | Type | Description |
|---|---|---|
metres | number | |
pixels | number | |
ticks | { at: number; label: string; }[] | |
ratio | string |
Examples
import { scaleBar, type ScaleBar } from "@johnmorrisdotca/uchusen-rockets";
const bar: ScaleBar = scaleBar(2, 300);
console.log(bar.metres, bar.ratio);100 1:1890What it prints (run when this page was built)