svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
11.01k stars 1.07k forks source link

v3.16 can't set ease to '-' #1183

Closed mclko closed 3 years ago

mclko commented 3 years ago

There is no posibility to set ease.

                 rect.animate({
                        duration: 400,
                        ease: '-',
                        delay: 0,
                        when: 'now',
                        swing: false,
                        times: true,
                        wait: 0                   
                      }).transform({rotate: 360, relative: true});

I try also ease() function.

I expect that this program should make constant rotation of rectangle, but it slow down before end.

the only solution that I found is to change default timeline definition in svg.js source file (line 5615):

    var timeline = {
      duration: 400,
      ease: '>', // ### if I change this to ease: '-',  rotation look OK
      delay: 0
    }; // Default attribute values
Fuzzyma commented 3 years ago

Use animate(...).ease('-'). Please not that = is not a valid value