Interactive 3D Rubik's Cube with prediction engine, solver helper, and personal best ghost racer.
No installation required. Run directly in browser.
# Open in browser
open index.html- Orbit View: Click and drag empty space around cube.
- Rotate Face: Click and drag a colored tile directly on the cube.
- Keyboard Shortcuts: Press
U,D,F,B,L,R. HoldShiftfor counter-clockwise.
- Optimal Solve: Shows the minimum moves required to solve from the current state in real-time.
- Click eyeball button (
bottom: 10rem) to open. - Click keypad buttons or type sequence (e.g.,
R U R' U') to preview moves. - Click Play to animate the preview sequence.
- Click Apply to execute the sequence on the main interactive cube.
- Click ghost button (
bottom: 14rem) to toggle. - Loads personal best (PB) solve from
localStorage(runs default 6s solve if no PB exists). - Click Scramble to load the exact scramble configuration.
- Ghost starts playback when you make your first move.
- HUD shows live move and time deltas against your ghost.
Class RubiksCube provides standard interface:
const cube = new RubiksCube(container, {
rotationSpeed: 300,
enableUI: true
});
cube.scramble(20); // scramble
cube.executeMove('R', 1); // rotate Right face clockwise
cube.undo(); // undo move
cube.solve(); // run solver