The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Whence this wobble? Reply To: Whence this wobble?


var a = values[0];
var b = values[1];
var c = values[2];
var d = values[3];

var angle = Math.round(Math.atan2(b, a) * (180/Math.PI));

For calculating the rotationX of a 3d matrix, you’d wanna be using the following entries:

if (values.length > 6) var angle = Math.round(Math.atan2(values[6], values[5])*180/Math.PI));
else angle = 0;

This will return an angle between -180 and 180 degrees. Since I’m using all negative angles around a full circle, I’m adding this:

if (angle >= 0) angle -= 360;