{"name":"pasition","version":"1.0.2","description":"Path Transition with little JS code, render to anywhere.","main":"dist/pasition.js","scripts":{"dev":"rollup -c","dist":"rollup -c","debug":"rollup -c -w","build":"npm run dev&&npm run dist"},"dependencies":{},"devDependencies":{"babel-plugin-external-helpers":"^6.18.0","babel-preset-es2015":"^6.18.0","babelrc-rollup":"^3.0.0","rollup":"^0.37.0","rollup-plugin-babel":"^2.7.1","rollup-plugin-license":"^0.3.0","rollup-plugin-uglify":"^1.0.1","rollup-watch":"^2.5.0"},"repository":{"type":"git","url":"git+https://github.com/AlloyTeam/pasition.git"},"keywords":["pasition","path","svg","canvas"],"author":{"name":"dntzhang"},"license":"MIT","bugs":{"url":"https://github.com/AlloyTeam/pasition/issues/new"},"homepage":"http://alloyteam.github.io/pasition","_id":"pasition@1.0.2","_nodeVersion":"10.13.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-bRSiXPqTZExDKzEH4dIeN/FNpjwARlx1VPy+ghUpyjrMpvAJYLN+eiwiJfSlLIJpgjFD1Eqtewufj3v+XyhOfA==","shasum":"18cfcc7c18daa8ba218ed45c61c1f6b6712b5e3d","tarball":"http://registry-npm.ywwl.com/pasition/download/pasition-1.0.2.tgz","fileCount":19,"unpackedSize":110397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZQBmCRA9TVsSAnZWagAA8xIP+wb1hSww5LMeEZt5zLPa\nQeZ/ccSvCH5qVjqPyhOamVLNtWru7qoCfRWFRLky9AxMy/YKX0S7vI2TB846\nFFFXEJWCg2T4BkcyH7MzHh4V1oh9ro2qWzuFCbD7W3hZ+WnTVrwHan4k5sl/\nJ6EW7tbfDndSgPEbTNLC7lp7ANiFoLkzfDpSFIlVBZs9sajMF/BX5r7r0C9S\noE7iaXbVTONZkzJ6AZmT/qXz/2BD8GYe64QqAOJU1HEyF3JBZTD5YOZysJYz\njjAtliLg3yjtUXG29+LL9giTZ1zhcaQNenhNjvdqMnPgeiuE2BZUw0yKbNoi\npmqL+InnFwsP7CL5aQFwBoSB4lqs1H/SV/cgvNuvJgnLFrBqmfMVTwZsG76A\nzi64rUKYvweKqludaFTSNDjnenfj1gbgaQNX0Hyq9s81OrQsX6RcMpBrNp7h\nEKqbTRfjT5T4WBbDXvyKc8VOvbTyJQrCGADNN4qOX94phlvshZTFU3bEfPuw\nAq0PQPEpGIoMnyJvrTP9duekOKE8Um4YgIX0+ljeNSRS5VZNwPT/+nkrzYNf\nzYohKA98Cyuvp3l6Thvwgr7CTwNclOzJf4kQWPbeyONPxUna6JN1mipCtvs9\nCdvvoqfSZWhpV9O95r1k53ZvOCHCo2wXKaRWbQFYHMA+W5+SZdAqWzKHsevK\nrSZa\r\n=Rurr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNDouXcl5I+x8cKixnTO3Wec2RcHa8FaPdte3YwUxdlAiB07y5bUMo8yVaENc56R3mKllejABasyADqzHYMHAabjA=="}],"size":24755,"noattachment":false,"key":"/pasition/-/pasition-1.0.2.tgz"},"maintainers":[{"name":"dntzhang","email":"mhtml5@qq.com"}],"_npmUser":{"name":"dntzhang","email":"mhtml5@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pasition_1.0.2_1566900318470_0.519940922640381"},"_hasShrinkwrap":false,"readme":"﻿\n<p align=\"center\">\n  <a href =\"##\"><img alt=\"pasition\" src=\"http://images2015.cnblogs.com/blog/105416/201706/105416-20170620094820476-131210795.gif\"></a><a href =\"##\"><img alt=\"pasition\" src=\"http://images2015.cnblogs.com/blog/105416/201706/105416-20170620094817554-48316107.gif\"></a>\n</p>\n<h3 align=\"center\">\nPasition - Path Transition with little JS code, render to anywhere.\n</h3>\n\n---\n\n## [中文 README](https://github.com/dntzhang/pasition/blob/master/docs/release.md)\n\n## DEMO\n\n* [https://dntzhang.github.io/pasition/](https://dntzhang.github.io/pasition/)\n\n## Install\n\n```\nnpm install pasition\n```\n\nor get js by the cdn address:\n\n[https://unpkg.com/pasition](https://unpkg.com/pasition)\n\n## Usage\n\n```js\npasition.animate({\n    from : fromPath,\n    to : toPath,\n    time : time,\n    easing : function(){ },\n    begin : function(shapes){ },\n    progress : function(shapes, percent){ },\n    end : function(shapes){ }\n})\n```\n\nyou can get the path from attr d of svg path element.\n\nSupported All the svg path commands:\n\n```\nM/m = moveto\nL/l = lineto\nH/h = horizontal lineto\nV/v = vertical lineto\nC/c = curveto\nS/s = smooth curveto\nA/a = elliptical Arc\nZ/z = closepath\nQ/q = quadratic Belzier curve\nT/t = smooth quadratic Belzier curveto\n```\n\nExample:\n\n```js\npasition.animate({\n    from: 'M 40 40 Q 60 80 80 40T 120 40 T 160 40 z',\n    to: 'M32,0C14.4,0,0,14.4,0,32s14.3,32,32,32 s32-14.3,32-32S49.7,0,32,0z',\n    time: 1000,\n    easing : function(){ },\n    begin:function(shapes){ },\n    progress : function(shapes, percent){\n        //render you shape to svg or canvas or webgl\n    },\n    end : function(shapes){ }\n});\n```\n\nyou can get the progressing shapes by `pasition.lerp`:\n\n```js\nvar shapes  = pasition.lerp(pathA, pathB, 0.5)\n//render shapes in canvas ,svg or anywhere you want\n...\n```\n\n# License\nThis content is released under the [MIT](http://opensource.org/licenses/MIT) License.\n","publish_time":1566900318662,"_cnpm_publish_time":1566900318662,"dist-tags":{"latest":"1.0.3"}}