W3C home > Mailing lists > Public > www-style@w3.org > December 2011

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

From: Chris Marrin <cmarrin@apple.com>
Date: Wed, 07 Dec 2011 16:41:20 -0800
Cc: Matt Woodrow <mwoodrow@mozilla.com>, Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style@w3.org
Message-id: <82F8CD62-D341-42A9-8641-22E36011B19D@apple.com>
To: "L. David Baron" <dbaron@dbaron.org>

On Dec 1, 2011, at 1:39 PM, L. David Baron wrote:

> 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.

How do you mean it rotates in the wrong direction? rotate(45deg) and rotate3d(0,0,1, 45deg) both rotate in the same direction, right?

-----
~Chris
cmarrin@apple.com
Received on Thursday, 8 December 2011 00:59:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:47 GMT