Reputation: 2887
I'm building a 3D content slider jQuery plugin and have a strange behaviour with Firefox where it is rotating from -90deg to -180deg through 270deg in the opposite direction. I am aware that some of this stuff is experimental but I have not been able to find any other documentation regarding this issue, if in fact it is an issue.
Any help is greatly appreciated.
Demo of the issue (view in webkit and FF latest): http://jsbin.com/iwokok/8/ The plugin: https://github.com/p-m-p/jquery-box-slider
EDIT: Bug logged with Mozilla You may track the status of the bug report at https://bugzilla.mozilla.org/show_bug.cgi?id=769892
Upvotes: 4
Views: 1010
Reputation: 6106
If you think that you have found a bug with Firefox, then you should file a bug on the Firefox bug tracker:
Upvotes: 1
Reputation: 35064
You are interpolating between a transform that rotates and then translates and a transform that translates and then rotates.
When the types of the transform functions in the two lists don't match up, per spec both transforms are collapsed into a single transform matrix and the interpolation is performed on the matrices.
In the matrix representation, there is no difference between -180deg and 180deg. So the interpolation can end up looking like it's going from -90deg to 180deg, depending on the exact interpolation method chosen (last I checked, the 3d transform spec doesn't actually define the exact interpolation method for the matrix).
In general, if you want reproducible results with transform interpolations that don't depend on floating-point errors and various intermediate computations, you want to interpolate between transform lists that have the same functions in the same order.
Upvotes: 0