{"name":"pasition","version":"1.0.3","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","gitHead":"86612f76b0b6d4b42b436d765bcd6fadc65ae0d3","_id":"pasition@1.0.3","_nodeVersion":"10.13.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-hsUNLhS7e5uWGkTtgbxoHMzCUb0PeboQelyqPmpRkAk26AkKal0Z6JfYWhjIEhZHIYzJTfr6Aom/BpBPrZXHnA==","shasum":"133d6ed4ae7ebd819d29651491d53f74151273bd","tarball":"http://registry-npm.ywwl.com/pasition/download/pasition-1.0.3.tgz","fileCount":19,"unpackedSize":109264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde2YcCRA9TVsSAnZWagAAtloQAI83Y9ICci2EtNHnfA08\nfU/XQGYxcdmUFp8eiy6I0UliPJOp3ih9E3XlkWbekRrkGE60dYYobS9zbPtL\nbst51usl4cM8sqcGeayrPWyK8BUlB5NfaNnw59epbE+1mF6Qk6dRxVw7saBr\nfvWWvaWknRCXzE3AnfOfckFEWNwGMcA8KJJZzTnERktC2V/PdtN2pJA3Ovsk\n5i9Vt5P/7vD39toTzgREWhZOdROItJtDr1fDiFVV9qUo/JWMqFJwyTV+7Lm1\nQEsA8u1TMQqtdcRnubKmFLpRCeU7MvbiwVhqZeN36xhig6ra3ZcmJvf0NwRs\nGXv/oLMPUSocjX6waTajSVHUwXg6FVjUKN9z7+JIGtcU/qeAwE+vYzSiRtQN\nr5KFvwE05qANYHwCvAF6ihr5zMOx3EqZi9YflVlf2pEKRcPiZwRTVg9r1b1H\nu9EXUbxlZ0/+P/dvd3tnvJdalot1RNP+d/2vGb+5FUw3PieJQFQ4sw81C3j9\n0iT0Ti6zyT1C+jwEEDBgYgUCzZ9lHdagc7D3RSsXfvpisONxQYgq6FU5UgxN\nDGp9Sp8Ad5WbmtfrKI0d5n/cj1EG/WNo/q1Zt6driE/j+Ubc9ybMzmf5lX1i\nx4bKY750ta4hRpvZJozhGMo1uhpbiUpSGxvBRZxSiwTXNkiyWbWl31S8tG0i\nd2gx\r\n=4qzC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjKj4+OkW5bY1fqUxAS7/7DBGcU90jAS345h9k/cn+BQIgBIccSZSj7OXWpglmOwI/MbqQQRTfvCs21q7YtmIBVgE="}],"size":24671,"noattachment":false,"key":"/pasition/-/pasition-1.0.3.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.3_1568368155986_0.21729690979469396"},"_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":1568368156141,"_cnpm_publish_time":1568368156141,"dist-tags":{"latest":"1.0.3"}}