Skip to content

marethyu/rubik2x2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interactive Pocket Cube

Try the live demo here!

Built with C++ and SDL2 only. The handmade 3D software renderer used in this project can be found here.

Build instructions

Make sure you have g++, GNU Make, SDL2, and Emscripten installed.

Run Make exe to create an executable program. Use Make all (Make test if you want to test) to generate a HTML file.

To test the generated HTML file locally, run python -m http.server and go to http://localhost:8000/index.html

Controls

  • Left mouse button + drag = rotate the whole cube
  • Right mouse button + drag = rotate one of the cube layers
  • s key = scramble the cube