I have this type of CSS transform:
transform: translate3d(a1, b1, c1) rotate[X,Y,Z](r1) translate3d(a2, b2, c2) rotate[X,Y,Z](r2) ...
- The rotations can be rotateX, rotateY or rotateZ.
- I always have a translate3d followed by a rotate.
- a, b, c values are in em.
- r values are in degrees or radients.
I would like to find a way to reduce this into only 1 translate and 1 rotate (so that during animations the item does not go looping around):
transform: translate3d(...) rotate3d(...);
Is there a lib able to solve that, or what would be the mathematical formulas to do it?