Reference · Cube engine and views
KeyReadingtype
What a key means: a turn, a depth for the next face letter, or nothing.
Import it
import type { KeyReading } from "@johnmorrisdotca/kyuubu";
Definition
type KeyReading = {
move: CubeMove;
} | {
depth: number;
} | null;
Examples
import type { KeyReading } from "@johnmorrisdotca/kyuubu";
import { readKey } from "@johnmorrisdotca/kyuubu";
const value: KeyReading = readKey("r", false, 3, 1);
console.log(value);{ move: { axis: 0, layer: 2, turns: 3 } }What it prints (run when this page was built)