Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

23 lines (19 sloc) 1.01 KB
Snap SVG Easing Equations
A port of Robert Penner’s equations to percentage-based formulas for use in Snap SVG.
http://www.robertpenner.com/easing/
http://snapsvg.io
Available methods:
- Quad ( mina.easeInQuad, mina.easeOutQuad, mina.easeInOutQuad )
- Cubic ( mina.easeInCubic, mina.easeOutCubic, mina.easeInOutCubic )
- Quart ( mina.easeInQuart, mina.easeOutQuart, mina.easeInOutQuart )
- Quint ( mina.easeInQuint, mina.easeOutQuint, mina.easeInOutQuint )
- Sine ( mina.easeInSine, mina.easeOutSine, mina.easeInOutSine )
- Circ ( mina.easeInCirc, mina.easeOutCirc, mina.easeInOutCirc )
- Expo ( mina.easeInExpo, mina.easeOutExpo, mina.easeInOutExpo )
- Elastic ( mina.easeInElastic, mina.easeOutElastic, mina.easeInOutElastic )
- Back ( mina.easeInBack, mina.easeOutBack, mina.easeInOutBack )
- Bounce ( mina.easeInBounce, mina.easeOutBounce, mina.easeInOutBounce )
Example use:
var canvas = Snap('#svg');
var circle = canvas.circle( 0, 0, 100 ).attr({ fill: '#ff0000' });
circle.animate({ cx: 100 }, 1000, mina.easeOutExpo);
You can’t perform that action at this time.