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 · Controllers and canvas player

KARAKURI_STYLEconstant

THE STYLE the player wears: the colours as custom properties on .karakuri (light, and dark when the page asks for it by prefers-color-scheme or by data-theme="dark" on the root), the layout of the bar, the play area and the buttons, and the one rule that matters for games played with fingers: nothing on the board can be selected, dragged or double-tapped, and the play area stops the page scrolling under a finger only for the games that read a finger's whole path.

Import it

import { KARAKURI_STYLE } from "@johnmorrisdotca/karakuri/play";

Definition

const KARAKURI_STYLE: string

Examples

import { KARAKURI_STYLE } from "@johnmorrisdotca/karakuri/play";
console.log(KARAKURI_STYLE.includes("kk-canvas:focus-visible"));
true

What it prints (run when this page was built)

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