Experimental, still a work in progress, etc.
Click and drag along the edge of a face to perform a rotation
Unreasonable mode simply changes the maximum cube size from 100 to 2000
Shuffle will make 10n
moves on an n
x n
x n
cube
Some controls are removed on the WASM target
Build command written from inside the web
dir
npx wasm-pack build "../puzzle-cube-ui" --target web --out-name web --out-dir ../web/pkg
Files built into web/pkg/
, which can be hosted by
npm run serve
Then visit http://localhost:8080
Demos of basic notation being parsed and applied to a newly created cube
let mut cube = Cube::create(3);
let sequence = "F R' U' F' U L' B U' B2 U' F' R' B R2 F U L U";
perform_sequence(sequence, &mut cube).unwrap();
print!("{cube}");
let mut cube = Cube::create(3);
let sequence = "R2 L2 F2 B2 U2 D2";
perform_sequence(sequence, &mut cube).unwrap();
print!("{cube}");
Large cubes can be created by providing a larger side length, and cubies can each be given a unique character to keep track of exactly where they move as moves are applied
Note that side length is limited to a maximum of 8 when using unique characters to avoid leaving the basic ASCII range (and trying to use the DEL control code in a cubie)
let mut cube = Cube::create_with_unique_characters(8.try_into()?);
print!("{cube}");