kopia lustrzana https://github.com/backface/turtlestitch
added easeOutElastic function
thanks to @joshmarinacci’s excellent blog post: http://www.joshondesign.com/2013/03/01/improvedEasingEquationspull/29/head
rodzic
97bf879a04
commit
662a59b49c
|
@ -3186,7 +3186,8 @@ http://snap.berkeley.edu/run#cloud:Username=jens&ProjectName=rotation
|
|||
161212
|
||||
------
|
||||
* fixed #1560
|
||||
* Morphic: added a few in-/out- only easing functions for animations
|
||||
* Morphic: added a few in-/out- only easing functions for animations
|
||||
* Morphic: added easeOutElastic function thanks to @joshmarinacci’s excellent blog post
|
||||
|
||||
|
||||
== v4.10 === (in development)
|
||||
|
|
10
morphic.js
10
morphic.js
|
@ -1838,7 +1838,15 @@ Animation.prototype.easings = {
|
|||
|
||||
// ease out only:
|
||||
sine_out: function (t) {return Math.sin(radians(t * 90)); },
|
||||
quad_out: function (t) {return t * (2 - t); }
|
||||
quad_out: function (t) {return t * (2 - t); },
|
||||
elastic_out: function (t) { // this one's fun!
|
||||
// thanks to Josh Marinacci's blog:
|
||||
// http://www.joshondesign.com/2013/03/01/improvedEasingEquations
|
||||
var p = 0.3;
|
||||
return Math.pow(2, -10 * t) * Math.sin(
|
||||
(t - p / 4) * (2 * Math.PI) / p
|
||||
) + 1;
|
||||
}
|
||||
};
|
||||
|
||||
Animation.prototype.start = function () {
|
||||
|
|
Ładowanie…
Reference in New Issue