You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[motion-1] Direction of offset-rotate at segment boundaries #209
The direction at segment boundaries used by offset-rotate came up during discussion about the SVG pathAngleAtLength() function. I’m opening this issue to get more feedback.
The direction at segment boundaries can be either the direction of the previous path segment or the direction of the next path segment.
Animation software seems to use either of them. After Effects seems to use the direction of the previous path segment. Apple Motion seems to use the direction of the next path segment.
CSS Motion Path defines the direction to be the direction of the previous path segment and Google Chrome has implemented it that way.
Should it be changed to be the direction of the next path segment?
SVG 2 Path Directionality defines the direction at the start of a path segment and the direction at the end of a path segment. CSS Motion Path could be changed to reference either of them to get a more precise definition which covers also zero-length subpaths.
SVG markers, animateMotion, CSS Motion Path and 'b' path commands should all use consistent direction.
Ideally, the SVG spec would normatively describe direction, and the motion path spec would link.
An SVG pathAngleAtLength() function would be excellent. Other specs could link to that instead of ‘path’ element implementation notes (the most precise definition of direction in SVG 1.1). Web platform tests should cover 0 length paths like 'm 100 100 b -90'.
(I'm responsible for the Blink motion path implementation. I simply reused the internal function PointAndNormalAtLength used by animateMotion. Any bugs in that method should not be baked into the motion path spec.)
Otherwise, if the given distance along the path occurs at a path segment boundary, then the direction of the path is the direction at the start of the segment at the given distance, considering each segment to be endpoint exclusive.
Activity
ewilligers commentedon Aug 7, 2017
SVG markers, animateMotion, CSS Motion Path and 'b' path commands should all use consistent direction.
Ideally, the SVG spec would normatively describe direction, and the motion path spec would link.
An SVG pathAngleAtLength() function would be excellent. Other specs could link to that instead of ‘path’ element implementation notes (the most precise definition of direction in SVG 1.1). Web platform tests should cover 0 length paths like 'm 100 100 b -90'.
(I'm responsible for the Blink motion path implementation. I simply reused the internal function PointAndNormalAtLength used by animateMotion. Any bugs in that method should not be baked into the motion path spec.)
heycam commentedon Sep 15, 2019
The SVG 2 Path directionality section says:
So I think we should follow that.