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 · Cuboid engine

CuboidPresettype

THE NAMED CUBOIDS: the shapes people know, each with a name, the way it is best seen, and a line on what makes it different. The name is the package's own for the plainer shapes; the shapes themselves are nobody's. Any a × b × c from 1 to 7 is a cuboid whether or not it has a name here.

dims is as the puzzle is first drawn (flat shapes face the reader, tall ones stand); label is its sides in order, so 3×3×2 and 2×3×3 are one shape and are listed once.

Import it

import type { CuboidPreset } from "@johnmorrisdotca/kyuubu/cuboid";

Definition

type CuboidPreset = {
    key: string;
    label: string;
    dims: CuboidDims;
    name: Readonly<Record<KyuubuLanguage, string>>;
    says: Readonly<Record<KyuubuLanguage, string>>;
};

Members

NameTypeDescription
keystring

A kebab-case key: floppy, tall-pillar.

labelstring

Its sides, smallest first: 2×3×3.

dimsCuboidDims

How it is first drawn: width, height and depth.

nameReadonly<Record<KyuubuLanguage, string>>

Its name, and what is special about it, in each language.

saysReadonly<Record<KyuubuLanguage, string>>

Examples

import type { CuboidPreset } from "@johnmorrisdotca/kyuubu/cuboid";
import { CUBOID_PRESETS } from "@johnmorrisdotca/kyuubu/cuboid";

const value: CuboidPreset = CUBOID_PRESETS[0]!;
console.log(value.dims);
[ 3, 2, 1 ]

What it prints (run when this page was built)

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