File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 1+ var raf = typeof window !== 'undefined' && 'requestAnimationFrame' in window
2+ ? window . requestAnimationFrame
3+ : function ( func ) {
4+ setTimeout ( func , 16 )
5+ } ;
6+
17function ease ( options ) {
2- var startValue = options . startValue || 0 ;
3- var endValue = options . endValue || 1 ;
4- var durationMs = options . durationMs || 200 ;
8+ var startValue = 'startValue' in options ? options . startValue : 0 ;
9+ var endValue = 'endValue' in options ? options . endValue : 1 ;
10+ var durationMs = 'durationMs' in options ? options . durationMs : 200 ;
511 var onComplete = options . onComplete || function ( ) { } ;
612
7- var raf = window . requestAnimationFrame || function ( func ) {
8- window . setTimeout ( func , 16 )
9- } ;
1013 var stepCount = durationMs / 16 ;
1114 var valueIncrement = ( endValue - startValue ) / stepCount ;
1215 var sinValueIncrement = Math . PI / stepCount ;
You can’t perform that action at this time.
0 commit comments