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

CubeViewEventstype

What a cube tells the listeners on adds: a turn a person made, with the stickers after it; and the view turned, in degrees.

Import it

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

Definition

type CubeViewEvents = {
    turn: (move: CubeMove, state: string) => void;
    look: (yaw: number, pitch: number) => void;
};

Members

NameTypeDescription
turn(move: CubeMove, state: string) => void
look(yaw: number, pitch: number) => void

Examples

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


const value: CubeViewEvents = { turn: (move, state) => console.log(move, state), look: (yaw, pitch) => console.log(yaw, pitch) };
console.log(Object.keys(value));
[ 'turn', 'look' ]

What it prints (run when this page was built)

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