PageSourceSearch

https://acit.in/members/assets/js/lib/jquery.easing.js

js acit.in collected 2026-10-07 08:21:11 UTC 8,769 bytes, 200 lines download raw bytes

vendor: 8,769 bytes, lines 1-200
1/* ============================================================
2 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3 *
4 * Open source under the BSD License.
5 *
6 * Copyright © 2008 George McGinley Smith
7 * All rights reserved.
8 * https://raw.github.com/danro/jquery-easing/master/LICENSE
9 * ======================================================== */
10
11jQuery.easing['jswing'] = jQuery.easing['swing'];
12
13jQuery.extend(jQuery.easing,
14    {
15        // t: current time, b: begInnIng value, c: change In value, d: duration
16
17        def: 'easeOutQuad',
18        swing: function (x, t, b, c, d) {
19            //alert(jQuery.easing.default);
20            return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
21        },
22        easeInQuad: function (x, t, b, c, d) {
23            return c * (t /= d) * t + b;
24        },
25        easeOutQuad: function (x, t, b, c, d) {
26            return -c * (t /= d) * (t - 2) + b;
27        },
28        easeInOutQuad: function (x, t, b, c, d) {
29            if ((t /= d / 2) < 1) return c / 2 * t * t + b;
30            return -c / 2 * ((--t) * (t - 2) - 1) + b;
31        },
32        easeInCubic: function (x, t, b, c, d) {
33            return c * (t /= d) * t * t + b;
34        },
35        easeOutCubic: function (x, t, b, c, d) {
36            return c * ((t = t / d - 1) * t * t + 1) + b;
37        },
38        easeInOutCubic: function (x, t, b, c, d) {
39            if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;
40            return c / 2 * ((t -= 2) * t * t + 2) + b;
41        },
42        easeInQuart: function (x, t, b, c, d) {
43            return c * (t /= d) * t * t * t + b;
44        },
45        easeOutQuart: function (x, t, b, c, d) {
46            return -c * ((t = t / d - 1) * t * t * t - 1) + b;
47        },
48        easeInOutQuart: function (x, t, b, c, d) {
49            if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;
50            return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
51        },
52        easeInQuint: function (x, t, b, c, d) {
53            return c * (t /= d) * t * t * t * t + b;
54        },
55        easeOutQuint: function (x, t, b, c, d) {
56            return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
57        },
58        easeInOutQuint: function (x, t, b, c, d) {
59            if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
60            return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
61        },
62        easeInSine: function (x, t, b, c, d) {
63            return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
64        },
65        easeOutSine: function (x, t, b, c, d) {
66            return c * Math.sin(t / d * (Math.PI / 2)) + b;
67        },
68        easeInOutSine: function (x, t, b, c, d) {
69            return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
70        },
71        easeInExpo: function (x, t, b, c, d) {
72            return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
73        },
74        easeOutExpo: function (x, t, b, c, d) {
75            return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
76        },
77        easeInOutExpo: function (x, t, b, c, d) {
78            if (t == 0) return b;
79            if (t == d) return b + c;
80            if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
81            return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
82        },
83        easeInCirc: function (x, t, b, c, d) {
84            return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
85        },
86        easeOutCirc: function (x, t, b, c, d) {
87            return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
88        },
89        easeInOutCirc: function (x, t, b, c, d) {
90            if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
91            return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
92        },
93        easeInElastic: function (x, t, b, c, d) {
94            var s = 1.70158;
95            var p = 0;
96            var a = c;
97            if (t == 0) return b;
98            if ((t /= d) == 1) return b + c;
99            if (!p) p = d * .3;
100            if (a < Math.abs(c)) {
101                a = c;
102                var s = p / 4;
103            }
104            else var s = p / (2 * Math.PI) * Math.asin(c / a);
105            return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
106        },
107        easeOutElastic: function (x, t, b, c, d) {
108            var s = 1.70158;
109            var p = 0;
110            var a = c;
111            if (t == 0) return b;
112            if ((t /= d) == 1) return b + c;
113            if (!p) p = d * .3;
114            if (a < Math.abs(c)) {
115                a = c;
116                var s = p / 4;
117            }
118            else var s = p / (2 * Math.PI) * Math.asin(c / a);
119            return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
120        },
121        easeInOutElastic: function (x, t, b, c, d) {
122            var s = 1.70158;
123            var p = 0;
124            var a = c;
125            if (t == 0) return b;
126            if ((t /= d / 2) == 2) return b + c;
127            if (!p) p = d * (.3 * 1.5);
128            if (a < Math.abs(c)) {
129                a = c;
130                var s = p / 4;
131            }
132            else var s = p / (2 * Math.PI) * Math.asin(c / a);
133            if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
134            return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
135        },
136        easeInBack: function (x, t, b, c, d, s) {
137            if (s == undefined) s = 1.70158;
138            return c * (t /= d) * t * ((s + 1) * t - s) + b;
139        },
140        easeOutBack: function (x, t, b, c, d, s) {
141            if (s == undefined) s = 1.70158;
142            return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
143        },
144        easeInOutBack: function (x, t, b, c, d, s) {
145            if (s == undefined) s = 1.70158;
146            if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
147            return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
148        },
149        easeInBounce: function (x, t, b, c, d) {
150            return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b;
151        },
152        easeOutBounce: function (x, t, b, c, d) {
153            if ((t /= d) < (1 / 2.75)) {
154                return c * (7.5625 * t * t) + b;
155            } else if (t < (2 / 2.75)) {
156                return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
157            } else if (t < (2.5 / 2.75)) {
158                return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
159            } else {
160                return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
161            }
162        },
163        easeInOutBounce: function (x, t, b, c, d) {
164            if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b;
165            return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b;
166        }
167    });
168
169/*
170 *
171 * TERMS OF USE - EASING EQUATIONS
172 * 
173 * Open source under the BSD License. 
174 * 
175 * Copyright © 2001 Robert Penner
176 * All rights reserved.
177 * 
178 * Redistribution and use in source and binary forms, with or without modification, 
179 * are permitted provided that the following conditions are met:
180 * 
181 * Redistributions of source code must retain the above copyright notice, this list of 
182 * conditions and the following disclaimer.
183 * Redistributions in binary form must reproduce the above copyright notice, this list 
184 * of conditions and the following disclaimer in the documentation and/or other materials 
185 * provided with the distribution.
186 * 
187 * Neither the name of the author nor the names of contributors may be used to endorse 
188 * or promote products derived from this software without specific prior written permission.
189 * 
190 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
191 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
192 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
193 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
194 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
195 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
196 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
197 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
198 * OF THE POSSIBILITY OF SUCH DAMAGE. 
199 *
200 */

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.