Click and drag mouse to rotate the Rubik's cube. Hover over the side you want to turn with your mouse, and then press the left arrow to rotate counterclockwise or the right arrow to rotate clockwise. Hold the space key to mix the cube. Remember, these arrows do not always rotate the sides left and right, they rotate them counterclockwise and clockwise, so sometimes, the left arrow might seem like it is turning a face right, and vice versa.
I used trig to make this project 3D. It took me kind of a long time, so please like and favorite. If you use this code, please put my name in the credits.