Reference · Load level collections
loadTsunagiLevelsfunction
A size's levels in a set, loaded once and kept: the first set's by default, or the ones with portals.
Import it
import { loadTsunagiLevels } from "@johnmorrisdotca/tsunagi/levels";
Definition
function loadTsunagiLevels(size: number, set?: TsunagiSet): Promise<readonly LevelRow[]>
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The number of cells on each side of the board. |
set (optional) | TsunagiSet | The native level set or palette specified by the signature. |
Returns
Promise<readonly LevelRow[]>
A size's levels in a set, loaded once and kept: the first set's by default, or the ones with portals.
Examples
import { loadTsunagiLevels } from "@johnmorrisdotca/tsunagi/levels";
console.log((await loadTsunagiLevels(4)).length);192What it prints (run when this page was built)