Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3-ease

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-ease - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

img/backIn.png

2

build/bundle.js

@@ -1,1 +0,1 @@

var version = "0.3.0"; export * from "../index"; export {version};
var version = "0.3.1"; export * from "../index"; export {version};

@@ -180,3 +180,3 @@ (function (global, factory) {

var version = "0.3.0";
var version = "0.3.1";

@@ -183,0 +183,0 @@ exports.version = version;

@@ -1,1 +0,1 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("d3-ease",["exports"],t):t(n.d3_ease={})}(this,function(n){"use strict";function t(n,t){return function(u){return n(u,t)}}function u(n,t,u){return function(r){return n(r,t,u)}}function r(n,t){return t=C.call(t),t[0]=null,function(u){return t[0]=u,n.apply(null,t)}}function e(n,e,c){switch(arguments.length){case 1:return n;case 2:return t(n,e);case 3:return u(n,e,c);default:return r(n,arguments)}}function c(n){return+n}function i(n){return n*n}function o(n){return n*(2-n)}function a(n){return((n*=2)<=1?n*n:--n*(2-n)+1)/2}function l(n){return n*n*n}function f(n){return--n*n*n+1}function s(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}function h(n,t){return null==t&&(t=3),Math.pow(n,t)}function M(n,t){return null==t&&(t=3),1-Math.pow(1-n,t)}function p(n,t){return null==t&&(t=3),((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}function I(n){return 1-Math.cos(n*E)}function O(n){return Math.sin(n*E)}function d(n){return(1-Math.cos(D*n))/2}function b(n){return Math.pow(2,10*n-10)}function w(n){return 1-Math.pow(2,-10*n)}function x(n){return((n*=2)<=1?Math.pow(2,10*n-10):2-Math.pow(2,10-10*n))/2}function y(n){return 1-Math.sqrt(1-n*n)}function q(n){return Math.sqrt(1- --n*n)}function m(n){return((n*=2)<=1?1-Math.sqrt(1-n*n):Math.sqrt(1-(n-=2)*n)+1)/2}function k(n){return 1-g(1-n)}function g(n){return F>n?S*n*n:H>n?S*(n-=G)*n+J:L>n?S*(n-=K)*n+N:S*(n-=Q)*n+R}function v(n){return((n*=2)<=1?1-g(1-n):g(n-1)+1)/2}function P(n,t){return t=null==t?1.70158:+t,n*n*((t+1)*n-t)}function j(n,t){return t=null==t?1.70158:+t,--n*n*((t+1)*n+t)+1}function A(n,t){return t=null==t?1.70158:+t,((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}function _(n,t,u){return t=null==t?1:Math.max(1,t),u=(null==u?.3:u)/T,t*Math.pow(2,10*--n)*Math.sin((u*Math.asin(1/t)-n)/u)}function z(n,t,u){return t=null==t?1:Math.max(1,t),u=(null==u?.3:u)/T,1-t*Math.pow(2,-10*n)*Math.sin((+n+u*Math.asin(1/t))/u)}function B(n,t,u){t=null==t?1:Math.max(1,t),u=(null==u?.3:u)/T;var r=u*Math.asin(1/t);return((n=2*n-1)<0?t*Math.pow(2,10*n)*Math.sin((r-n)/u):2-t*Math.pow(2,-10*n)*Math.sin((r+n)/u))/2}var C=Array.prototype.slice,D=Math.PI,E=D/2,F=4/11,G=6/11,H=8/11,J=.75,K=9/11,L=10/11,N=.9375,Q=21/22,R=63/64,S=1/F/F,T=2*Math.PI,U="0.3.0";n.version=U,n.bind=e,n.linear=c,n.linearIn=c,n.linearOut=c,n.linearInOut=c,n.quad=i,n.quadIn=i,n.quadOut=o,n.quadInOut=a,n.cubic=l,n.cubicIn=l,n.cubicOut=f,n.cubicInOut=s,n.poly=h,n.polyIn=h,n.polyOut=M,n.polyInOut=p,n.sin=I,n.sinIn=I,n.sinOut=O,n.sinInOut=d,n.exp=b,n.expIn=b,n.expOut=w,n.expInOut=x,n.circle=y,n.circleIn=y,n.circleOut=q,n.circleInOut=m,n.bounce=k,n.bounceIn=k,n.bounceOut=g,n.bounceInOut=v,n.back=P,n.backIn=P,n.backOut=j,n.backInOut=A,n.elastic=_,n.elasticIn=_,n.elasticOut=z,n.elasticInOut=B});
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("d3-ease",["exports"],t):t(n.d3_ease={})}(this,function(n){"use strict";function t(n,t){return function(u){return n(u,t)}}function u(n,t,u){return function(r){return n(r,t,u)}}function r(n,t){return t=C.call(t),t[0]=null,function(u){return t[0]=u,n.apply(null,t)}}function e(n,e,c){switch(arguments.length){case 1:return n;case 2:return t(n,e);case 3:return u(n,e,c);default:return r(n,arguments)}}function c(n){return+n}function i(n){return n*n}function o(n){return n*(2-n)}function a(n){return((n*=2)<=1?n*n:--n*(2-n)+1)/2}function l(n){return n*n*n}function f(n){return--n*n*n+1}function s(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}function h(n,t){return null==t&&(t=3),Math.pow(n,t)}function M(n,t){return null==t&&(t=3),1-Math.pow(1-n,t)}function p(n,t){return null==t&&(t=3),((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}function I(n){return 1-Math.cos(n*E)}function O(n){return Math.sin(n*E)}function d(n){return(1-Math.cos(D*n))/2}function b(n){return Math.pow(2,10*n-10)}function w(n){return 1-Math.pow(2,-10*n)}function x(n){return((n*=2)<=1?Math.pow(2,10*n-10):2-Math.pow(2,10-10*n))/2}function y(n){return 1-Math.sqrt(1-n*n)}function q(n){return Math.sqrt(1- --n*n)}function m(n){return((n*=2)<=1?1-Math.sqrt(1-n*n):Math.sqrt(1-(n-=2)*n)+1)/2}function k(n){return 1-g(1-n)}function g(n){return F>n?S*n*n:H>n?S*(n-=G)*n+J:L>n?S*(n-=K)*n+N:S*(n-=Q)*n+R}function v(n){return((n*=2)<=1?1-g(1-n):g(n-1)+1)/2}function P(n,t){return t=null==t?1.70158:+t,n*n*((t+1)*n-t)}function j(n,t){return t=null==t?1.70158:+t,--n*n*((t+1)*n+t)+1}function A(n,t){return t=null==t?1.70158:+t,((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}function _(n,t,u){return t=null==t?1:Math.max(1,t),u=(null==u?.3:u)/T,t*Math.pow(2,10*--n)*Math.sin((u*Math.asin(1/t)-n)/u)}function z(n,t,u){return t=null==t?1:Math.max(1,t),u=(null==u?.3:u)/T,1-t*Math.pow(2,-10*n)*Math.sin((+n+u*Math.asin(1/t))/u)}function B(n,t,u){t=null==t?1:Math.max(1,t),u=(null==u?.3:u)/T;var r=u*Math.asin(1/t);return((n=2*n-1)<0?t*Math.pow(2,10*n)*Math.sin((r-n)/u):2-t*Math.pow(2,-10*n)*Math.sin((r+n)/u))/2}var C=Array.prototype.slice,D=Math.PI,E=D/2,F=4/11,G=6/11,H=8/11,J=.75,K=9/11,L=10/11,N=.9375,Q=21/22,R=63/64,S=1/F/F,T=2*Math.PI,U="0.3.1";n.version=U,n.bind=e,n.linear=c,n.linearIn=c,n.linearOut=c,n.linearInOut=c,n.quad=i,n.quadIn=i,n.quadOut=o,n.quadInOut=a,n.cubic=l,n.cubicIn=l,n.cubicOut=f,n.cubicInOut=s,n.poly=h,n.polyIn=h,n.polyOut=M,n.polyInOut=p,n.sin=I,n.sinIn=I,n.sinOut=O,n.sinInOut=d,n.exp=b,n.expIn=b,n.expOut=w,n.expInOut=x,n.circle=y,n.circleIn=y,n.circleOut=q,n.circleInOut=m,n.bounce=k,n.bounceIn=k,n.bounceOut=g,n.bounceInOut=v,n.back=P,n.backIn=P,n.backOut=j,n.backInOut=A,n.elastic=_,n.elasticIn=_,n.elasticOut=z,n.elasticInOut=B});
{
"name": "d3-ease",
"version": "0.3.0",
"version": "0.3.1",
"description": "Easing functions for smooth animation.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -11,7 +11,13 @@ # d3-ease

If you use NPM, `npm install d3-ease`. Otherwise, download the [latest release](https://github.com/d3/d3-ease/releases/latest).
If you use NPM, `npm install d3-ease`. Otherwise, download the [latest release](https://github.com/d3/d3-ease/releases/latest). The released bundle supports AMD, CommonJS, and vanilla environments. Create a custom build using [Rollup](https://github.com/rollup/rollup) or your preferred bundler. You can also load directly from [d3js.org](https://d3js.org):
```html
<script src="https://d3js.org/d3-ease.v0.3.min.js"></script>
```
In a vanilla environment, a `d3_ease` global is exported. [Try d3-ease in your browser.](https://tonicdev.com/npm/d3-ease)
## API Reference
<a name="bind" href="#bind">#</a> <b>bind</b>(<i>type</i>[, <i>parameters…</i>])
<a name="bind" href="#bind">#</a> d3_ease.<b>bind</b>(<i>type</i>[, <i>parameters…</i>])

@@ -21,196 +27,186 @@ A convenience function for binding zero or more *parameters* to the specified easing function *type*. If no *parameters* are specified, this function simply returns *type*. The returned function takes a single argument *t* and passes any optional *parameters* to the underlying function *type*. For example, the following statements are equivalent:

```js
bind(polyIn, 3)(0.5); // 0.125
polyIn(0.5, 3); // 0.125
bind(cubicIn)(0.5); // 0.125
cubicIn(0.5); // 0.125
d3_ease.bind(d3_ease.polyIn, 3)(0.5); // 0.125
d3_ease.polyIn(0.5, 3); // 0.125
d3_ease.bind(d3_ease.cubicIn)(0.5); // 0.125
d3_ease.cubicIn(0.5); // 0.125
```
<a name="linear" href="#linear">#</a> <b>linear</b>(<i>t</i>)
<br><a href="#linear">#</a> <b>linearIn</b>(<i>t</i>)
<br><a href="#linear">#</a> <b>linearOut</b>(<i>t</i>)
<br><a href="#linear">#</a> <b>linearInOut</b>(<i>t</i>)
<a name="linear" href="#linear">#</a> d3_ease.<b>linear</b>(<i>t</i>)
<br><a href="#linear">#</a> d3_ease.<b>linearIn</b>(<i>t</i>)
<br><a href="#linear">#</a> d3_ease.<b>linearOut</b>(<i>t</i>)
<br><a href="#linear">#</a> d3_ease.<b>linearInOut</b>(<i>t</i>)
Linear easing; the identity function. Returns *t*.
[![linearin](https://cloud.githubusercontent.com/assets/230541/11385023/b862a592-92c9-11e5-986e-c531426ac525.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#linearIn)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/linearIn.png" alt="linearIn" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#linearIn)
<a name="poly" href="#poly">#</a> <b>poly</b>(<i>t</i>[, <i>e</i>])
<br><a name="polyIn" href="#polyIn">#</a> <b>polyIn</b>(<i>t</i>[, <i>e</i>])
<a name="poly" href="#poly">#</a> d3_ease.<b>poly</b>(<i>t</i>[, <i>e</i>])
<br><a name="polyIn" href="#polyIn">#</a> d3_ease.<b>polyIn</b>(<i>t</i>[, <i>e</i>])
Polynomial easing; raises *t* to the specified power *e*. If *e* is not specified, it defaults to 3, equivalent to [cubicIn](#cubicIn).
[![polyin](https://cloud.githubusercontent.com/assets/230541/11389991/6e5263d0-92fa-11e5-84c2-797645dabe1f.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#polyIn)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/polyIn.png" alt="polyIn" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#polyIn)
<a name="polyOut" href="#polyOut">#</a> <b>polyOut</b>(<i>t</i>[, <i>e</i>])
<a name="polyOut" href="#polyOut">#</a> d3_ease.<b>polyOut</b>(<i>t</i>[, <i>e</i>])
Reverse polynomial easing; equivalent to 1 - [polyIn](#polyIn)(1 - *t*, *e*). If *e* is not specified, it defaults to 3, equivalent to [cubicOut](#cubicOut).
[![polyout](https://cloud.githubusercontent.com/assets/230541/11389990/6e4bdfb0-92fa-11e5-81f9-177f41096921.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#polyOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/polyOut.png" alt="polyOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#polyOut)
<a name="polyInOut" href="#polyInOut">#</a> <b>polyInOut</b>(<i>t</i>[, <i>e</i>])
<a name="polyInOut" href="#polyInOut">#</a> d3_ease.<b>polyInOut</b>(<i>t</i>[, <i>e</i>])
Symmetric polynomial easing; scales [polyIn](#polyIn) for *t* in [0, 0.5] and [polyOut](#polyOut) for *t* in [0.5, 1]. If *e* is not specified, it defaults to 3, equivalent to [cubicInOut](#cubicInOut).
[![polyinout](https://cloud.githubusercontent.com/assets/230541/11389985/6e3f0fd8-92fa-11e5-965f-aa6d06ae932f.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#polyInOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/polyInOut.png" alt="polyInOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#polyInOut)
<a name="quad" href="#quad">#</a> <b>quad</b>(<i>t</i>)
<br><a name="quadIn" href="#quadIn">#</a> <b>quadIn</b>(<i>t</i>)
<a name="quad" href="#quad">#</a> d3_ease.<b>quad</b>(<i>t</i>)
<br><a name="quadIn" href="#quadIn">#</a> d3_ease.<b>quadIn</b>(<i>t</i>)
Quadratic easing; equivalent to [polyIn](#polyIn)(*t*, 2).
[![quadin](https://cloud.githubusercontent.com/assets/230541/11385022/b85cefe4-92c9-11e5-84bf-42fc3e094b11.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#quadIn)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/quadIn.png" alt="quadIn" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#quadIn)
<a name="quadOut" href="#quadOut">#</a> <b>quadOut</b>(<i>t</i>)
<a name="quadOut" href="#quadOut">#</a> d3_ease.<b>quadOut</b>(<i>t</i>)
Reverse quadratic easing; equivalent to 1 - [quadIn](#quadIn)(1 - *t*). Also equivalent to [polyOut](#polyOut)(*t*, 2).
[![quadout](https://cloud.githubusercontent.com/assets/230541/11385021/b85ab2ce-92c9-11e5-9293-a0a54476c4fa.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#quadOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/quadOut.png" alt="quadOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#quadOut)
<a name="quadInOut" href="#quadInOut">#</a> <b>quadInOut</b>(<i>t</i>)
<a name="quadInOut" href="#quadInOut">#</a> d3_ease.<b>quadInOut</b>(<i>t</i>)
Symmetric quadratic easing; scales [quadIn](#quadIn) for *t* in [0, 0.5] and [quadOut](#quadOut) for *t* in [0.5, 1]. Also equivalent to [polyInOut](#polyInOut)(*t*, 2).
[![quadinout](https://cloud.githubusercontent.com/assets/230541/11385020/b85950fa-92c9-11e5-9c83-7caf28a56487.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#quadInOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/quadInOut.png" alt="quadInOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#quadInOut)
<a name="cubic" href="#cubic">#</a> <b>cubic</b>(t)
<br><a name="cubicIn" href="#cubicIn">#</a> <b>cubicIn</b>(<i>t</i>)
<a name="cubic" href="#cubic">#</a> d3_ease.<b>cubic</b>(t)
<br><a name="cubicIn" href="#cubicIn">#</a> d3_ease.<b>cubicIn</b>(<i>t</i>)
Cubic easing; equivalent to [polyIn](#polyIn)(*t*, 3).
[![cubicin](https://cloud.githubusercontent.com/assets/230541/11385019/b85665de-92c9-11e5-883e-84f769bfb34d.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#cubicIn)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/cubicIn.png" alt="cubicIn" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#cubicIn)
<a name="cubicOut" href="#cubicOut">#</a> <b>cubicOut</b>(<i>t</i>)
<a name="cubicOut" href="#cubicOut">#</a> d3_ease.<b>cubicOut</b>(<i>t</i>)
Reverse cubic easing; equivalent to 1 - [cubicIn](#cubicIn)(1 - *t*). Also equivalent to [polyOut](#polyOut)(*t*, 3).
[![cubicout](https://cloud.githubusercontent.com/assets/230541/11385018/b84e363e-92c9-11e5-8402-084bba9a48fd.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#cubicOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/cubicOut.png" alt="cubicOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#cubicOut)
<a name="cubicInOut" href="#cubicInOut">#</a> <b>cubicInOut</b>(<i>t</i>)
<a name="cubicInOut" href="#cubicInOut">#</a> d3_ease.<b>cubicInOut</b>(<i>t</i>)
Symmetric cubic easing; scales [cubicIn](#cubicIn) for *t* in [0, 0.5] and [cubicOut](#cubicOut) for *t* in [0.5, 1]. Also equivalent to [polyInOut](#polyInOut)(*t*, 3).
[![cubicinout](https://cloud.githubusercontent.com/assets/230541/11385017/b84d8054-92c9-11e5-9c72-7c0071a7e821.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#cubicInOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/cubicInOut.png" alt="cubicInOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#cubicInOut)
<a name="sin" href="#sin">#</a> <b>sin</b>(<i>t</i>)
<br><a name="sinIn" href="#sinIn">#</a> <b>sinIn</b>(<i>t</i>)
<a name="sin" href="#sin">#</a> d3_ease.<b>sin</b>(<i>t</i>)
<br><a name="sinIn" href="#sinIn">#</a> d3_ease.<b>sinIn</b>(<i>t</i>)
Sinusoidal easing; returns sin(*t*).
[![sinin](https://cloud.githubusercontent.com/assets/230541/11385015/b846cf98-92c9-11e5-864d-a85357a5e8c4.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#sinIn)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/sinIn.png" alt="sinIn" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#sinIn)
<a name="sinOut" href="#sinOut">#</a> <b>sinOut</b>(<i>t</i>)
<a name="sinOut" href="#sinOut">#</a> d3_ease.<b>sinOut</b>(<i>t</i>)
Reverse sinusoidal easing; equivalent to 1 - [sinIn](#sinIn)(1 - *t*).
[![sinout](https://cloud.githubusercontent.com/assets/230541/11385016/b848e60c-92c9-11e5-865e-9fc918a54e19.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#sinOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/sinOut.png" alt="sinOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#sinOut)
<a name="sinInOut" href="#sinInOut">#</a> <b>sinInOut</b>(<i>t</i>)
<a name="sinInOut" href="#sinInOut">#</a> d3_ease.<b>sinInOut</b>(<i>t</i>)
Symmetric sinusoidal easing; scales [sinIn](#sinIn) for *t* in [0, 0.5] and [sinOut](#sinOut) for *t* in [0.5, 1].
[![sininout](https://cloud.githubusercontent.com/assets/230541/11385014/b8468510-92c9-11e5-9be2-006b5eefa234.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#sinInOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/sinInOut.png" alt="sinInOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#sinInOut)
<a name="exp" href="#exp">#</a> <b>exp</b>(<i>t</i>)
<br><a name="expIn" href="#expIn">#</a> <b>expIn</b>(<i>t</i>)
<a name="exp" href="#exp">#</a> d3_ease.<b>exp</b>(<i>t</i>)
<br><a name="expIn" href="#expIn">#</a> d3_ease.<b>expIn</b>(<i>t</i>)
Exponential easing; raises 2 to the power 10 \* (*t* - 1).
[![expin](https://cloud.githubusercontent.com/assets/230541/11385013/b8413038-92c9-11e5-9f91-0478e280f68b.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#expIn)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/expIn.png" alt="expIn" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#expIn)
<a name="expOut" href="#expOut">#</a> <b>expOut</b>(<i>t</i>)
<a name="expOut" href="#expOut">#</a> d3_ease.<b>expOut</b>(<i>t</i>)
Reverse exponential easing; equivalent to 1 - [expIn](#expIn)(1 - *t*).
[![expout](https://cloud.githubusercontent.com/assets/230541/11385012/b83ba3b6-92c9-11e5-9117-007ef1c067d5.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#expOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/expOut.png" alt="expOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#expOut)
<a name="expInOut" href="#expInOut">#</a> <b>expInOut</b>(<i>t</i>)
<a name="expInOut" href="#expInOut">#</a> d3_ease.<b>expInOut</b>(<i>t</i>)
Symmetric exponential easing; scales [expIn](#expIn) for *t* in [0, 0.5] and [expOut](#expOut) for *t* in [0.5, 1].
[![expinout](https://cloud.githubusercontent.com/assets/230541/11385011/b8387146-92c9-11e5-8208-2cf8a9eb29da.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#expInOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/expInOut.png" alt="expInOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#expInOut)
<a name="circle" href="#circle">#</a> <b>circle</b>(<i>t</i>)
<br><a name="circleIn" href="#circleIn">#</a> <b>circleIn</b>(<i>t</i>)
<a name="circle" href="#circle">#</a> d3_ease.<b>circle</b>(<i>t</i>)
<br><a name="circleIn" href="#circleIn">#</a> d3_ease.<b>circleIn</b>(<i>t</i>)
Circular easing.
[![circlein](https://cloud.githubusercontent.com/assets/230541/11385009/b8320496-92c9-11e5-8292-fe703e467f89.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#circleIn)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/circleIn.png" alt="circleIn" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#circleIn)
<a name="circleOut" href="#circleOut">#</a> <b>circleOut</b>(<i>t</i>)
<a name="circleOut" href="#circleOut">#</a> d3_ease.<b>circleOut</b>(<i>t</i>)
Reverse circular easing; equivalent to 1 - [circleIn](#circleIn)(1 - *t*).
[![circleout](https://cloud.githubusercontent.com/assets/230541/11385008/b831d6a6-92c9-11e5-9331-c8d64011103f.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#circleOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/circleOut.png" alt="circleOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#circleOut)
<a name="circleInOut" href="#circleInOut">#</a> <b>circleInOut</b>(<i>t</i>)
<a name="circleInOut" href="#circleInOut">#</a> d3_ease.<b>circleInOut</b>(<i>t</i>)
Symmetric circular easing; scales [circleIn](#circleIn) for *t* in [0, 0.5] and [circleOut](#circleOut) for *t* in [0.5, 1].
[![circleinout](https://cloud.githubusercontent.com/assets/230541/11385010/b832d510-92c9-11e5-9170-32e8eb96a2ed.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#circleInOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/circleInOut.png" alt="circleInOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#circleInOut)
<a name="elastic" href="#elastic">#</a> <b>elastic</b>(<i>t</i>[, <i>a</i>[, <i>p</i>]])
<br><a name="elasticIn" href="#elasticIn">#</a> <b>elasticIn</b>(<i>t</i>[, <i>a</i>[, <i>p</i>]])
<a name="elastic" href="#elastic">#</a> d3_ease.<b>elastic</b>(<i>t</i>[, <i>a</i>[, <i>p</i>]])
<br><a name="elasticIn" href="#elasticIn">#</a> d3_ease.<b>elasticIn</b>(<i>t</i>[, <i>a</i>[, <i>p</i>]])
Elastic easing, like a rubber band. The parameters *a* and *p* control the amplitude and period of the oscillation; if not specified, they default to 1 and 0.3, respectively.
[![elasticin](https://cloud.githubusercontent.com/assets/230541/11389986/6e3f1ff0-92fa-11e5-8caf-b404dd4e9175.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#elasticIn)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/elasticIn.png" alt="elasticIn" width="100%" height="360">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#elasticIn)
<a name="elasticOut" href="#elasticOut">#</a> <b>elasticOut</b>(<i>t</i>[, <i>a</i>[, <i>p</i>]])
<a name="elasticOut" href="#elasticOut">#</a> d3_ease.<b>elasticOut</b>(<i>t</i>[, <i>a</i>[, <i>p</i>]])
Reverse elastic easing; equivalent to 1 - [elasticIn](#elasticIn)(1 - *t*).
[![elasticout](https://cloud.githubusercontent.com/assets/230541/11389984/6e37c804-92fa-11e5-91ef-4e4d79f0e79b.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#elasticOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/elasticOut.png" alt="elasticOut" width="100%" height="360">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#elasticOut)
<a name="elasticInOut" href="#elasticInOut">#</a> <b>elasticInOut</b>(<i>t</i>[, <i>a</i>[, <i>p</i>]])
<a name="elasticInOut" href="#elasticInOut">#</a> d3_ease.<b>elasticInOut</b>(<i>t</i>[, <i>a</i>[, <i>p</i>]])
Symmetric elastic easing; scales [elasticIn](#elasticIn) for *t* in [0, 0.5] and [elasticOut](#elasticOut) for *t* in [0.5, 1].
[![elasticinout](https://cloud.githubusercontent.com/assets/230541/11389983/6e2506ce-92fa-11e5-8207-b6f25d3f9e79.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#elasticInOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/elasticInOut.png" alt="elasticInOut" width="100%" height="360">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#elasticInOut)
<a name="back" href="#back">#</a> <b>back</b>(<i>t</i>[, <i>s</i>])
<br><a name="backIn" href="#backIn">#</a> <b>backIn</b>(<i>t</i>[, <i>s</i>])
<a name="back" href="#back">#</a> d3_ease.<b>back</b>(<i>t</i>[, <i>s</i>])
<br><a name="backIn" href="#backIn">#</a> d3_ease.<b>backIn</b>(<i>t</i>[, <i>s</i>])
[Anticipatory](https://en.wikipedia.org/wiki/12_basic_principles_of_animation#Anticipation) easing, like a dancer bending his knees before jumping off the floor. The amount of anticipation (“backing up”) is determined by the parameter *s*; it not specified, it defaults to 1.70158.
[![backin](https://cloud.githubusercontent.com/assets/230541/11389989/6e422952-92fa-11e5-86fe-6fbc3c2a9917.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#backIn)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/backIn.png" alt="backIn" width="100%" height="300">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#backIn)
<a name="backOut" href="#backOut">#</a> <b>backOut</b>(<i>t</i>[, <i>s</i>])
<a name="backOut" href="#backOut">#</a> d3_ease.<b>backOut</b>(<i>t</i>[, <i>s</i>])
Reverse anticipatory easing; equivalent to 1 - [backIn](#backIn)(1 - *t*).
[![backout](https://cloud.githubusercontent.com/assets/230541/11389988/6e415770-92fa-11e5-9e48-f3a674f6ade1.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#backOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/backOut.png" alt="backOut" width="100%" height="300">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#backOut)
<a name="backInOut" href="#backInOut">#</a> <b>backInOut</b>(<i>t</i>[, <i>s</i>])
<a name="backInOut" href="#backInOut">#</a> d3_ease.<b>backInOut</b>(<i>t</i>[, <i>s</i>])
Symmetric anticipatory easing; scales [backIn](#backIn) for *t* in [0, 0.5] and [backOut](#backOut) for *t* in [0.5, 1].
[![backinout](https://cloud.githubusercontent.com/assets/230541/11389987/6e3ff290-92fa-11e5-98e3-b4f3d941edd3.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#backInOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/backInOut.png" alt="backInOut" width="100%" height="300">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#backInOut)
<a name="bounce" href="#bounce">#</a> <b>bounce</b>(<i>t</i>)
<br><a name="bounceIn" href="#bounceIn">#</a> <b>bounceIn</b>(<i>t</i>)
<a name="bounce" href="#bounce">#</a> d3_ease.<b>bounce</b>(<i>t</i>)
<br><a name="bounceIn" href="#bounceIn">#</a> d3_ease.<b>bounceIn</b>(<i>t</i>)
Bounce easing, like a rubber ball.
[![bouncein](https://cloud.githubusercontent.com/assets/230541/11385007/b82c6126-92c9-11e5-93f6-71ed872e43ae.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#bounceIn)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/bounceIn.png" alt="bounceIn" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#bounceIn)
<a name="bounceOut" href="#bounceOut">#</a> <b>bounceOut</b>(<i>t</i>)
<a name="bounceOut" href="#bounceOut">#</a> d3_ease.<b>bounceOut</b>(<i>t</i>)
Reverse bounce easing; equivalent to 1 - [bounceIn](#bounceIn)(1 - *t*).
[![bounceout](https://cloud.githubusercontent.com/assets/230541/11385006/b827f9d8-92c9-11e5-8ab2-3c52e1923362.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#bounceOut)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/bounceOut.png" alt="bounceOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#bounceOut)
<a name="bounceInOut" href="#bounceInOut">#</a> <b>bounceInOut</b>(<i>t</i>)
<a name="bounceInOut" href="#bounceInOut">#</a> d3_ease.<b>bounceInOut</b>(<i>t</i>)
Symmetric bounce easing; scales [bounceIn](#bounceIn) for *t* in [0, 0.5] and [bounceOut](#bounceOut) for *t* in [0.5, 1].
[![bounceinout](https://cloud.githubusercontent.com/assets/230541/11385005/b81edca4-92c9-11e5-9511-0f50d6a83fd8.png)](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#bounceInOut)
## Changes from from D3 3.x:
* Easing functions are now referenced symbolically (such as [cubicInOut](#cubicInOut)), rather than by string (`cubic-in-out`).
* The [elastic](#elastic) and [bounce](#bounce) easing types have been reversed for consistency with Penner: in is now out, out is now in, and out-in is now in-out. The out-in easing mode has been removed: it made no sense (except for elastic and bounce, which were reversed).
* The interpretation of optional parameters to the elastic and back easing functions has been corrected.
* Easing functions no longer clamp the output to 0 and 1 when *t* is less than or equal to 0 or greater than or equal to 1, respectively. (Note: [transitions](https://github.com/d3/d3-transition) are still guaranteed to end at *t* = 1 if not interrupted, regardless of easing.)
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/bounceInOut.png" alt="bounceInOut" width="100%" height="240">](http://bl.ocks.org/mbostock/248bac3b8e354a9103c4/#bounceInOut)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc