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

FACE_FRAMESconstant

Which way each face looks, and its rows and columns as the face is seen from outside, in the order above.

Import it

import { FACE_FRAMES } from "@johnmorrisdotca/kyuubu";

Definition

const FACE_FRAMES: Readonly<Record<"U" | "R" | "F" | "D" | "L" | "B", { normal: Vec3; right: Vec3; down: Vec3; }>> = {
    U: { normal: [0, 1, 0], right: [1, 0, 0], down: [0, 0, 1] },
    R: { normal: [1, 0, 0], right: [0, 0, -1], down: [0, -1, 0] },
    F: { normal: [0, 0, 1], right: [1, 0, 0], down: [0, -1, 0] },
    D: { normal: [0, -1, 0], right: [1, 0, 0], down: [0, 0, -1] },
    L: { normal: [-1, 0, 0], right: [0, 0, 1], down: [0, -1, 0] },
    B: { normal: [0, 0, -1], right: [-1, 0, 0], down: [0, -1, 0] },
}

Members

NameTypeDescription
U{ normal: Vec3; right: Vec3; down: Vec3; }
R{ normal: Vec3; right: Vec3; down: Vec3; }
F{ normal: Vec3; right: Vec3; down: Vec3; }
D{ normal: Vec3; right: Vec3; down: Vec3; }
L{ normal: Vec3; right: Vec3; down: Vec3; }
B{ normal: Vec3; right: Vec3; down: Vec3; }

Examples

import { FACE_FRAMES } from "@johnmorrisdotca/kyuubu";

console.log(Object.keys(FACE_FRAMES).slice(0, 8));
[ 'U', 'R', 'F', 'D', 'L', 'B' ]

What it prints (run when this page was built)

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