本文へ移動

Kyuubuキューブ

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

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

目次

リファレンス · キューブのエンジンと表示

MoveListHandle型

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

A list on the page.

インポート

import type { MoveListHandle } from "@johnmorrisdotca/kyuubu";

定義

type MoveListHandle = {
    readonly element: HTMLElement;
    setCurrent(index: number | null): void;
    setGroups(groups: readonly MoveListGroup[], current?: number | null): void;
    setLocale(locale: KyuubuLanguage): void;
    focus(): void;
    destroy(): void;
};

メンバー

名前型説明
elementHTMLElement

The element the list is drawn in.

setCurrent(index: number | null): void

Mark the move just made, counted across every run from 0, or none with null; it is scrolled into view.

setGroups(groups: readonly MoveListGroup[], current?: number | null): void

Other runs of moves in place of those showing.

setLocale(locale: KyuubuLanguage): void
focus(): void

Put the keyboard's focus on the move just made.

destroy(): void

Take it off the page, with every listener.

例

import type { MoveListHandle } from "@johnmorrisdotca/kyuubu";
import { mountMoveList } from "@johnmorrisdotca/kyuubu";

const value: MoveListHandle = mountMoveList(document.createElement("div"), { groups: [{ label: "Solve", items: ["R"] }] });
console.log(value.element.tagName);

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

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