Reference · Cube engine and views
cubeNetfunction
The cube unfolded flat, as lines of text: the top above the front, the left, front, right and back in a row, and the bottom below.
U U U
U U U
U U U
L L L F F F R R R B B B
…With colour, each sticker is a block of its colour in place of its letter.
Import it
import { cubeNet } from "@johnmorrisdotca/kyuubu";
Definition
function cubeNet(state: string, n: number, colour?: boolean): string
Parameters
| Name | Type | Description |
|---|---|---|
state | string | The sticker-state string in the package’s face order. |
n | number | The cube’s side length. |
colour (optional) | boolean | Whether the printed cube uses coloured blocks instead of letters. |
Returns
string
The cube unfolded flat, as lines of text: the top above the front, the left, front, right and back in a row, and the bottom below. U U U U U U U U U L L L F F F R R R B B B … With colour, each sticker is a block of its colour in place of its letter.
Examples
import { cubeNet, solvedCube } from "@johnmorrisdotca/kyuubu";
console.log(cubeNet(solvedCube(2), 2)); U U
U U
L L F F R R B B
L L F F R R B B
D D
D DWhat it prints (run when this page was built)