Reference · Surface maze rules and geometry
cachedSolidGridfunction
The grid of a solid cut n ways, kept: a grid is never changed, and a script that makes thousands of mazes of one size builds it once.
Import it
import { cachedSolidGrid } from "@johnmorrisdotca/meikyuu/3d";
Definition
function cachedSolidGrid(kind: SolidKind, n: number): SolidGrid
Parameters
| Name | Type | Description |
|---|---|---|
kind | SolidKind | The native puzzle family or surface shape specified by this signature. |
n | number | The level number, random bound or surface subdivision specified by the signature. |
Returns
SolidGrid
The grid of a solid cut n ways, kept: a grid is never changed, and a script that makes thousands of mazes of one size builds it once.
Examples
import { cachedSolidGrid } from "@johnmorrisdotca/meikyuu/3d";
console.log(cachedSolidGrid("cube",2).cells);24What it prints (run when this page was built)