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_PROPERTIESconstant

The CSS custom property that colours each face, where no colour is given in code: set it on the cube's element or any ancestor.

Import it

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

Definition

const FACE_PROPERTIES: Readonly<Record<"U" | "R" | "F" | "D" | "L" | "B", string>> = {
    U: "--kyuubu-up",
    R: "--kyuubu-right",
    F: "--kyuubu-front",
    D: "--kyuubu-down",
    L: "--kyuubu-left",
    B: "--kyuubu-back",
}

Members

NameTypeDescription
Ustring
Rstring
Fstring
Dstring
Lstring
Bstring

Examples

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

console.log(FACE_PROPERTIES);
{
  U: '--kyuubu-up',
  R: '--kyuubu-right',
  F: '--kyuubu-front',
  D: '--kyuubu-down',
  L: '--kyuubu-left',
  B: '--kyuubu-back'
}

What it prints (run when this page was built)

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