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

ReplayStatustype

What a replay tells whoever is showing it.

Import it

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

Definition

type ReplayStatus = {
    position: number;
    total: number;
    playing: boolean;
    ended: boolean;
    scrambleAt: number;
    scrambleTotal: number;
    speed: number;
    loop: boolean;
    elapsedMs: number;
};

Members

NameTypeDescription
positionnumber

How many steps have been made: 0 on the scrambled cube, total at the end.

totalnumber

How many steps the solve has.

playingboolean

Whether it is running.

endedboolean

Whether it has reached the end.

scrambleAtnumber

How many steps of the scramble have been made: all of them (scrambleTotal) unless the viewer has gone back into it.

scrambleTotalnumber

How many steps the scramble has.

speednumber

The speed it runs at: 1 is the solve's own pace.

loopboolean

Whether it begins again when it ends.

elapsedMsnumber

The time into the solve at its own pace, in milliseconds.

Examples

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


const value: ReplayStatus = { position: 0, total: 2, playing: false, ended: false, scrambleAt: 1, scrambleTotal: 1, speed: 1, loop: false, elapsedMs: 0 };
console.log(value.position);
0

What it prints (run when this page was built)

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