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

decodeCubeMovesfunction

The moves written in a code, or null where any of it is not a move.

Import it

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

Definition

function decodeCubeMoves(code: string): CubeMove[] | null

Parameters

NameTypeDescription
codestring

The encoded moves or standard notation to read.

Returns

CubeMove[] | null

The moves written in a code, or null where any of it is not a move.

Examples

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

const moves = parseMoves("R U2", 3)!;
console.log(decodeCubeMoves(encodeCubeMoves(moves)));
[ { axis: 0, layer: 2, turns: 3 }, { axis: 1, layer: 2, turns: 2 } ]

What it prints (run when this page was built)

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