本文へ移動

Kyuubuキューブ

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

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

目次

リファレンス · 直方体の操作

mountCuboidPlayer関数

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

A solve on a cuboid drawn in an element, with its controls.

インポート

import { mountCuboidPlayer } from "@johnmorrisdotca/kyuubu/cuboid/play";

定義

function mountCuboidPlayer(host: HTMLElement, options: CuboidPlayerOptions): CuboidPlayerHandle

引数

名前型説明
hostHTMLElement

The DOM element that receives the view and controls.

optionsCuboidPlayerOptions

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

戻り値

CuboidPlayerHandle

A solve on a cuboid drawn in an element, with its controls.

例

import { mountCuboidPlayer } from "@johnmorrisdotca/kyuubu/cuboid/play";

const host = document.createElement("div");
document.body.append(host);
const player = mountCuboidPlayer(host, { dims: [2, 3, 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 のソースから作成しました。

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