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
| Name | Type | Description |
|---|---|---|
key | string | 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)