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

Re: [css3-2d-transforms] animation of skewX(), skewY(), skew()

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 2 Dec 2009 17:17:57 -0800
To: Dean Jackson <dino@apple.com>
Cc: www-style@w3.org
Message-ID: <20091203011757.GA29125@pickering.dbaron.org>
On Thursday 2009-12-03 10:45 +1100, Dean Jackson wrote:
> On 03/12/2009, at 6:58 AM, L. David Baron wrote:
> > http://dev.w3.org/csswg/css3-2d-transforms/#animation says that an
> > animation of skewX(), skewY(), or skew() is animation in the space
> > of angles.
> > 
> > In other words, it says that the midpoint (along the transition
> > function, not necessarily in terms of time) of an animation between
> > skewX(0) and skewX(60deg) is skewX(30deg).
> > 
> > I think it would make more sense if the animation of these functions
> > were in the space of the tangent of the angles (which seems like
> > it's a common representation of such transformations, see, e.g.,
> > http://en.wikipedia.org/wiki/Shear_mapping ).  In other words, the
> > midpoint of the animation between skewX(0) and skewX(60deg) should
> > be skewX(40.8934deg), because at this angle any point is transformed
> > to a position halfway between where it would be at skewX(0) and
> > where it would be at skewX(60deg), since atan(tan(60deg)/2) ==
> > 40.8934deg.
> Would this make a "linear" animation appear as if it isn't linear
> (ie. it would look like it slows down or speeds up)? If so, I
> think it might be confusing.

By "this", do you mean the spec's current behavior or my proposal?

In the build of Webkit that I have (WebKit-gtk from a few weeks
ago), using your testcase from your next message:
the top of the skewed box and the translated box don't line up,
except at the endpoints.

My proposal would fix that and make them line up throughout the


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Thursday, 3 December 2009 01:18:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:41 UTC