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 · Cube engine and views

faceOfSlotfunction

The face letter a solved cube shows at this slot.

Import it

import { faceOfSlot } from "@johnmorrisdotca/kyuubu";

Definition

function faceOfSlot(at: number, n: number): CubeFace

Parameters

NameTypeDescription
atnumber

The sticker’s index in the state string.

nnumber

The cube’s side length.

Returns

"U" | "R" | "F" | "D" | "L" | "B"

The face letter a solved cube shows at this slot.

Examples

import { faceOfSlot } from "@johnmorrisdotca/kyuubu";

console.log(faceOfSlot(0, 3));
U

What it prints (run when this page was built)

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