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

movementTextfunction

A movement in notation: one layer as moveNotation writes it; several layers from a face inwards, about one axis and as far, as a wide turn (Rw, 3Rw'); anything else as its moves one after another.

Import it

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

Definition

function movementText(moves: readonly CubeMove[], n: number): string

Parameters

NameTypeDescription
movesreadonly CubeMove[]

The turns, in their execution order.

nnumber

The cube’s side length.

Returns

string

A movement in notation: one layer as moveNotation writes it; several layers from a face inwards, about one axis and as far, as a wide turn (Rw, 3Rw'); anything else as its moves one after another.

Examples

import { movementText, parseMoves } from "@johnmorrisdotca/kyuubu";

const moves = parseMoves("R U2", 3)!;
console.log(movementText(moves, 3));
R U2

What it prints (run when this page was built)

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