tallDimensions関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The columns and rows of a maze of shape for the size width (a square maze of that size is width by one and a half times that): as near 2:3 as
its cells allow, and with about as many cells as that square maze has (width times one and a half width), so that the sizes are as big to
draw whatever the shape is. A hexagon or a triangle has smaller cells, so the same number of them fills the same container with bigger cells.
インポート
import { tallDimensions } from "@johnmorrisdotca/meikyuu/levels/tall";
ほかのエクスポート元: @johnmorrisdotca/meikyuu
定義
function tallDimensions(shape: MeikyuuShape, width: number): [number, number]
引数
| 名前 | 型 | 説明 |
|---|---|---|
shape | "square" | "circle" | "hex" | "triangle" | "heart" | "leaf" | "star" | "ring" | "diamond" | "cross" | "moon" | "hexagon" | "pyramid" | The supported native flat-grid geometry or cut-out shape. |
width | number | The native width in cells or pixels specified by this signature. |
戻り値
[number, number]
The columns and rows of a maze of shape for the size width (a square maze of that size is width by one and a half times that): as near 2:3 as its cells allow, and with about as many cells as that square maze has (width times one and a half width), so that the sizes are as big to draw whatever the shape is. A hexagon or a triangle has smaller cells, so the same number of them fills the same container with bigger cells.
例
import { TALL_WIDTHS, tallDimensions } from "@johnmorrisdotca/meikyuu/levels/tall";
console.log(tallDimensions("square",TALL_WIDTHS[0]));[ 6, 9 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。