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

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 UTC