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

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

From: Simon Fraser <smfr@me.com>
Date: Fri, 25 Nov 2011 10:38:11 -0800
Cc: "www-style@w3.org list" <www-style@w3.org>, Chris Marrin <cmarrin@apple.com>
Message-id: <60EA7B16-658A-42C4-A8D2-390928C40205@me.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
On Nov 25, 2011, at 5:33 am, Daniel Glazman wrote:

> 
> Spec says "positive z values conceptually rising perpendicularly out of
> the window toward the user and negative z values falling into the
> window away from the user"
> 
> Spec also says in [1]:
> 
>  rotate(d) specifies a 2D rotation defined in [2].
>     On screen    : clockwise
>     Around Z axis: counter-clockwise
> 
> 
>  rotate3D(0, 0, 1, d) specifies a clockwise rotation around the Z
>    axis
>     Around Z axis: clockwise
>     On screen    : counter-clockwise

This seems intuitive, but results in this unexpected difference from a simple rotate(). For rotate(d) to match rotate3D(0, 0, 1, d) I think we have to say that the angle in rotate3D() is counter-clockwise around the axis.

>  rotateZ(d) specifies a clockwise rotation around the Z axis
>     Around Z axis: clockwise
>     On screen    : counter-clockwise

I think this is an error. rotate() and rotateZ() should be synonyms.

> So according to the spec:
> 
>  rotate(10deg)
>  rotate3d(0, 0, -1, 10deg)
>  rotate3d(0, 0, 1, -10deg)
>  rotateZ(-10deg)

I'd expect the following to all look the same:

 rotate(10deg)
 rotate3d(0, 0, 1, 10deg)
 rotate3d(0, 0, -1, -10deg)
 rotateZ(10deg)

but they don't in WebKit. I'll talk to Chris Marrin about what the expected behavior is.

Simon
Received on Friday, 25 November 2011 18:38:54 GMT

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