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

cubeNetfunction

The cube unfolded flat, as lines of text: the top above the front, the left, front, right and back in a row, and the bottom below.

    U U U
    U U U
    U U U
L L L F F F R R R B B B
…

With colour, each sticker is a block of its colour in place of its letter.

Import it

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

Definition

function cubeNet(state: string, n: number, colour?: boolean): string

Parameters

NameTypeDescription
statestring

The sticker-state string in the package’s face order.

nnumber

The cube’s side length.

colour (optional)boolean

Whether the printed cube uses coloured blocks instead of letters.

Returns

string

The cube unfolded flat, as lines of text: the top above the front, the left, front, right and back in a row, and the bottom below. U U U U U U U U U L L L F F F R R R B B B … With colour, each sticker is a block of its colour in place of its letter.

Examples

import { cubeNet, solvedCube } from "@johnmorrisdotca/kyuubu";

console.log(cubeNet(solvedCube(2), 2));
    U U
    U U
L L F F R R B B
L L F F R R B B
    D D
    D D

What it prints (run when this page was built)

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