Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVG animation keySplines and keyTimes not working

Tags:

css

svg

I'm having trouble getting an svg animation to run using keySplines and keyTimes. If I remove the keyTimes and keySplines the animation runs just fine. If I add them back, the animation doesn't run. I'm experiencing the same issue in Chrome/Safari/Firefox so I don't think it's a browser issue.

<animate attributeName="d" attributeType="XML" fill="freeze" begin="indefinite" end="indefinite" 
dur="17000ms" values="M190.5,685.5l90,20l-50,60l-40-40l0,0V685.5z;M190.5,685.5l50,20l-70,50l20-30l0,0V685.5z" 
keySplines="0.5, 0, 0.5, 1; 0.5, 0, 0.5, 1" keyTimes="0; 1" calcMode="spline"></animate>
like image 823
Erik Hunter Avatar asked Oct 27 '25 10:10

Erik Hunter


1 Answers

There must be one fewer sets of keysplines control points than there are ‘keyTimes’

If there are any errors in the ‘keySplines’ specification (bad values, too many or too few values), the document fragment is in error.

You have the same number so that's what happens.

like image 169
Robert Longson Avatar answered Oct 30 '25 01:10

Robert Longson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!