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
| Name | Type | Description |
|---|---|---|
key | string | A kebab-case key: |
label | string | Its sides, smallest first: |
dims | CuboidDims | How it is first drawn: width, height and depth. |
name | Readonly<Record<KyuubuLanguage, string>> | Its name, and what is special about it, in each language. |
says | Readonly<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)