Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "penner", | ||
"version": "0.1.2", | ||
"description": "Penner's easing equations", | ||
"version": "0.1.3", | ||
"description": "Penner's easing equations, in JavaScript", | ||
"main": "penner.js", | ||
@@ -18,5 +18,5 @@ "repository": { | ||
"devDependencies": { | ||
"grunt": "~0.4.1", | ||
"grunt-contrib-uglify": "~0.2.4", | ||
"grunt-contrib-coffee": "~0.7.0" | ||
"grunt": "^0.4.5", | ||
"grunt-contrib-coffee": "^0.13.0", | ||
"grunt-contrib-uglify": "^0.9.2" | ||
}, | ||
@@ -23,0 +23,0 @@ "license": "MIT", |
@@ -0,1 +1,29 @@ | ||
/* | ||
Copyright © 2001 Robert Penner | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
Redistributions of source code must retain the above copyright notice, this list of | ||
conditions and the following disclaimer. | ||
Redistributions in binary form must reproduce the above copyright notice, this list | ||
of conditions and the following disclaimer in the documentation and/or other materials | ||
provided with the distribution. | ||
Neither the name of the author nor the names of contributors may be used to endorse | ||
or promote products derived from this software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY | ||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | ||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
(function() { | ||
@@ -80,12 +108,14 @@ var penner, umd; | ||
easeInExpo: function(t, b, c, d) { | ||
var _ref; | ||
return (_ref = t === 0) != null ? _ref : { | ||
b: c * Math.pow(2, 10 * (t / d - 1)) + b | ||
}; | ||
if (t === 0) { | ||
return b; | ||
} else { | ||
return c * Math.pow(2, 10 * (t / d - 1)) + b; | ||
} | ||
}, | ||
easeOutExpo: function(t, b, c, d) { | ||
var _ref; | ||
return (_ref = t === d) != null ? _ref : b + { | ||
c: c * (-Math.pow(2, -10 * t / d) + 1) + b | ||
}; | ||
if (t === d) { | ||
return b + c; | ||
} else { | ||
return c * (-Math.pow(2, -10 * t / d) + 1) + b; | ||
} | ||
}, | ||
@@ -92,0 +122,0 @@ easeInOutExpo: function(t, b, c, d) { |
@@ -1,1 +0,1 @@ | ||
(function(){var a,b;b=function(a){return"object"==typeof exports?module.exports=a:"function"==typeof define&&define.amd?define([],a):this.penner=a},a={linear:function(a,b,c,d){return c*a/d+b},easeInQuad:function(a,b,c,d){return c*(a/=d)*a+b},easeOutQuad:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},easeInOutQuad:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b},easeInCubic:function(a,b,c,d){return c*(a/=d)*a*a+b},easeOutCubic:function(a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},easeInOutCubic:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b},easeInQuart:function(a,b,c,d){return c*(a/=d)*a*a*a+b},easeOutQuart:function(a,b,c,d){return-c*((a=a/d-1)*a*a*a-1)+b},easeInOutQuart:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(a,b,c,d){return c*(a/=d)*a*a*a*a+b},easeOutQuint:function(a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b},easeInOutQuint:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},easeOutSine:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},easeInOutSine:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},easeInExpo:function(a,b,c,d){var e;return null!=(e=0===a)?e:{b:c*Math.pow(2,10*(a/d-1))+b}},easeOutExpo:function(a,b,c,d){var e;return null!=(e=a===d)?e:b+{c:c*(-Math.pow(2,-10*a/d)+1)+b}},easeInOutExpo:function(a,b,c,d){return(a/=d/2)<1?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(a,b,c,d){return-c*(Math.sqrt(1-(a/=d)*a)-1)+b},easeOutCirc:function(a,b,c,d){return c*Math.sqrt(1-(a=a/d-1)*a)+b},easeInOutCirc:function(a,b,c,d){return(a/=d/2)<1?-c/2*(Math.sqrt(1-a*a)-1)+b:c/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(a,b,c,d){var e,f,g;return g=1.70158,f=0,e=c,0===a||1===(a/=d),f||(f=.3*d),e<Math.abs(c)?(e=c,g=f/4):g=f/(2*Math.PI)*Math.asin(c/e),-(e*Math.pow(2,10*(a-=1))*Math.sin((a*d-g)*2*Math.PI/f))+b},easeOutElastic:function(a,b,c,d){var e,f,g;return g=1.70158,f=0,e=c,0===a||1===(a/=d),f||(f=.3*d),e<Math.abs(c)?(e=c,g=f/4):g=f/(2*Math.PI)*Math.asin(c/e),e*Math.pow(2,-10*a)*Math.sin((a*d-g)*2*Math.PI/f)+c+b},easeInOutElastic:function(a,b,c,d){var e,f,g;return g=1.70158,f=0,e=c,0===a||2===(a/=d/2),f||(f=d*.3*1.5),e<Math.abs(c)?(e=c,g=f/4):g=f/(2*Math.PI)*Math.asin(c/e),1>a?-.5*e*Math.pow(2,10*(a-=1))*Math.sin((a*d-g)*2*Math.PI/f)+b:.5*e*Math.pow(2,-10*(a-=1))*Math.sin((a*d-g)*2*Math.PI/f)+c+b},easeInBack:function(a,b,c,d,e){return void 0===e&&(e=1.70158),c*(a/=d)*a*((e+1)*a-e)+b},easeOutBack:function(a,b,c,d,e){return void 0===e&&(e=1.70158),c*((a=a/d-1)*a*((e+1)*a+e)+1)+b},easeInOutBack:function(a,b,c,d,e){return void 0===e&&(e=1.70158),(a/=d/2)<1?c/2*a*a*(((e*=1.525)+1)*a-e)+b:c/2*((a-=2)*a*(((e*=1.525)+1)*a+e)+2)+b},easeInBounce:function(b,c,d,e){var f;return f=a.easeOutBounce(e-b,0,d,e),d-f+c},easeOutBounce:function(a,b,c,d){return(a/=d)<1/2.75?c*7.5625*a*a+b:2/2.75>a?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:2.5/2.75>a?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},easeInOutBounce:function(b,c,d,e){var f;return e/2>b?(f=a.easeInBounce(2*b,0,d,e),.5*f+c):(f=a.easeOutBounce(2*b-e,0,d,e),.5*f+.5*d+c)}},b(a)}).call(this); | ||
(function(){var a,b;b=function(a){return"object"==typeof exports?module.exports=a:"function"==typeof define&&define.amd?define([],a):this.penner=a},a={linear:function(a,b,c,d){return c*a/d+b},easeInQuad:function(a,b,c,d){return c*(a/=d)*a+b},easeOutQuad:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},easeInOutQuad:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b},easeInCubic:function(a,b,c,d){return c*(a/=d)*a*a+b},easeOutCubic:function(a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},easeInOutCubic:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b},easeInQuart:function(a,b,c,d){return c*(a/=d)*a*a*a+b},easeOutQuart:function(a,b,c,d){return-c*((a=a/d-1)*a*a*a-1)+b},easeInOutQuart:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(a,b,c,d){return c*(a/=d)*a*a*a*a+b},easeOutQuint:function(a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b},easeInOutQuint:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},easeOutSine:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},easeInOutSine:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},easeInExpo:function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b},easeOutExpo:function(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b},easeInOutExpo:function(a,b,c,d){return(a/=d/2)<1?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(a,b,c,d){return-c*(Math.sqrt(1-(a/=d)*a)-1)+b},easeOutCirc:function(a,b,c,d){return c*Math.sqrt(1-(a=a/d-1)*a)+b},easeInOutCirc:function(a,b,c,d){return(a/=d/2)<1?-c/2*(Math.sqrt(1-a*a)-1)+b:c/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(a,b,c,d){var e,f,g;return g=1.70158,f=0,e=c,0===a||1===(a/=d),f||(f=.3*d),e<Math.abs(c)?(e=c,g=f/4):g=f/(2*Math.PI)*Math.asin(c/e),-(e*Math.pow(2,10*(a-=1))*Math.sin((a*d-g)*(2*Math.PI)/f))+b},easeOutElastic:function(a,b,c,d){var e,f,g;return g=1.70158,f=0,e=c,0===a||1===(a/=d),f||(f=.3*d),e<Math.abs(c)?(e=c,g=f/4):g=f/(2*Math.PI)*Math.asin(c/e),e*Math.pow(2,-10*a)*Math.sin((a*d-g)*(2*Math.PI)/f)+c+b},easeInOutElastic:function(a,b,c,d){var e,f,g;return g=1.70158,f=0,e=c,0===a||2===(a/=d/2),f||(f=d*(.3*1.5)),e<Math.abs(c)?(e=c,g=f/4):g=f/(2*Math.PI)*Math.asin(c/e),1>a?-.5*(e*Math.pow(2,10*(a-=1))*Math.sin((a*d-g)*(2*Math.PI)/f))+b:e*Math.pow(2,-10*(a-=1))*Math.sin((a*d-g)*(2*Math.PI)/f)*.5+c+b},easeInBack:function(a,b,c,d,e){return void 0===e&&(e=1.70158),c*(a/=d)*a*((e+1)*a-e)+b},easeOutBack:function(a,b,c,d,e){return void 0===e&&(e=1.70158),c*((a=a/d-1)*a*((e+1)*a+e)+1)+b},easeInOutBack:function(a,b,c,d,e){return void 0===e&&(e=1.70158),(a/=d/2)<1?c/2*(a*a*(((e*=1.525)+1)*a-e))+b:c/2*((a-=2)*a*(((e*=1.525)+1)*a+e)+2)+b},easeInBounce:function(b,c,d,e){var f;return f=a.easeOutBounce(e-b,0,d,e),d-f+c},easeOutBounce:function(a,b,c,d){return(a/=d)<1/2.75?c*(7.5625*a*a)+b:2/2.75>a?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:2.5/2.75>a?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},easeInOutBounce:function(b,c,d,e){var f;return e/2>b?(f=a.easeInBounce(2*b,0,d,e),.5*f+c):(f=a.easeOutBounce(2*b-e,0,d,e),.5*f+.5*d+c)}},b(a)}).call(this); |
@@ -27,5 +27,5 @@ # penner | ||
|-----------------------|---------------| | ||
| Raw | 6400 bytes | | ||
| Uglified | 3224 bytes | | ||
| Uglified + gzipped | 881 bytes | | ||
| Raw | 7880 bytes | | ||
| Uglified | 3200 bytes | | ||
| Uglified + gzipped | 865 bytes | | ||
@@ -32,0 +32,0 @@ ## environment support |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20408
9
283