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

cubeSlotsfunction

Every sticker slot of a cube of this size, in the order its state is written, and the way back from a slot to its place.

Import it

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

Definition

function cubeSlots(n: number): { slots: readonly StickerSlot[]; index: ReadonlyMap<string, number>; }

Parameters

NameTypeDescription
nnumber

The cube’s side length.

Returns

{ slots: readonly StickerSlot[]; index: ReadonlyMap<string, number>; }

Every sticker slot of a cube of this size, in the order its state is written, and the way back from a slot to its place.

Examples

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

console.log(cubeSlots(3).slots.length);
54

What it prints (run when this page was built)

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