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

parseMovesfunction

A line of notation read back, or null where any of it is not a move on this cube.

Import it

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

Definition

function parseMoves(text: string, n: number): CubeMove[] | null

Parameters

NameTypeDescription
textstring

The text to parse or format.

nnumber

The cube’s side length.

Returns

CubeMove[] | null

A line of notation read back, or null where any of it is not a move on this cube.

Examples

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

console.log(parseMoves("R U2", 3));
[ { 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.