I didn’t go too deep into your code, but still there is one point which for sure is problematic : you are using euler rotations on your cubes, instead of Quaternion. If you need to rotate meshes of 90° in 3 axis, then forget about Euler Rotation, and go 100% Quaternion. Otherwise you will hit the gymbal lock issue. I would even say your project is the perfect example of a place where Quaternions are needed
Have a look at this topic in which I had explained a bit the problem :
I fixed the playground I originally posted in your other thread:
Edit: added smooth rotation:
Edit2: added engine and scene anti-aliasing (at some cost in fps dipping to 100 on my machine)
and added easing function so it’s not so robotic. Still seeing some edges jump a pixel during some rotations. added a light from the bottom as well. For better performance, I could implement object rotation instead of Arc Camera and going back to a single light, but it works well for now.
Edit3: and maybe final edit. This uses a persistant animation on the sideNode object that is updated and started each tap.