-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
23 lines (19 loc) · 1.01 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);