scour-project / scour

Scour - An SVG Optimizer / Cleaner
Apache License 2.0
757 stars 61 forks source link

Support of animated SVG features keySplines, keyTimes, and begin, dur, end, min, max attributes #285

Open Popolon opened 2 years ago

Popolon commented 2 years ago

Currently Scour doesn't support keySplines, keyTimes, begin, dur, end, min, max attributes used in anmated SVG, so their valus are not truncated.

See this example, made with Glaxnimate (can be played as is in most browser). Also it looks like Scour doesn't truncate under 3 decimal of precision with --set-precision= option.

<animateTransform attributeName="transform" begin="0.000000" calcMode="spline" dur="3.000000" keySplines="0 0 1 1; 0.000000 0.000000 0.800587 0.048913; 0.000000 0.000000 1.000000 1.000000" keyTimes="0; 0.011111; 0.094444; 1" repeatCount="indefinite" type="translate" values="303.797 288.622; 303.797 288.622; 243.038 380.977; 243.038 380.977"/>

Animated SVG