ScaleBar型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A scale bar: a length in metres, its pixels at the sheet's scale, and the ticks along it.
インポート
import type { ScaleBar } from "@johnmorrisdotca/uchusen-rockets";
定義
interface ScaleBar {
metres: number;
pixels: number;
ticks: {
at: number;
label: string;
}[];
ratio: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
metres | number | |
pixels | number | |
ticks | { at: number; label: string; }[] | |
ratio | string |
例
import { scaleBar, type ScaleBar } from "@johnmorrisdotca/uchusen-rockets";
const bar: ScaleBar = scaleBar(2, 300);
console.log(bar.metres, bar.ratio);100 1:1890出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。