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

clothVarsfunction

A cloth as CSS variables; nothing for a name that is not a cloth, so the defaults stay.

Import it

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

Definition

function clothVars(cloth: string | undefined | null): Record<`--kyuubu-player-${string}`, string>

Parameters

NameTypeDescription
clothstring | null | undefined

A built-in cloth name; an unknown name leaves the defaults.

Returns

Record<`--kyuubu-player-${string}`, string>

The CSS variables to set on the element, or an empty object.

Examples

import { clothVars } from "@johnmorrisdotca/kyuubu";
console.log(clothVars("green"));
{ '--kyuubu-player-felt': '#2f5d4a' }

What it prints (run when this page was built)

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