PageSourceSearch

https://byrnewallaceshields.com/assets/components/theme_direct/js/jquery.easing.1.3.js

js byrnewallaceshields.com collected 2026-10-09 05:02:41 UTC 11,097 bytes, 252 lines download raw bytes

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

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.