{"name":"bezier-easing","version":"2.0.1","description":"BezierEasing provides Cubic Bezier Curve easing which generalizes easing functions exactly like in CSS Transitions.","keywords":["cubic-bezier","bezier","easing","interpolation","animation","timing","timing-function"],"author":{"name":"Gaëtan Renaudeau","email":"renaudeau.gaetan@gmail.com"},"main":"index.js","license":"MIT","scripts":{"test":"mocha","benchmark":"node benchmark.js","visual":"budo visual-demo.js","build":"browserify --standalone BezierEasing index.js | uglifyjs -cm > build.js"},"devDependencies":{"assert":"^1.3.0","benchmark":"^2.1.0","browserify":"^13.0.0","budo":"^8.1.0","mocha":"^2.4.5","uglify-js":"^2.6.2"},"repository":{"type":"git","url":"git://github.com/gre/bezier-easing.git"},"gitHead":"903268cc79029bbabd0ad8de686f03175b676fc5","bugs":{"url":"https://github.com/gre/bezier-easing/issues"},"homepage":"https://github.com/gre/bezier-easing#readme","_id":"bezier-easing@2.0.1","_shasum":"c8b675b9e601958abc6a59796878cfadd3a55a99","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.0","_npmUser":{"name":"gre","email":"renaudeau.gaetan@gmail.com"},"dist":{"shasum":"c8b675b9e601958abc6a59796878cfadd3a55a99","tarball":"http://registry-npm.ywwl.com/bezier-easing/download/bezier-easing-2.0.1.tgz","integrity":"sha512-CTpbPoGgGI8dpR3LkWWJl2vFUW9neHkvaBuuEP44CL5n6g3J6HMTnS9722P9Nas5aY1dY0bbwFC9ynvMTf45hw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDwpKUlLhBVI9SVRJ/IM7bF66JyxQAAya/bRyRIlAb8oAiAM66+SvozME/g2NyFnTEameInvQeJhcVtSBXtCTqS48Q=="}],"size":5881,"noattachment":false,"key":"/bezier-easing/-/bezier-easing-2.0.1.tgz"},"maintainers":[{"name":"gre","email":"renaudeau.gaetan@gmail.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/bezier-easing-2.0.1.tgz_1457811627192_0.9609831897541881"},"directories":{},"readme":"bezier-easing [![Build Status](https://travis-ci.org/gre/bezier-easing.png)](https://travis-ci.org/gre/bezier-easing)\n===\n\nBezierEasing provides **Cubic Bezier** Curve easing which generalizes easing functions (ease-in, ease-out, ease-in-out, ...any other custom curve) exactly like in CSS Transitions.\n\nImplementing efficient lookup is not easy because it implies projecting\nthe X coordinate to a Bezier Curve.\nThis micro library uses fast heuristics (involving dichotomic search, newton-raphson, sampling) to focus on **performance** and **precision**.\n\n> It is heavily based on implementations available in Firefox and Chrome (for the CSS transition-timing-function property).\n\nUsage\n-------\n\n```javascript\nvar easing = BezierEasing(0, 0, 1, 0.5);\n// easing allows to project x in [0.0,1.0] range onto the bezier-curve defined by the 4 points (see schema below).\nconsole.log(easing(0.0)); // 0.0\nconsole.log(easing(0.5)); // 0.3125\nconsole.log(easing(1.0)); // 1.0\n```\n\n(this schema is from the CSS spec)\n\n[![TimingFunction.png](https://www.w3.org/TR/css-timing-1/cubic-bezier-timing-curve.svg)](http://www.w3.org/TR/css3-transitions/#transition-timing-function-property)\n\n> `BezierEasing(P1.x, P1.y, P2.x, P2.y)`\n\nInstall\n-------\n\n[![npm install bezier-easing](https://nodei.co/npm/bezier-easing.png)](http://npmjs.org/package/bezier-easing)\n\nIt is the equivalent to [CSS Transitions' `transition-timing-function`](http://www.w3.org/TR/css3-transitions/#transition-timing-function-property).\n\n\nIn the same way you can define in CSS `cubic-bezier(0.42, 0, 0.58, 1)`,\nwith BezierEasing, you can define it using `BezierEasing(0.42, 0, 0.58, 1)` which have the `` function taking an X and computing the Y interpolated easing value (see schema).\n\nLicense\n-------\n\nMIT License.\n\nTests\n---\n\n[![Build Status](https://travis-ci.org/gre/bezier-easing.png)](https://travis-ci.org/gre/bezier-easing)\n\n```\nnpm test\n```\n\nSee also\n===\n\n- [https://github.com/gre/bezier-easing-editor/](https://github.com/gre/bezier-easing-editor/)\n\nWho use it?\n===\n\n- [React Native](https://github.com/facebook/react-native/blob/master/Libraries/Animated/src/bezier.js)\n- [Apple®](http://images.apple.com/v/mac-pro/home/b/scripts/overview.js) :)\n- [Velocity.js](https://github.com/julianshapiro/velocity)\n- [GLSL.io](http://glsl.io/) and [Diaporama Maker](https://github.com/gre/diaporama-maker)\n- [ipo](https://github.com/gre/ipo)\n\nMore informations\n-----------------\n\nImplementation based on this [article](http://greweb.me/2012/02/bezier-curve-based-easing-functions-from-concept-to-implementation/).\n\nContributing\n------------\n\nYou need a `node` installed.\n\nInstall the deps:\n\n```\nnpm install\n```\n\nThe library is in `index.js`.\n\nEnsure any modication will:\n- keep validating the tests (run `npm test`)\n- not bring performance regression (compare with `npm run benchmark` – don't rely 100% on its precision but it still helps to notice big gaps)\n- Run the visual example: `npm run visual`\n","publish_time":1457811629796,"_cnpm_publish_time":1457811629796,"dist-tags":{"latest":"3.2.0"}}