Skip to the content

Kyuubuキューブ

Turn CSS 3D cubes by touch, keys or notation, reproduce a scramble from a seed, and follow a solve one named step at a time.

Kyuubu (キューブ) is the Japanese spelling of cube. About the name

Contents

Reference · Replay player

mountPlayerfunction

A solve drawn in an element, with its controls.

Import it

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

Definition

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

Parameters

NameTypeDescription
hostHTMLElement

The DOM element that receives the view and controls.

optionsPlayerOptions

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

Returns

PlayerHandle

A solve drawn in an element, with its controls.

Examples

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.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kyuubu 1.14.1.