W3C home > Mailing lists > Public > www-style@w3.org > July 2012

Re: [css3-transforms] Should rotate3d be listed as a primitive?

From: David Zbarsky <dzbarsky@gmail.com>
Date: Mon, 2 Jul 2012 16:08:04 -0700
Message-ID: <CAF-RrDt+X3+piYLeekU=Sr_M+Jo_w2Yz55LL07uCGcTq9ueqQw@mail.gmail.com>
To: Dirk Schulze <dschulze@adobe.com>
Cc: Aryeh Gregor <ayg@aryeh.name>, "www-style@w3.org" <www-style@w3.org>
I think we should have rotate3d be a primitive for rotateX, rotateY,
rotateZ, and rotate.  They can all be converted to a rotate3d with the
correct axis.
Then, rotate3d can normalize the axes, (account for opposite axes if
desired), and if the axes for start and end match up, linearly interpolate
the angle.
If the axes do not match, the start and end states can be converted to
matrices and interpolated as such.

On Mon, Jul 2, 2012 at 7:46 AM, Dirk Schulze <dschulze@adobe.com> wrote:

>
> On Jul 2, 2012, at 2:52 PM, Aryeh Gregor wrote:
>
> > On Thu, Jun 14, 2012 at 12:17 PM, David Zbarsky <dzbarsky@gmail.com>
> wrote:
> >> Rotate3d is not listed as transform function primitive at
> >> http://dev.w3.org/csswg/css3-transforms/#transform-primitives, yet
> >> rotate3d(1, 1, 1, 0) is provided as an example of an identity transform
> >> function at
> >> http://dev.w3.org/csswg/css3-transforms/#TermIdentityTransformFunction
> >> Should rotate3d be a primitive?
> >
> > Yes, I think so.  Also, probably perspective() should be defined as
> > primitive there, although it would have only itself as a derivative,
> > because otherwise AFAICT it can't be interpolated.
> >
> rotate3d, matrix3d, matrix and perspective are no primitives, nor
> derivates of primitives.
>
> While we use decomposing for matrix3d and matrix, the problem for rotate3d
> are the rotation axis that can either be 1 or 0. Matrix decomposing seem to
> give more predictable results here. Especially when the rotation axis
> changes.
>
> But rotateX and rotateY seem to be good candidates for primitives on its
> own, since the rotation axis won't change. I think I just forgot to add
> them.
>
> I am not sure about perspective. I did not define it as primitive, since
> (at least some) implementations seem to decompose it as well (maybe because
> of the use of quaternions?).
>
> Greetings,
> Dirk




-- 
Best Regards,
David Zbarsky
Received on Monday, 2 July 2012 23:09:12 GMT

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