This repository contains a 3D Rubik's Cube game built using Three.js. It provides an interactive experience where users can manipulate the cube and solve it just like a physical Rubik's Cube.
- Undo: Revert the last move to correct mistakes.
- Reset: Reset the cube to its solved state.
- Scramble: Randomly shuffle the cube for a new challenge.
- Drag to Rotate: Click and drag the cube to rotate its faces interactively.
- Clone the repository:
git clone https://github.com/ridolud/rd-playground-rubik.git- Navigate to the project directory:
cd rd-playground-rubik- Install dependencies using pnpm:
pnpm install- Start the development server with Vite:
pnpm run dev- Open your browser and navigate to the provided local development URL to view the project.
- Three.js for 3D rendering.
- JavaScript for game logic.
- Use your mouse to drag and rotate the cube.
- Click on a face to rotate it.
- Use the provided buttons to undo, reset, or scramble the cube.
- Keyboard shortcuts:
[Esc]: Restart the game.[F]: Toggle faces helper.[Ctrl + Z]: Undo the last move.[S]: Scramble the cube.
Enjoy solving the Rubik's Cube!