本文へ移動

Kyuubuキューブ

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

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

目次

リファレンス · リプレイプレーヤー

mountPlayer関数

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

A solve drawn in an element, with its controls.

インポート

import { mountPlayer } from "@johnmorrisdotca/kyuubu/player";

定義

function mountPlayer(host: HTMLElement, options: PlayerOptions): PlayerHandle

引数

名前型説明
hostHTMLElement

The DOM element that receives the view and controls.

optionsPlayerOptions

Options for this call; omitted fields retain their documented defaults.

戻り値

PlayerHandle

A solve drawn in an element, with its controls.

例

import { mountPlayer } from "@johnmorrisdotca/kyuubu/player";

const host = document.createElement("div");
document.body.append(host);
const player = mountPlayer(host, { size: 3, scramble: "R", solution: "R'", autoplay: false });
console.log(player.plan?.solved);
// Call player.destroy() when removing the player.

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

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