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

cuboidPresetfunction

The named cuboid with this key, or undefined.

Import it

import { cuboidPreset } from "@johnmorrisdotca/kyuubu/cuboid";

Definition

function cuboidPreset(key: string): CuboidPreset | undefined

Parameters

NameTypeDescription
keystring

The pressed key, or the cuboid preset key for a lookup.

Returns

CuboidPreset | undefined

The matching preset, or undefined when the key is unknown.

Examples

import { CUBOID_PRESETS, cuboidPreset } from "@johnmorrisdotca/kyuubu/cuboid";

const dims = [2, 3, 3] as const;
console.log(cuboidPreset(CUBOID_PRESETS[0]!.key)?.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.