Left-click and drag with your mouse or touchpad to move the cube.
How it works: It uses 3D projection formulas to find x and y coordinates for a 3-dimensional wireframe of the cube. It then connects these vertices with the pen tool and adds the lines in between that make it a Rubik's cube. To shade the sides, it must first know which sides are visible and which are hidden. The visible sides are worked out based on the rotation and tilt of the cube and stored in a list. Then, 6 shading sprites fill in the visible sides with a parallelogram shading algorithm. They use a brute-force method that can be called "loop unrolling". Instead of shading with many pen strokes in a loop block (such as forever, repeat until, etc), each pen stroke is explicitly programmed out in one giant long script. The whole "unrolled loop" then runs instantly, instead of with a minor delay between each pen stroke. This reduces the render time of the cube dramatically, from ~1.25 sec to (at best) 1/40th of a second--fast enough to render in realtime.