1/* 2 * jQuery Easing v1.1.1 - http://gsgd.co.uk/sandbox/jquery.easing.php 3 * 4 * Uses the built in easing capabilities added in jQuery 1.1 5 * to offer multiple easing options 6 * 7 * Copyright (c) 2007 George Smith 8 * Licensed under the MIT License: 9 * http://www.opensource.org/licenses/mit-license.php 10 */ 11 12jQuery.extend({ 13 easing: { 14 easein: function(x, t, b, c, d) { 15 return c*(t/=d)*t + b; // in 16 }, 17 easeinout: function(x, t, b, c, d) { 18 if (t < d/2) return 2*c*t*t/(d*d) + b; 19 var ts = t - d/2; 20 return -2*c*ts*ts/(d*d) + 2*c*ts/d + c/2 + b; 21 }, 22 easeout: function(x, t, b, c, d) { 23 return -c*t*t/(d*d) + 2*c*t/d + b; 24 }, 25 expoin: function(x, t, b, c, d) { 26 var flip = 1; 27 if (c < 0) { 28 flip *= -1; 29 c *= -1; 30 } 31 return flip * (Math.exp(Math.log(c)/d * t)) + b; 32 }, 33 expoout: function(x, t, b, c, d) { 34 var flip = 1; 35 if (c < 0) { 36 flip *= -1; 37 c *= -1; 38 } 39 return flip * (-Math.exp(-Math.log(c)/d * (t-d)) + c + 1) + b; 40 }, 41 expoinout: function(x, t, b, c, d) { 42 var flip = 1; 43 if (c < 0) { 44 flip *= -1; 45 c *= -1; 46 } 47 if (t < d/2) return flip * (Math.exp(Math.log(c/2)/(d/2) * t)) + b; 48 return flip * (-Math.exp(-2*Math.log(c/2)/d * (t-d)) + c + 1) + b; 49 }, 50 bouncein: function(x, t, b, c, d) { 51 return c - jQuery.easing['bounceout'](x, d-t, 0, c, d) + b; 52 }, 53 bounceout: function(x, t, b, c, d) { 54 if ((t/=d) < (1/2.75)) { 55 return c*(7.5625*t*t) + b; 56 } else if (t < (2/2.75)) { 57 return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 58 } else if (t < (2.5/2.75)) { 59 return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 60 } else { 61 return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 62 } 63 }, 64 bounceinout: function(x, t, b, c, d) { 65 if (t < d/2) return jQuery.easing['bouncein'] (x, t*2, 0, c, d) * .5 + b; 66 return jQuery.easing['bounceout'] (x, t*2-d,0, c, d) * .5 + c*.5 + b; 67 }, 68 elasin: function(x, t, b, c, d) { 69 var s=1.70158;var p=0;var a=c; 70 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 71 if (a < Math.abs(c)) { a=c; var s=p/4; } 72 else var s = p/(2*Math.PI) * Math.asin (c/a); 73 return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 74 }, 75 elasout: function(x, t, b, c, d) { 76 var s=1.70158;var p=0;var a=c; 77 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 78 if (a < Math.abs(c)) { a=c; var s=p/4; } 79 else var s = p/(2*Math.PI) * Math.asin (c/a); 80 return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 81 }, 82 elasinout: function(x, t, b, c, d) { 83 var s=1.70158;var p=0;var a=c; 84 if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 85 if (a < Math.abs(c)) { a=c; var s=p/4; } 86 else var s = p/(2*Math.PI) * Math.asin (c/a); 87 if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 88 return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 89 }, 90 backin: function(x, t, b, c, d) { 91 var s=1.70158; 92 return c*(t/=d)*t*((s+1)*t - s) + b; 93 }, 94 backout: function(x, t, b, c, d) { 95 var s=1.70158; 96 return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 97 }, 98 backinout: function(x, t, b, c, d) { 99 var s=1.70158; 100 if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 101 return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 102 }, 103 linear: function(x, t, b, c, d) { 104 return c*t/d + b; //linear 105 } 106 } 107});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.