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
| Name | Type | Description |
|---|---|---|
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); // 00What it prints (run when this page was built)