Skip to the content

Karakuriからくり

Play eight native puzzles, run bounded searches, step deterministic physics and mount a canvas player controlled by pointer or keyboard.

Karakuri is the Japanese word からくり for a mechanism or ingenious device. About the name

Contents

Reference · Puzzle board element

defineBoardfunction

Defines the board or a subclass under a custom tag. Server-safe and idempotent.

Import it

import { defineBoard } from "@johnmorrisdotca/karakuri/element";

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

Definition

function defineBoard(tagName?: string, registry?: CustomElementRegistry | undefined): void

Parameters

NameTypeDescription
tagName (optional)string

The tag to define; karakuri-board by default.

registry (optional)CustomElementRegistry | undefined

The page registry, or undefined on a server.

Examples

import { defineBoard } from "@johnmorrisdotca/karakuri/element";
defineBoard();
console.log(typeof defineBoard);
function

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/karakuri 0.2.1.