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 · Cuboid engine

CuboidReplaySourcetype

What a cuboid replay is made from.

Import it

import type { CuboidReplaySource } from "@johnmorrisdotca/kyuubu/cuboid";

Definition

type CuboidReplaySource = {
    dims: CuboidDims;
    scramble: string;
    solution: string;
    timeMs?: number;
    stepMs?: readonly number[];
};

Members

NameTypeDescription
dimsCuboidDims

The puzzle's width, height and depth.

scramblestring

The scramble, as written.

solutionstring

The solve, as written.

timeMs (optional)number | undefined

How long the solve took, in milliseconds, when that is known.

stepMs (optional)readonly number[] | undefined

How long each step took, in milliseconds, when that is known; one for every step.

Examples

import type { CuboidReplaySource } from "@johnmorrisdotca/kyuubu/cuboid";


const value: CuboidReplaySource = { dims: [2, 3, 3], scramble: "R", solution: "R'", timeMs: 1000 };
console.log(value.dims);
[ 2, 3, 3 ]

What it prints (run when this page was built)

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