Comparing version 0.1.1 to 0.1.2
if (typeof Map === "undefined") { | ||
Map = function() { this.clear(); }; | ||
Map = function() {}; | ||
Map.prototype = { | ||
set: function(k, v) { this._[k] = v; return this; }, | ||
get: function(k) { return this._[k]; }, | ||
has: function(k) { return k in this._; }, | ||
delete: function(k) { return k in this._ && delete this._[k]; }, | ||
clear: function() { this._ = Object.create(null); }, | ||
get size() { var n = 0; for (var k in this._) ++n; return n; }, | ||
forEach: function(c) { for (var k in this._) c(this._[k], k, this); } | ||
set: function(k, v) { this["$" + k] = v; return this; }, | ||
get: function(k) { return this["$" + k]; }, | ||
has: function(k) { return "$" + k in this; } | ||
}; | ||
@@ -73,3 +69,2 @@ } | ||
} | ||
var b1 = 4 / 11, | ||
@@ -105,3 +100,2 @@ b2 = 6 / 11, | ||
} | ||
function circleIn(t) { | ||
@@ -118,7 +112,5 @@ return 1 - Math.sqrt(1 - t * t); | ||
} | ||
function expIn(t) { | ||
return Math.pow(2, 10 * t - 10); | ||
} | ||
var pi = Math.PI, | ||
@@ -146,3 +138,2 @@ halfPi = pi / 2; | ||
} | ||
function cubicIn(t) { | ||
@@ -159,3 +150,2 @@ return t * t * t; | ||
} | ||
function quadIn(t) { | ||
@@ -162,0 +152,0 @@ return t * t; |
@@ -1,1 +0,1 @@ | ||
"undefined"==typeof Map&&(Map=function(){this.clear()},Map.prototype={set:function(t,n){return this._[t]=n,this},get:function(t){return this._[t]},has:function(t){return t in this._},"delete":function(t){return t in this._&&delete this._[t]},clear:function(){this._=Object.create(null)},get size(){var t=0;for(var n in this._)++t;return t},forEach:function(t){for(var n in this._)t(this._[n],n,this)}}),function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.ease={})}(this,function(t){"use strict";function n(t){return+t}function e(t,n){t=Math.max(1,P(t,1)),n=1.5*P(n,.3)*N;var e=n*Math.asin(1/t);return function(u){return t*((u=2*u-1)<0?Math.pow(2,10*u)*Math.sin((e-u)/n):Math.pow(2,-10*u)*Math.sin((u-e)/n)+2)/2}}function u(t,n){t=Math.max(1,P(t,1)),n=P(n,.3)*N;var e=n*Math.asin(1/t);return function(u){return t*Math.pow(2,-10*u)*Math.sin((u-e)/n)+1}}function i(t,n){t=Math.max(1,P(t,1)),n=P(n,.3)*N;var e=n*Math.asin(1/t);return function(u){return t*Math.pow(2,10*--u)*Math.sin((e-u)/n)}}function r(t){return t=1.525*P(t,1.70158),function(n){return((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}}function o(t){return t=P(t,1.70158),function(n){return--n*n*((t+1)*n+t)+1}}function c(t){return t=P(t,1.70158),function(n){return n*n*((t+1)*n-t)}}function s(t){return E>t?J*t*t:A>t?J*(t-=z)*t+B:D>t?J*(t-=C)*t+F:J*(t-=G)*t+H}function a(t){return((t*=2)<=1?1-s(1-t):s(t-1)+1)/2}function f(t){return 1-s(1-t)}function h(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function M(t){return Math.sqrt(1- --t*t)}function p(t){return 1-Math.sqrt(1-t*t)}function l(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function b(t){return 1-Math.pow(2,-10*t)}function d(t){return Math.pow(2,10*t-10)}function w(t){return(1-Math.cos(K*t))/2}function y(t){return Math.sin(t*L)}function x(t){return 1-Math.cos(t*L)}function _(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function v(t){return--t*t*t+1}function q(t){return t*t*t}function g(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function k(t){return t*(2-t)}function m(t){return t*t}function j(t){return t=P(t,3),function(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}}function O(t){return t=P(t,3),function(n){return 1-Math.pow(1-n,t)}}function I(t){return t=P(t,3),function(n){return Math.pow(n,t)}}var N=1/(2*Math.PI),P=function(t,n){return null==t||isNaN(t)?n:+t},E=4/11,z=6/11,A=8/11,B=.75,C=9/11,D=10/11,F=.9375,G=21/22,H=63/64,J=1/E/E,K=Math.PI,L=K/2,Q=(new Map).set("linear-in",n).set("linear-out",n).set("linear-in-out",n).set("quad-in",m).set("quad-out",k).set("quad-in-out",g).set("cubic-in",q).set("cubic-out",v).set("cubic-in-out",_).set("poly-in",q).set("poly-out",v).set("poly-in-out",_).set("sin-in",x).set("sin-out",y).set("sin-in-out",w).set("exp-in",d).set("exp-out",b).set("exp-in-out",l).set("circle-in",p).set("circle-out",M).set("circle-in-out",h).set("bounce-in",f).set("bounce-out",s).set("bounce-in-out",a).set("back-in",c()).set("back-out",o()).set("back-in-out",r()).set("elastic-in",i()).set("elastic-out",u()).set("elastic-in-out",e()),R=(new Map).set("poly-in",I).set("poly-out",O).set("poly-in-out",j).set("back-in",c).set("back-out",o).set("back-in-out",r).set("elastic-in",i).set("elastic-out",u).set("elastic-in-out",e),S=function(t,e,u){var i=(t+="").indexOf("-");return 0>i&&(t+="-in"),arguments.length>1&&R.has(t)?R.get(t)(e,u):Q.get(t)||n};t.ease=S}); | ||
"undefined"==typeof Map&&(Map=function(){},Map.prototype={set:function(t,n){return this["$"+t]=n,this},get:function(t){return this["$"+t]},has:function(t){return"$"+t in this}}),function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.ease={})}(this,function(t){"use strict";function n(t){return+t}function e(t,n){t=Math.max(1,O(t,1)),n=1.5*O(n,.3)*j;var e=n*Math.asin(1/t);return function(u){return t*((u=2*u-1)<0?Math.pow(2,10*u)*Math.sin((e-u)/n):Math.pow(2,-10*u)*Math.sin((u-e)/n)+2)/2}}function u(t,n){t=Math.max(1,O(t,1)),n=O(n,.3)*j;var e=n*Math.asin(1/t);return function(u){return t*Math.pow(2,-10*u)*Math.sin((u-e)/n)+1}}function i(t,n){t=Math.max(1,O(t,1)),n=O(n,.3)*j;var e=n*Math.asin(1/t);return function(u){return t*Math.pow(2,10*--u)*Math.sin((e-u)/n)}}function o(t){return t=1.525*O(t,1.70158),function(n){return((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}}function r(t){return t=O(t,1.70158),function(n){return--n*n*((t+1)*n+t)+1}}function s(t){return t=O(t,1.70158),function(n){return n*n*((t+1)*n-t)}}function c(t){return z>t?J*t*t:B>t?J*(t-=A)*t+C:E>t?J*(t-=D)*t+F:J*(t-=G)*t+H}function a(t){return((t*=2)<=1?1-c(1-t):c(t-1)+1)/2}function f(t){return 1-c(1-t)}function h(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function M(t){return Math.sqrt(1- --t*t)}function p(t){return 1-Math.sqrt(1-t*t)}function l(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function w(t){return 1-Math.pow(2,-10*t)}function b(t){return Math.pow(2,10*t-10)}function d(t){return(1-Math.cos(K*t))/2}function y(t){return Math.sin(t*L)}function x(t){return 1-Math.cos(t*L)}function q(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function k(t){return--t*t*t+1}function m(t){return t*t*t}function g(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function v(t){return t*(2-t)}function $(t){return t*t}function I(t){return t=O(t,3),function(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}}function N(t){return t=O(t,3),function(n){return 1-Math.pow(1-n,t)}}function P(t){return t=O(t,3),function(n){return Math.pow(n,t)}}var j=1/(2*Math.PI),O=function(t,n){return null==t||isNaN(t)?n:+t},z=4/11,A=6/11,B=8/11,C=.75,D=9/11,E=10/11,F=.9375,G=21/22,H=63/64,J=1/z/z,K=Math.PI,L=K/2,Q=(new Map).set("linear-in",n).set("linear-out",n).set("linear-in-out",n).set("quad-in",$).set("quad-out",v).set("quad-in-out",g).set("cubic-in",m).set("cubic-out",k).set("cubic-in-out",q).set("poly-in",m).set("poly-out",k).set("poly-in-out",q).set("sin-in",x).set("sin-out",y).set("sin-in-out",d).set("exp-in",b).set("exp-out",w).set("exp-in-out",l).set("circle-in",p).set("circle-out",M).set("circle-in-out",h).set("bounce-in",f).set("bounce-out",c).set("bounce-in-out",a).set("back-in",s()).set("back-out",r()).set("back-in-out",o()).set("elastic-in",i()).set("elastic-out",u()).set("elastic-in-out",e()),R=(new Map).set("poly-in",P).set("poly-out",N).set("poly-in-out",I).set("back-in",s).set("back-out",r).set("back-in-out",o).set("elastic-in",i).set("elastic-out",u).set("elastic-in-out",e),S=function(t,e,u){var i=(t+="").indexOf("-");return 0>i&&(t+="-in"),arguments.length>1&&R.has(t)?R.get(t)(e,u):Q.get(t)||n};t.ease=S}); |
{ | ||
"name": "d3-ease", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Easing functions for smooth animation.", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"test": "faucet `find test -name '*-test.js'`", | ||
"prepublish": "npm run test && uglifyjs build/ease.js -c -m -o build/ease.min.js" | ||
"prepublish": "npm run test && uglifyjs build/ease.js -c -m -o build/ease.min.js && rm -f build/ease.zip && zip -j build/ease.zip -- LICENSE README.md build/ease.js build/ease.min.js" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
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
28039
383