{"name":"pasition","version":"0.1.1","description":"Path Transition.","scripts":{},"dependencies":{},"devDependencies":{},"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":"1284015dbee8f78cc924f6727e4c2ed7c46d06b5","_id":"pasition@0.1.1","_npmVersion":"5.0.3","_nodeVersion":"8.1.0","_npmUser":{"name":"dntzhang","email":"mhtml5@qq.com"},"dist":{"integrity":"sha512-siVzpDtXhOHVRoOuoUbUEvqsRTpyoZ4nl7q8crluJ2iIIa8AjNIK6gEWZc9MLnnP4NzNiCoAPf+7F0EO/lGbvw==","shasum":"5b6370e147a672d50ded1b495619926618bbec8c","tarball":"http://registry-npm.ywwl.com/pasition/download/pasition-0.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1bwca24ldkeB/ct8eQ/Xc33V4hRWrtpzBku9NXcbKeAIhAM0negj3+iuItSzeY5EAW4XtwEXKHI5k7ck/co+mv0RE"}],"size":10467,"noattachment":false,"key":"/pasition/-/pasition-0.1.1.tgz"},"maintainers":[{"name":"dntzhang","email":"mhtml5@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pasition-0.1.1.tgz_1497432690597_0.4934082552790642"},"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":1497432691103,"_cnpm_publish_time":1497432691103,"dist-tags":{"latest":"1.0.3"}}