これで「徐々に遅く」はなりますが、良いのでしょうか?
修正
変化をなめらかにしてみました。
修正
変化を自然にしてみました。
これでどうでしょう?
JavaScript
1$(function() {
2 var coefficient = 2.5;
3 var coefficientA = - Math.log(1 - coefficient / Math.E);
4 var coefficientB = (1 - Math.log(coefficient)) / coefficientA;
5 //var coefficient = (1 - Math.sqrt(5)) / 2;
6
7 $('.atom').animate(
8 { 'padding-right' : 1 },
9 {
10 duration : 5000,
11 step : function(now) {
12 // now : 0 → 1;
13 var scale = Math.E / coefficient - Math.exp(- coefficientA * (now - coefficientB));
14 //var scale = - 1 / coefficient - 1 / (now - coefficient);
15 $(this).css('transform', 'scale(' + scale + ')');
16 },
17 complete : function() {
18 $(this).css('padding-right', 1);
19 }
20 }
21 );
22});