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

parseSolvefunction

A solve, or a scramble, read from the way it is written, for a cube of this size. Everything it could read comes back even when it stops at a fault, so a page can show how far it got.

Import it

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

Definition

function parseSolve(text: string, n: number): SolveReading

Parameters

NameTypeDescription
textstring

The text to parse or format.

nnumber

The cube’s side length.

Returns

SolveReading

A solve, or a scramble, read from the way it is written, for a cube of this size. Everything it could read comes back even when it stops at a fault, so a page can show how far it got.

Examples

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

console.log(parseSolve("R U2", 3));
{
  ok: true,
  steps: [
    { text: 'R', moves: [Array], counts: true, at: 0 },
    { text: 'U2', moves: [Array], counts: true, at: 2 }
  ]
}

What it prints (run when this page was built)

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