本文へ移動

Kyuubuキューブ

CSS 3Dのキューブをタッチ、キー、回転記号で回します。シードでスクランブルを再現し、名前付きの手順で解き方を追えます。

「キューブ」は、英語のcubeを表す日本語の表記です。 名前について(英語)

目次

リファレンス · Reactコンポーネント

KyuubuMovesProps型

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

The props of KyuubuMoves: every option of the list, and the box's className and style.

インポート

import type { KyuubuMovesProps } from "@johnmorrisdotca/kyuubu/react";

定義

type KyuubuMovesProps = MoveListOptions & {
    className?: string;
    style?: CSSProperties;
    ref?: Ref<MoveListHandle>;
};

メンバー

名前型説明
groupsreadonly MoveListGroup[]

The runs of moves, in order.

current (省略可)number | null | undefined

The move just made, counted across every run from 0, or null for none.

locale (省略可)KyuubuLanguage | undefined

English or Japanese: for the words of each move when none is given, and for the list's own name. The page's lang when left out.

onPick (省略可)((index: number, group: number, at: number) => void) | undefined

Called when a move is chosen, by a press or a key: its place counted across every run from 0, its run and its place in the run.

label (省略可)string | undefined

What a screen reader calls the whole list. "The moves" in the list's language when left out.

className (省略可)string | undefined
style (省略可)CSSProperties | undefined
ref (省略可)Ref<MoveListHandle> | undefined

例

import type { KyuubuMovesProps } from "@johnmorrisdotca/kyuubu/react";


const value: KyuubuMovesProps = { groups: [{ label: "Solve", items: ["R", "R'"] }], current: 0 };
console.log(value.current);
0

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

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

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