{"name":"pasition","version":"0.0.0","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","_id":"pasition@0.0.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.0","_npmUser":{"name":"dntzhang","email":"mhtml5@qq.com"},"dist":{"integrity":"sha512-T2U6iiiocN+kGSnozNQLM9JKgpjeSS3qNOCgBglDHOdTl3I9ZjV6ztnTEy2iXnuguGtZes/NUT5jOGNLS9JwkQ==","shasum":"abdea4dedca90dd53baa7b1a8a23ffc6a3b557c1","tarball":"http://registry-npm.ywwl.com/pasition/download/pasition-0.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDF29IdT0VZtiMNu6UBPp8gtpjPa+o3bizCcV7XsKsJfwIhAK4Y2TbGN45+KEENhIYiRqejn7vD2OPOb4WPU4+G2Ubo"}],"size":349,"noattachment":false,"key":"/pasition/-/pasition-0.0.0.tgz"},"maintainers":[{"name":"dntzhang","email":"mhtml5@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pasition-0.0.0.tgz_1497416028155_0.8488301550969481"},"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":1497416028245,"_cnpm_publish_time":1497416028245,"dist-tags":{"latest":"1.0.3"}}