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

GuideSteptype

The movement a guide asks for now.

Import it

import type { GuideStep } from "@johnmorrisdotca/kyuubu";

Definition

type GuideStep = {
    moves: CubeMove[];
    whole: CubeMove[];
    text: string;
    left: string;
    rotation: boolean;
    index: number;
    total: number;
    stage?: SolveStage;
};

Members

NameTypeDescription
movesCubeMove[]

What is still to turn of it: the whole movement at first, less any layer or quarter already made.

wholeCubeMove[]

The movement as asked for.

textstring

The movement in notation: R', Rw, x.

leftstring

What is still to turn, in notation: 2R once the R of an Rw is made.

rotationboolean

Whether it turns the whole cube, which no drag on a sticker does.

indexnumber

Which movement it is, from 0, in the list or in the method's step.

totalnumber

How many movements the list, or the method's step, has.

stage (optional)SolveStage | undefined

The method's stage it belongs to, following the method.

Examples

import type { GuideStep } from "@johnmorrisdotca/kyuubu";
import { Guide, solvedCube } from "@johnmorrisdotca/kyuubu";

const value: GuideStep = new Guide(solvedCube(3), 3, { moves: "R U" }).next!;
console.log(value.text);
R

What it prints (run when this page was built)

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