本文へ移動

Karakuriからくり

8つの標準のパズルで遊び、探索や再現できる物理を使い、ポインターやキーボードで操作する盤を表示できます。

「からくり」は、仕組みや工夫した装置を表す言葉です。 名前について(英語)

目次

リファレンス · 操作とキャンバスの表示

KARAKURI_STYLE定数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

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 { KARAKURI_STYLE } from "@johnmorrisdotca/karakuri/play";

定義

const KARAKURI_STYLE: string

例

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/karakuri 0.2.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。