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

cuboidMoveNotationfunction

A move as a person writes it on this cuboid: R, R', R2, 2U2, M2. The move should be one the cuboid can make.

Import it

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

Definition

function cuboidMoveNotation(move: CuboidMove, dims: CuboidDims): string

Parameters

NameTypeDescription
moveCuboidMove

The turn to apply, name or invert.

dimsCuboidDims

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

Returns

string

A move as a person writes it on this cuboid: R, R', R2, 2U2, M2. The move should be one the cuboid can make.

Examples

import { cuboidMoveNotation, parseCuboidMove } from "@johnmorrisdotca/kyuubu/cuboid";

const dims = [2, 3, 3] as const;
const cmove = parseCuboidMove("R", dims)!;
console.log(cuboidMoveNotation(cmove, dims));
R

What it prints (run when this page was built)

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