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

ReplayOptionstype

How a replay is set up.

Import it

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

Definition

type ReplayOptions = {
    speed?: number;
    loop?: boolean;
    onChange?: (status: ReplayStatus) => void;
    onEnd?: () => void;
    clock?: ReplayClock;
};

Members

NameTypeDescription
speed (optional)number | undefined

The speed it starts at: 1, the solve's own pace, when left out.

loop (optional)boolean | undefined

Whether it begins again when it ends.

onChange (optional)((status: ReplayStatus) => void) | undefined

Called whenever anything in status changes.

onEnd (optional)(() => void) | undefined

Called once each time the end is reached.

clock (optional)ReplayClock | undefined

The clock to run by.

Examples

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


const value: ReplayOptions = { speed: 2, loop: false, onEnd: () => console.log("Finished") };
console.log(value.speed);
2

What it prints (run when this page was built)

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