@@ -36,23 +36,23 @@ const _ease = {
36
36
const _p1 = o >= 1 ? o : 1 ;
37
37
const _p2 = ( t || 1 ) / ( o < 1 ? o : 1 ) ;
38
38
const _p3 = _p2 / Math . PI * 2 * ( Math . asin ( 1 / _p1 ) || 0 ) ;
39
+ // _p2 = Math.PI * 2 / _p2;
39
40
return - ( _p1 * Math . pow ( 2 , 10 * ( p -= 1 ) ) * Math . sin ( ( p - _p3 ) * _p2 ) ) ;
40
41
} ,
41
42
easeOutElastic : function ( p , o , t ) {
42
43
const _p1 = o >= 1 ? o : 1 ;
43
44
const _p2 = ( t || 1 ) / ( o < 1 ? o : 1 ) ;
44
45
const _p3 = _p2 / Math . PI * 2 * ( Math . asin ( 1 / _p1 ) || 0 ) ;
46
+ // _p2 = Math.PI * 2 / _p2;
45
47
return _p1 * Math . pow ( 2 , - 10 * p ) * Math . sin ( ( p - _p3 ) * _p2 ) + 1 ;
46
48
} ,
47
49
easeInOutElastic : function ( _p , o , t ) {
48
50
let p = _p ;
49
51
const _p1 = o >= 1 ? o : 1 ;
50
52
const _p2 = ( t || 1 ) / ( o < 1 ? o : 1 ) ;
51
53
const _p3 = _p2 / Math . PI * 2 * ( Math . asin ( 1 / _p1 ) || 0 ) ;
52
- const a = - 0.5 * ( _p1 * Math . pow ( 2 , 10 * ( p -= 1 ) ) * Math . sin ( ( p - _p3 ) * _p2 ) ) ;
53
- const b = _p1 * Math . pow ( 2 , - 10 * ( p -= 1 ) ) * Math . sin ( ( p - _p3 ) * _p2 ) * 0.5 + 1 ;
54
54
p *= 2 ;
55
- return p < 1 ? a : b ;
55
+ return p < 1 ? - 0.5 * ( _p1 * Math . pow ( 2 , 10 * ( p -= 1 ) ) * Math . sin ( ( p - _p3 ) * _p2 ) ) : _p1 * Math . pow ( 2 , - 10 * ( p -= 1 ) ) * Math . sin ( ( p - _p3 ) * _p2 ) * 0.5 + 1 ;
56
56
} ,
57
57
easeInBounce : function ( _p ) {
58
58
let p = _p ;
0 commit comments