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

cuboidMiddleMovefunction

The middle layer of an odd side, turned as M, E or S: the move, or why not. An even side has none.

Import it

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

Definition

function cuboidMiddleMove(letter: "M" | "E" | "S", amount: "cw" | "half" | "ccw", dims: CuboidDims): CuboidReading

Parameters

NameTypeDescription
letter"M" | "E" | "S"

The slice letter M, E or S; whole-cube turns use x, y or z.

amount"cw" | "half" | "ccw"

The turn direction: cw, half or ccw.

dimsCuboidDims

The cuboid’s x, y and z dimensions, in that order.

Returns

CuboidReading

The middle layer of an odd side, turned as M, E or S: the move, or why not. An even side has none.

Examples

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

const dims = [2, 3, 3] as const;
console.log(cuboidMiddleMove("M", "half", dims));
{ fault: 'no-such-layer' }

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kyuubu 1.14.1.