Re: [css3-3d-transforms] rotations, changes needed...

On Thursday 2011-12-01 13:24 -0800, Chris Marrin wrote:
> On Nov 29, 2011, at 12:13 PM, Matt Woodrow wrote:
> > On 29/11/11 12:41 PM, Chris Marrin wrote:
> >> At risk of confusing the discussion, I'll say that we ARE using the right-hand rule. But that rule applies to the local coordinate space in which the box is being rendered, so the result is that a positive 10 degree rotation causes the box to appear to the viewer as being rotated 10 degrees clockwise. Unfortunately I've never been able to do a decent job explaining this (including just now to Simon). But you know what I mean :-)
> >> 
> >> But when I look at these 4 examples:
> >> 
> >>  rotate(10deg)
> >>  rotateZ(10deg)
> >>  rotate3d(0,0,1, 10deg)
> >>  rotate3d(0,0,-1, -10deg)
> >> 
> >> they all result in a positive 10 degree rotation on the page, in WebKit. And that matches the examples in the SVG spec. Since we mention clockwise rotations everywhere in both the 2D and 3D transform specs, I think they are sufficiently clear.
> >> 
> >> The above rotations work as expected in Safari 5.1, WebKit TOT and the latest Chrome. rotate() and rotateZ() work correctly in the latest Firefox, but both rotate3d() examples rotate counter-clockwise. So I think the only error is rotate3d() in Firefox.
> > 
> > This seems like the right interpretation to me, but I believe the matrix definition for rotate3d() in the spec needs to be updated to reflect this.
> 
> I'll look at it. What error(s) do you see?

Firefox implements the matrix definition of rotate3d that's given
in the spec, and everyone seems to agree that rotates in the wrong
direction.  Given that, I think the fix would be that all the terms
with sin(angle) should have their sign reversed.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Thursday, 1 December 2011 21:40:21 UTC