Reference · Cube engine and views
cubeSlotsfunction
Every sticker slot of a cube of this size, in the order its state is written, and the way back from a slot to its place.
Import it
import { cubeSlots } from "@johnmorrisdotca/kyuubu";
Definition
function cubeSlots(n: number): { slots: readonly StickerSlot[]; index: ReadonlyMap<string, number>; }
Parameters
| Name | Type | Description |
|---|---|---|
n | number | The cube’s side length. |
Returns
{ slots: readonly StickerSlot[]; index: ReadonlyMap<string, number>; }
Every sticker slot of a cube of this size, in the order its state is written, and the way back from a slot to its place.
Examples
import { cubeSlots } from "@johnmorrisdotca/kyuubu";
console.log(cubeSlots(3).slots.length);54What it prints (run when this page was built)