labelsOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The labels of a ship: one for every named section of every module, each pointing at its part, alternating sides so a sheet can carry them on both sides. A label's point follows the module wherever the list puts it.
インポート
import { labelsOf } from "@johnmorrisdotca/uchusen-rockets";
定義
function labelsOf(ship: ShipList): Label[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
ship | ShipList | The ship's list. |
戻り値
Label[]
The labels, bottom of the spine first.
例
import { labelsOf, SAMPLE_SHIPS } from "@johnmorrisdotca/uchusen-rockets";
const labels = labelsOf(SAMPLE_SHIPS.hauler);
console.log(labels.length, labels.filter((label) => label.side === "left").length);93 46出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。