fofr / css-experiments

CSS, HTML and JS experiments from 2010
https://fofr.github.io/css-experiments/
MIT License
642 stars 909 forks source link

bug in rotation #13

Open marko999 opened 10 years ago

marko999 commented 10 years ago

there is bug in rotation when you combine x and then y rotation in certain order, on next y rotation, cube is rotated by z not by y...steps to reproduce:

  1. press up
  2. press right

repeat until you get this bug

I have created similar box for my own amusement and similar thing happened, I am trying to resolve this problem, if I do, gladly will fork it and fix it

cheers Marko

fofr commented 10 years ago

@joelambert has a good take on this, with a fix, here: http://blog.joelambert.co.uk/2011/05/10/handling-3d-geometry-with-3d-css3-transforms/