This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
With copying the code from FX Transforms, I might have open a concern from Boris. I will check this: "In section 7.4 of the current 2d transforms editor's draft (no public version of this, so no link, sorry), there is a bunch of text that seems to be defining what to do in terms of 3d transforms. Or so I assume. It doesn't actually say what the notation it's using means. In any case, I suspect that using the first Euler angle to rotate in all three directions is just wrong. -Boris" http://lists.w3.org/Archives/Public/www-style/2011Apr/0467.html Note: The section number is not correct anymore.
The pseudo code in the spec uses euler angles for getting the rotation. Implementations seem to use quaternions to work around singularities with euler. Should we follow implementations? Should animations and transitions get updated as well? See discussions: http://lists.w3.org/Archives/Public/www-style/2011Aug/0652.html http://lists.w3.org/Archives/Public/www-style/2011Aug/0653.html http://lists.w3.org/Archives/Public/www-style/2011Aug/0665.html and http://lists.w3.org/Archives/Public/www-style/2012Feb/0575.html
All people I spoke with agree that we should use quaternions on the pseudo code. At least the code of WebKit and Mozilla seem to follow: http://lists.w3.org/Archives/Public/www-style/2011Aug/0652.html So I will try to add this to the spec. Simon: looks like you were right with [1] ;) [1] https://twitter.com/smfr/status/169494444968648704
A link to the implementations of WebKit and Mozilla: http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp#L294 http://mxr.mozilla.org/mozilla-central/source/layout/style/nsStyleAnimation.cpp#1156
I am looking at this at the moment. I suggest that we mention that the decomposing can be done by using quaternions and give a short description of why using quaternions (just one sentence). After that it just references some books or sites that describe quaternions. I'd remove the code itself and just link to the pseudo code. We maintain this pseudo code and put it into the spec directory. The pseudo code will be using the code from Mozilla and Webkit (they don't differ a lot anyway). Any concerns?
*** Bug 14608 has been marked as a duplicate of this bug. ***
The interpolation code uses quaternions now.