{"name":"pasition","version":"0.2.0","description":"Path Transition.","main":"dist/pasition.js","scripts":{"dev":"rollup -c","dist":"rollup -c","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":"42f9fe92e616bebddc708e77389dc02f04c30908","_id":"pasition@0.2.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.0","_npmUser":{"name":"dntzhang","email":"mhtml5@qq.com"},"dist":{"integrity":"sha512-z6dv5Phu5qfEoVLc9BXrTAcXha5Y9rws9DIGtUakxHVImzTvkEYQXDUcKbx6q6YqVMGzahsw20VYO/0572mMHg==","shasum":"18be0eedd11b4c21fbc6b9c7b39e26dce28ee927","tarball":"http://registry-npm.ywwl.com/pasition/download/pasition-0.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGSKvrJ/xeh43sHGW6ypR5S2oI/6J+u1OrxkLTQA6DB0AiAMvzskS5NcPmmXZcW+3KwF6fpl2kAEE9wHqvuvlxCtGw=="}],"size":30244,"noattachment":false,"key":"/pasition/-/pasition-0.2.0.tgz"},"maintainers":[{"name":"dntzhang","email":"mhtml5@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pasition-0.2.0.tgz_1497495008201_0.29504905291832983"},"directories":{},"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":1497495008312,"_cnpm_publish_time":1497495008312,"dist-tags":{"latest":"1.0.3"}}