Rotate the cube around the X and Y axes using the mouse. To best see how the rotation works, move the mouse backwards and forwards or up and down through the centre of the screen. The changes to the code are small.
3D Tutorial Studio: https://scratch.mit.edu/studios/5040029/ Huge thanks to @TheLogFather for his "Faster Triangle Filler" https://scratch.mit.edu/projects/24828481/ 3D Rotation theory from Wikipedia: https://en.wikipedia.org/wiki/Rotation_matrix