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

KeepScramblingHandletype

What a running loop can be told.

Import it

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

Definition

type KeepScramblingHandle = {
    start(): void;
    stop(): void;
    setPace(pace: number | ScramblePace): void;
    readonly running: boolean;
    destroy(): void;
};

Members

NameTypeDescription
start(): void

Carry on, or begin. Does nothing while the page is hidden or motion is reduced; it starts when they allow it.

stop(): void

Stop turning. The cube stays as it is.

setPace(pace: number | ScramblePace): void

Change how often it turns, at once.

runningboolean

Whether it has been asked to run and nothing is holding it back.

destroy(): void

Stop for good and let go of the page.

Examples

import type { KeepScramblingHandle } from "@johnmorrisdotca/kyuubu";
import { keepScrambling } from "@johnmorrisdotca/kyuubu";

const value: KeepScramblingHandle = keepScrambling({ size: 3, busy: false, turn: () => {} }, { autoplay: false });
console.log(value.running);

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