Three.js rotation problem 3d cube

Im trying to create a 3D rubik cube using three.js, i created the mesh in blender and import then to three.js.
When i do a rotation in a single axis it works perfectly then problem comes when i apply a second rotation in a different axis, like rotation x + rotation z, how can i resolve this?

Thanks in advance

Code - Glitch :・゚✧
Live -