Reference · Cube engine and views
CubeThemetype
How a cube looks: its six colours, its plastic, and the shape of a sticker. Everything may be left out, and what is left out stays as it was.
Import it
import type { CubeTheme } from "@johnmorrisdotca/kyuubu";
Definition
type CubeTheme = {
colours?: Partial<Record<CubeFace, string>>;
plastic?: string;
stickerInset?: string;
stickerRadius?: string;
cornerRadius?: string;
};
Members
| Name | Type | Description |
|---|---|---|
colours (optional) | Partial<Record<"U" | "R" | "F" | "D" | "L" | "B", string>> | undefined | Colours for the six faces, by the letter a solved face carries. Any CSS colour. |
plastic (optional) | string | undefined | The colour of the plastic between stickers and inside the cube. |
stickerInset (optional) | string | undefined | How far a sticker sits in from the edge of its square, as a CSS length or percentage of the square. |
stickerRadius (optional) | string | undefined | How round a sticker's corners are, as a CSS length or percentage. |
cornerRadius (optional) | string | undefined | How round the cube's own corners are, as a CSS length on a cube drawn 300px across (it grows and shrinks with the cube): |
Examples
import type { CubeTheme } from "@johnmorrisdotca/kyuubu";
import { CUBE_THEMES } from "@johnmorrisdotca/kyuubu";
const value: CubeTheme = CUBE_THEMES.paper;
console.log(value.plastic);#1f2320What it prints (run when this page was built)