Skip to the content

Meikyuu迷宮

Generate seeded mazes and arrow puzzles, follow numbered levels, and play on flat grids or three-dimensional surfaces.

Meikyuu is the Japanese word 迷宮 for labyrinth. About the name

Contents

Reference · Puzzle elements

MeikyuuElementOptionstype

Host callbacks; the same actions emit native events.

Import it

import type { MeikyuuElementOptions } from "@johnmorrisdotca/meikyuu/element";

Also exported from: @johnmorrisdotca/meikyuu/element/define

Definition

type MeikyuuElementOptions = Pick<MeikyuuMountOptions, "onMove" | "onSolve" | "onKey" | "onUnlock" | "onBump" | "onLose" | "onStones" | "wall" | "line" | "board" | "trail" | "recipe">;

Members

NameTypeDescription
board (optional)MeikyuuBoardLook | "paper" | "wood" | "green" | "blue" | "red" | "black" | undefined

A board by name, or its colours.

recipe (optional)string | MazeRecipe | ArrowRecipe | MixedRecipe | undefined

A recipe of your own, as its code or as an object, instead of a level.

trail (optional)"green" | "blue" | "red" | "violet" | "orange" | (string & {}) | undefined

The line's colour: one of the named ones, or any CSS colour.

wall (optional)number | undefined

The thickness of a wall, in cells. Default 0.12.

line (optional)number | undefined

The thickness of the line, in cells. Default 0.34.

onMove (optional)((detail: MeikyuuEventDetail) => void) | undefined
onSolve (optional)((detail: MeikyuuEventDetail) => void) | undefined
onKey (optional)((detail: MeikyuuEventDetail) => void) | undefined
onUnlock (optional)((detail: MeikyuuEventDetail) => void) | undefined
onBump (optional)((detail: MeikyuuEventDetail) => void) | undefined
onLose (optional)((detail: MeikyuuEventDetail) => void) | undefined
onStones (optional)((detail: MeikyuuEventDetail) => void) | undefined

A stone was laid or taken up, or the stones were cleared, restarted or undone.

Examples

import type { MeikyuuElementOptions } from "@johnmorrisdotca/meikyuu/element";
const options: MeikyuuElementOptions = {};
console.log(Object.keys(options).length); // 0
0

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/meikyuu 3.2.0.