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 · React components

Kyuubufunction

THE CUBE AS A REACT COMPONENT: a thin wrapper round CubeView, which does the work. It fills the box it is given: with no className that box is a square as wide as its container, and a className must position it (relative or absolute) and give it a size.

Import it

import { Kyuubu } from "@johnmorrisdotca/kyuubu/react";

Definition

function Kyuubu({ ref, className, style, size, state, interactive: interactiveGiven, hint, onTurn, onLook, ...rest }: KyuubuProps): React.JSX.Element

Parameters

NameTypeDescription
optionsKyuubuProps

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

Returns

React.JSX.Element

A React host element that mounts and maintains a CubeView in the browser.

Examples

import { Kyuubu } from "@johnmorrisdotca/kyuubu/react";

import { createElement } from "react";
console.log(createElement(Kyuubu, { size: 3, interactive: true }).props.size);
3

What it prints (run when this page was built)

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