Re: Proposal: Motions along a path in CSS

On 29 August 2014 00:52, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Thu, Aug 28, 2014 at 6:59 PM, Dirk Schulze <dschulze@adobe.com> wrote:
> > motion-position: <length> | <percentage>
> >
> >         * The current position on the specified path or shape. Basic
> shapes need to specify the initial position 0.
> >         * initial: 0
>
> What happens if you specify a <length> longer than the path length, or
> negative?  Same with <percentage> outside of 0%-100%.
>
> Are we going to have the same escape-hatch as SVG for implementations
> to not exactly calculate path length, and allow authors to specify
> one, or do we consider that a legacy allowance for old implementations
> that's no longer needed?
>
The meaning of your second question is not clear to me, though the obvious
options here are:

   1. Crop the values to the range => -10% will result in 0% and 110% in
   100%
   2. Calculate the modulo to stay within the range => -10% will result in
   90% and 110% in 10%
   3. Consider values outside the range as invalid

 > motion-rotation: auto | reverse | <angle>
> >
> >         * ‘auto’ rotates the element dependent on the gradient at the
> current position on the path
> >         * ‘reverse’ does the same as ‘auto’ but rotated by 180deg.
> >         * <angle> a rotation applied to the element and keeps the
> rotation consistent along the animation.
> >         * initial: auto
>
> Does this mean that if I don't want my element to rotate at all, just
> follow the path, I can specify "0deg"?
>
Or does it mean that the element will be rotated along the path and the
angle added to that rotation?

Furthermore, 'auto' should better be called 'along-path' or 'follow-path'
for clarity. Also, 'reverse' could be handled by allowing to combine the
angle with the path following property. So I propose this syntax:

motion-rotation: along-path || <angle>

'reverse' could then be achieved like this:

motation-rotation: along-path 180deg;

Sebastian

Received on Friday, 29 August 2014 07:08:34 UTC