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

On Nov 25, 2011, at 11:46 AM, L. David Baron wrote:

> On Friday 2011-11-25 20:21 +0100, Daniel Glazman wrote:
>> Le 25/11/11 19:38, Simon Fraser a écrit :
>>> I'd expect the following to all look the same:
>>> rotate(10deg)
>>> rotate3d(0, 0, 1, 10deg)
>> Exactly. So rotate3d() that is clockwise around the axis in the spec
>> should be counter-clockwise, to be clockwise on the screen. What I said
>> in my original message.
> Does anything define what it means to be clockwise around an axis?
> Clockwise and counterclockwise make sense in terms of a plane and an
> observer on one side of that plane, but I don't know what they mean
> in terms of an axis.  Can we use the right-hand rule instead?  Or
> can we define that the relevant axis points from the plane to the
> observer or vice-versa?

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:

	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.


Received on Monday, 28 November 2011 23:41:50 UTC