3D rotation changes shape of object?

I am developing a WebGL sketch on openprocessing.org and I’ve run into a problem. When I apply a specific sequence of rotations my object retains its shape until I get to one rotation. Applying that rotation causes a drastic change in the shape of my object. Can someone explain to me what’s going on and tell me how I can fix the problem?

My sketch is here: Platonia - OpenProcessing

Just press any key two times to step through the first two rotations, which work as expected. Then press any key one more time and watch the strange change in the shape of the object as it rotates.

The part of the code that causes the problem is below the comment “// rotating into position to see the cube”.

Thank you!
–Ken

You are missing a break; statement and the end of the case presentationModes.cube: case.

1 Like

Duh… A stupid error I needed a second pair of eyes to see. Thank you very much!!