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

toTextfunction

A solve as a few plain lines, to paste in a chat or a note:

3x3
scramble: R U2 F'
solve: F U2 R'
time: 12.34

A line is left out where there is nothing to say. fromText reads it back.

Import it

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

Definition

function toText(record: SolveRecord): string

Parameters

NameTypeDescription
recordSolveRecord

The solve record to summarize or write.

Returns

string

A solve as a few plain lines, to paste in a chat or a note: 3x3 scramble: R U2 F' solve: F U2 R' time: 12.34 A line is left out where there is nothing to say. fromText reads it back.

Examples

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

const moves = parseMoves("R U2", 3)!;
const record = { size: 3, scramble: parseMoves("R", 3)!, moves: parseMoves("R'", 3)!, ms: 1000, seed: "docs" };
console.log(toText(record));
3x3
scramble: R
solve: R'
time: 1.00
seed: docs

What it prints (run when this page was built)

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