Contact email
Spec
https://drafts.fxtf.org/motion-1/#offset-path-property
The offset-path property has already shipped, but without animation as that intent explicitly didn't ship any new behavior, and the old motion-path property wasn't animated. (Originally, only motion-rotation and motion-offset were animated.)
There was a tag review for the original spec.
Summary
We will now support animations and transitions on offset-path. An example use case is when an element moves along a path that is itself moving. Another use case is circular movement as the direction of a ray path animates.
Link to “Intent to Implement” blink-dev discussion
Covered by original Intent to Implement.
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Demo link
http://codepen.io/ericwilligers/pen/PpqMqM
Interoperability and Compatibility Risk
No risk expected. Eight people have raised minor issues with the motion path spec, which is an encouraging level of engagement. Many of the open issues are about wording, none are about animation.
OWP launch tracking bug
Entry on the feature dashboard
https://www.chromestatus.com/feature/5198375053950976
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
1. The spec doesn't link to a definition of interpolation/addition for path(). Where is this defined?
https://www.w3.org/TR/SVG/paths.html#DAttribute
2. Are there web-platform-tests for this?
Not yet for motion path. There are SVG tests for SMIL animation of path data. e.g.
https://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlSVGWeb/animate-elem-83-t.html
I can write some interpolation web-platform-tests for the motion path properties.
3. Less relevant: What are your plans for supporting animation of the offset shorthand when this name conflicts with Web Animations keyframe offset property?
I forgot about the Web Animations aspect of https://github.com/w3c/fxtf-drafts/issues/51
The best option would be cssOffset, like cssFloat.
On Mon, Mar 6, 2017 at 9:18 AM, Eric Willigers
<ericwi...@chromium.org> wrote:
> Responses inline.
>
>> 1. The spec doesn't link to a definition of interpolation/addition for
>> path(). Where is this defined?
>
>
> https://www.w3.org/TR/SVG/paths.html#DAttribute
>
> This is the definition for interpolation and addition of path attributes
> that is used for SMIL.
That doesn't define how addition works. Does the Blink implementation
support addition?
Also, the definition in SVG 2 appears to be more thorough so we should
probably refer to that instead:
https://svgwg.org/svg2-draft/paths.html#DProperty
I wonder why we don't normalize the path before trying to match up the
segments? Does the Blink implementation do that?
It seems like the computed value for the 'd' property and
'offset-path' property should be the normalized path (i.e. M, L, C, z
only) or at least have some strict serialization so that "M0,-.5"
becomes "M0,-0.5" etc. What does Blink do for serialization?
On Mon, Mar 6, 2017 at 6:45 PM, Fredrik Söderquist <f...@opera.com> wrote:
> On Mon, Mar 6, 2017 at 2:17 AM, Brian Birtles <bbir...@mozilla.com> wrote:
>> Also, the definition in SVG 2 appears to be more thorough so we should
>> probably refer to that instead:
>> https://svgwg.org/svg2-draft/paths.html#DProperty
>>
>> I wonder why we don't normalize the path before trying to match up the
>> segments? Does the Blink implementation do that?
>
>
> IIRC, that will give you problems with arcs (A/a).
Seems like it would be ok if arcs were included in the normalization?
Even a normalization that simply converts all relative commands to
absolute commands (or vice versa) would seem to make authoring a
little easier both in terms of creating interpolable paths and parsing
the output of getComputedStyle. I don't feel too strongly about it,
however.
>> It seems like the computed value for the 'd' property and
>> 'offset-path' property should be the normalized path (i.e. M, L, C, z
>> only) or at least have some strict serialization so that "M0,-.5"
>> becomes "M0,-0.5" etc. What does Blink do for serialization?
>
>
> No normalization and "%.6g" formatting for numbers I think. Spaces as
> separators. (I.e "M 0 -0.5" for the above.)
That needs to be specified (certainly the separators at least) or
we're going to have a compat issue where content that reads
getComputedStyle only parses the subset of path syntax produced by the
dominant/first-to-ship UA and other UAs need to follow suit or break
content.
In fact, that spec needs quite a bit more clarification. offset-path
has the syntax:
none | ray( [ <angle> && <size>? && contain? ] ) | <path()> | <url>
| [ <basic-shape> || <geometry-box> ]
But is animatable as "as <angle>, <basic-shape> or <path()>"
How does animation work if you have 'ray(45deg contain)' and
'ray(180deg)'? Does it fall back to discrete animation for the whole
thing, or just for the 'contain' part?
Furthermore, such normalization would mean the author does not need to
parse or process 'v' commands or 'l' commands when reading
getComputedStyle(elem).offsetPath.
But, like I said, I don't feel strongly about this, only that it
deserves discussion before shipping.
>> 1. The spec doesn't link to a definition of interpolation/addition for
>> path(). Where is this defined?
>
>
> https://www.w3.org/TR/SVG/paths.html#DAttribute
>
> This is the definition for interpolation and addition of path attributes
> that is used for SMIL.
That doesn't define how addition works. Does the Blink implementation
support addition?
Blink does not currently support addition: the current results show replacement instead. I think addition was implemented behind a flag previously when the Web Animations spec was different (no adding in one keyframe and replacing in another). Blink's addition implementation has changed and path addition needs to be re-implemented.
Many of the interpolation questions have already been considered by SMIL implementations, where
v and V interpolate.
V and L do not interpolate
Blink's current CSS path interpolation code copies this, and therefore does animate between
path('M0 100l100-100');
and
path('M0 100L100 50');
but not between
path('M0 100l0-100');
and
path('M0 100v100');
Blink's current serialization format can be seen in an interpolation test. Arcs (A/a) do not cause problems.
Interpolating between L and H and V would be trivial to add if there is interest and consensus.
Blink shipped (Intent, SVG minutes)
d: path('...')
without normalizing ever being discussed, but that presentation attribute could be updated to normalizing if consensus occurs. Normalizing would reduce the space of possible serialization results.
There was a stage in Blink's implementation when CSS Transitions and CSS Animations serialised some of these interpolation cases differently: one using relative when another used absolute. If the spec mandated absolute forms (for example) in the serialization format, such cases would be avoided.
I have created https://github.com/w3c/svgwg/issues/321 for the discussion of path string interpolation options.I'll update this Intent when there is a decision.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYezL-XkHc50qiynxjMD58d-oFvbKF6zQCfJtfAohBXovQ%40mail.gmail.com.