tallDimensionsfunction
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 it
import { tallDimensions } from "@johnmorrisdotca/meikyuu/levels/tall";
Also exported from: @johnmorrisdotca/meikyuu
Definition
function tallDimensions(shape: MeikyuuShape, width: number): [number, number]
Parameters
| Name | Type | Description |
|---|---|---|
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. |
Returns
[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.
Examples
import { TALL_WIDTHS, tallDimensions } from "@johnmorrisdotca/meikyuu/levels/tall";
console.log(tallDimensions("square",TALL_WIDTHS[0]));[ 6, 9 ]What it prints (run when this page was built)