{"_id":"points-on-path","_rev":"5-aa3d0ef061d28171fb7081ccd14ffd55","name":"points-on-path","dist-tags":{"latest":"0.2.1"},"versions":{"0.0.1":{"name":"points-on-path","version":"0.0.1","description":"Estimate points on a SVG path","main":"lib/index.js","scripts":{"build":"rm -rf lib && tsc","lint":"tslint -p tsconfig.json","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/pshihn/points-on-path.git"},"keywords":["SVG","graphics"],"author":{"name":"Preet Shihn"},"license":"MIT","bugs":{"url":"https://github.com/pshihn/points-on-path/issues"},"homepage":"https://github.com/pshihn/points-on-path#readme","devDependencies":{"tslint":"^6.1.1","typescript":"^3.8.3"},"dependencies":{"path-data-parser":"0.0.2","points-on-curve":"0.0.1"},"gitHead":"7a4176d1028a34ca09d7630c8aa8ec9ed59ab74c","_id":"points-on-path@0.0.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-bGlZDLZMVKT+3n+YtP3KljfAfuP0X3ucKk1AQj0/x4oTbrmYlcjiPOFuEM5D/keNLFEFIgatpB1G9dlUwnlBBw==","shasum":"0483b0976a5b6f6fd39e98874275870d751bb26d","tarball":"https://registry.npmjs.org/points-on-path/-/points-on-path-0.0.1.tgz","fileCount":8,"unpackedSize":7056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekU7DCRA9TVsSAnZWagAALqcQAJ7LwPC2UGRzqyMvczxR\nsfYD9I6QIfznLy+/Bq2i98+uOQSDN3+gE7o8Mf9LuRnO60VV041nKzn3wwEu\ny6CYyPgNNwhWXT8hromIl/Hy4Rh/h/tAWx6ezqF1sase9CZOJvpSEF8qBSOD\nWMDToqwDofEpVgVwM0I2Z0WGVQkmTFhByI4ZLAMSM2QNObyaZjFJIlbKIl+3\n6sZ3BWzq2B1BkDVLC67sGBruU/GMeIlttwsXgkEB18pd1v8TLnTY3MO72rGN\n7v/aLaZxJmhqUx0Cj5lXlWTkg4Uu9kpmd9S/PHJcrSHUmYNu/pU0k5Bfu/A1\nQsEZJoTVi4Jfq5iyOc0GnUqJq8Sr+NKSReoiDKMM/NoMWMnMAcJGPMMyFMnt\nlZsc5NweB6jfq7EroybANAMFi6oNFmUb9PW3LG8fmd4VC0FEzyytGVrHmtVr\ne1ZyrF7TayTxSDtQNboDgP4DP4XrGOqEVLWmH/UjuMTKITGx74azZtMG8adU\nSrD30tCZClkdrQtbJioEmUn2+ma6bIf+uYVrstJZDeepO1Trx8tkG1PCCkxh\nvE7/fpd/sfkGrP3UVRdpl/a2TD5+iKIlcwBeovIonsqrooTmh9dyD8MpvWb7\nCqfQlpxrAXXW3qk//Ar4aeRq3Bge+72yVqpB54ndPEIXGFUK+nK/8ZuHqpt8\nQDdy\r\n=pihV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBsS6bOUvv07sgKAbD0VuPRb3o2Hu++TwvJYh94AN+tkAiApCYmYw29Z4zJNnXf8wLfsQfprQ+NBOPc3U6oCQZe1mw=="}]},"maintainers":[{"name":"shihn","email":"preetshihn@gmail.com"}],"_npmUser":{"name":"shihn","email":"preetshihn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/points-on-path_0.0.1_1586581187357_0.2565591197754784"},"_hasShrinkwrap":false},"0.1.0":{"name":"points-on-path","version":"0.1.0","description":"Estimate points on a SVG path","main":"lib/index.js","scripts":{"build":"rm -rf lib && tsc","lint":"tslint -p tsconfig.json","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/pshihn/points-on-path.git"},"keywords":["SVG","graphics"],"author":{"name":"Preet Shihn"},"license":"MIT","bugs":{"url":"https://github.com/pshihn/points-on-path/issues"},"homepage":"https://github.com/pshihn/points-on-path#readme","devDependencies":{"tslint":"^6.1.1","typescript":"^3.8.3"},"dependencies":{"path-data-parser":"0.1.0","points-on-curve":"0.1.0"},"gitHead":"cffaf2d83c5d213f6a745f5afc58093860559b81","_id":"points-on-path@0.1.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-GCaiag1+KfxM2KzXQb04yceoa5PqQMPqHPZzu8Y28UegtMxfyMwvUuDAQnmv51LJo84Y7kSt6Dabee/FJX/NUQ==","shasum":"fb62252e947e6f6a052993f1acd3e35103e9332f","tarball":"https://registry.npmjs.org/points-on-path/-/points-on-path-0.1.0.tgz","fileCount":8,"unpackedSize":9024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekjCCCRA9TVsSAnZWagAAiTUP/0qlSX1w9s0J6bTC84NV\nLGjat/WIBsWOy2kF2I4N4HyW7pIzjgMJNl+BExAY/WDTrMiopDy43lYHx3uR\nnIQbdz8sPyT0y6Q67yVEN6q6R8+YTORCsW8a+Gr7n7cbzQzgoUrVq/eLpiFv\nNLpudwlIklu27jzrRzTyuiByhY74LOWDYFMj3rdbpLGEhA7JpfiH/c6Ig6ul\nI3uNAOPIjM053x4R6uVjGfVLJyZNIsLMpYxfNvY+8YOnRx9q95PrgMDQmpsV\nIk6dSpZKV3etRWo/26fTLod0LygTxGTdVCKRPuQv0zPAjO1XAozB3c0sGjhZ\nsuSGJN3n+l+SaeNGAVORhmo8feRNaI2KePObbbpdZ5jzLD7lYd66DkqpXU4U\n0awgYybPqRix4AOYFf7Og+4xVfaUksU+oT7X+dOXkGeclPabI9mn4hiU1Bwh\nFlrhOTiJhz94qpE4NFsD6OyNFyOVuf8x6gM11tum08Xqf7stuPRM5ughFYAf\nlIaPYCAfSN8+9lovvy1uVcAj2wBjsaD+el1iYSMlw5+kPv+dQWZS2yGuR6K+\ns57eVozJyPRc/d/BsX85rom4bKR95FNmvTIOMmiob93W5V8M0djL3p7OjnE0\nQ9B8+2YqySir6VglOG48K0/ESgMhArty3d/3TnrQigR2i8tW7CeMjsP5MyZT\nAe0u\r\n=hv9U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg6frCL0g12n3rUjCP0jHQ1PFOAgEvzVQ68Qu+zBWF2QIhAPkArcskIwkSv0fgcJHfvZTCuE4ccvpNCD8S73DdYWEJ"}]},"maintainers":[{"name":"shihn","email":"preetshihn@gmail.com"}],"_npmUser":{"name":"shihn","email":"preetshihn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/points-on-path_0.1.0_1586638977752_0.9521286659905122"},"_hasShrinkwrap":false},"0.1.1":{"name":"points-on-path","version":"0.1.1","description":"Estimate points on a SVG path","main":"lib/index.js","scripts":{"build":"rm -rf lib && tsc","lint":"tslint -p tsconfig.json","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/pshihn/points-on-path.git"},"keywords":["SVG","graphics"],"author":{"name":"Preet Shihn"},"license":"MIT","bugs":{"url":"https://github.com/pshihn/points-on-path/issues"},"homepage":"https://github.com/pshihn/points-on-path#readme","devDependencies":{"tslint":"^6.1.1","typescript":"^3.8.3"},"dependencies":{"path-data-parser":"0.1.0","points-on-curve":"0.1.1"},"gitHead":"6607c1df1d22941d5a798a6af43fb119b5071513","_id":"points-on-path@0.1.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ELEJOfnw8Onum1o4pnKBNcvW/2nhlHM/4CEfi5hxlqdX7kktvegqBYOBxRgO2WvMbknCjYM/hEkNFMlicMlcuQ==","shasum":"cb3d704f5a672cbd127405a7fca2bfdd742b5744","tarball":"https://registry.npmjs.org/points-on-path/-/points-on-path-0.1.1.tgz","fileCount":8,"unpackedSize":9023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelPkuCRA9TVsSAnZWagAAeEUP/1NBw2Gffd7Aq6xRvl9q\nHmg8e9RHCBkUcFnmUVi6rMtceeEhxK7qeb70chvSZSVD0uZu+t+63UM5eAQg\nw9RfuhKbC+ifm4znICGGm2Xr+8QEKLcls4B4JMXy8ErXCW0Kk8g7GfAfNmA4\nKY4ndi0yA9ndI95DmUSddB1vT+2aL9ryodt6E59r+FU+4Iu+A7Tf/qMagCo0\nwuQio6oWfmxum6qa5F/A4BsbkG7UnvR9jIBn2ApexnPdBZUEAN+u5XdPpDm3\nYwUroRjMvme9HljR2lZpWS3M8g+AyaoqTm/FCix7E2vF3HqcJqUsrcMkSEU1\n6VK6uaFmoFdjw+rOz5JyRwJdzi0y5SjN8s48rVdTWD3uZyExkyJhfZxnsR3e\nXhPTn0RuEgQYhbl52tgzquMJQgAdB8Y9K85xKGb+I4nCots0vGP6LUUtRKvm\nmJB8a2Jq9yhCw0vftpzjQyn7mYAjPla6W1Qe8gMLP5e8Ms3s/Pk+knwxln3+\nJ7r2MO95/nVh596cU+jcsryi/+LwyYtIiKR0ypjA/8wmqRIikayGsDjnVMiB\ntn47xFRrC1eSSWJSWoBJaLVL+5odlZl9Q65nYUPRBdCOF/rkDl1d46N304Ap\ncfqAtT7eM+vX31UURu/A4kqbUG9bZpxEqfnlRS4cX3cFO2j+eWABdr6GS65Q\nJeIe\r\n=ECwm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzOuBOH477bwfOkijlJqGvuAW2aCjQqFv2RKw2Qp23JQIge0CGOqFH9vYMY2ts2D0hTpE9lA2xk3bucOJZPi/hRuE="}]},"maintainers":[{"name":"shihn","email":"preetshihn@gmail.com"}],"_npmUser":{"name":"shihn","email":"preetshihn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/points-on-path_0.1.1_1586821421689_0.8346124522587557"},"_hasShrinkwrap":false},"0.2.0":{"name":"points-on-path","version":"0.2.0","description":"Estimate points on a SVG path","main":"lib/index.js","scripts":{"build":"rm -rf lib && tsc","lint":"tslint -p tsconfig.json","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/pshihn/points-on-path.git"},"keywords":["SVG","graphics"],"author":{"name":"Preet Shihn"},"license":"MIT","bugs":{"url":"https://github.com/pshihn/points-on-path/issues"},"homepage":"https://github.com/pshihn/points-on-path#readme","devDependencies":{"tslint":"^6.1.1","typescript":"^3.8.3"},"dependencies":{"path-data-parser":"0.1.0","points-on-curve":"0.2.0"},"gitHead":"8b94a573c4d54daedee3d7796dc6ae18b4de0ca9","_id":"points-on-path@0.2.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-X+uusxIDk/DZBC1w6gYCThB9GiSI7wlatxPYmme4wmcWnHFGanxdFBtuZQj1YeYhxXESJ5/Ym/h7DWDMw4A9mA==","shasum":"f5ebf80d5341741874eef20d232871ffec67a9b8","tarball":"https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.0.tgz","fileCount":8,"unpackedSize":9601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelkedCRA9TVsSAnZWagAAc3EP/RevK5hGUzRgu8i8Vv8q\ngeLFMv0uIMHpVK0kNNBxxk1+8euj3ihYlHzpDh1SyRxD0XSgWV5GgrP2zUq/\ndQJTrTACXnIYQG3DBCO+aiqi3tNUNSmPjtQgRS+UZ3T8xUWRGQXAPqk6Dsg4\n+9RniJjruzaa6t/cRMOE0mzZfZxSQh7sHj56tKBbSkTjc/+AxnvMRKvpFsvJ\nmHB5jPNx6FrDkqYcQEuhlbiZuvgm1lCC0oL21M5ouhzA9P66UVXMS2h6o41S\n28VLQ7EAqovZBHkULY3VlqWKp7PBBCW//1Feu1tHsZoQQc6KZfwGInvvBqXx\nNF0ugm72ach/eDcE+C3NDS+0n0Hif6ee2abvFHlxVVHg1Ka/C7f18vDdiK8+\nmrPjoBN/DxfspWHA+LGgJdJv8AsokyJPFfjehxXmQfB2TXUKnFuEKvA7aS80\nA5PAi+CxrA7emiFZ/RNhYmfOEYqUV+Y1alIyChoIzuTgM5mege8eif62V0Mq\nYOsQACgqGYk/RNkOPuwOEbGHKQ6JyIbD7kr0/s5hpTJvdt5/SvFf2SLNCxiP\n5/0ybEzjcn4EB1/388m5QVbXIaQ0s473I42KoK5kwvBTiouCWAfWzG80aiKo\nAT25s8HxUikTOxGEF5zqLphyWS9YNn2kDwMCreYrDVl79I1Q3wnngMjEqvEC\ntfB0\r\n=2N+7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRHitNzrHy6HkPceydSmTcFVX1NQr7qhn9Ao6kEnEmWQIgOHEgfptQTJoVxJEvouKYsME2d45/69eJbyqSf2b16bw="}]},"maintainers":[{"name":"shihn","email":"preetshihn@gmail.com"}],"_npmUser":{"name":"shihn","email":"preetshihn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/points-on-path_0.2.0_1586907036838_0.10667145528297128"},"_hasShrinkwrap":false},"0.2.1":{"name":"points-on-path","version":"0.2.1","description":"Estimate points on a SVG path","main":"lib/index.js","module":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"rm -rf lib && tsc","lint":"tslint -p tsconfig.json","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/pshihn/points-on-path.git"},"keywords":["SVG","graphics"],"author":{"name":"Preet Shihn"},"license":"MIT","bugs":{"url":"https://github.com/pshihn/points-on-path/issues"},"homepage":"https://github.com/pshihn/points-on-path#readme","devDependencies":{"tslint":"^6.1.1","typescript":"^3.8.3"},"dependencies":{"path-data-parser":"0.1.0","points-on-curve":"0.2.0"},"gitHead":"7693ef0c930466b7408ee7082497e0d735f9c646","_id":"points-on-path@0.2.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==","shasum":"553202b5424c53bed37135b318858eacff85dd52","tarball":"https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz","fileCount":8,"unpackedSize":9657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeq6KACRA9TVsSAnZWagAAjrgP/0BiyV0tsw3S4s1MHQc3\n6ii6a5aA2en1VBG5e+ZUDuz3TEG47UXcVQX/23pEP5NALapKtQoHuYR3esbD\nSIQEpY0vXNq+RL6THgYKoHOQKjlW1EnK9F9JApH64A2QLe0+idtuuRaduHWO\njpAPBC3sISvNmx+z2W+Rlky4QeoCMxSd2V/gcyDrI4rHRP+d2u/O3FGTDhyW\n04u/aeWeL612wUgpiHX8tgu7gwHDusl4wJG3HHQOMUWdVkuGigmmj1tSvPrX\nU/hnx36o+vEmvYo0oc43jTjzJi45a/8mz5p06rAyRwxEhrXyv6LMMlnj+1SD\nkJWhZ7GbMbxcb9VsEXwE6Lur/WA+Zfs/nXAx1199EklQqislAPKveytT/4JC\n+cKqxaLLOjrXTzHLfeITwT3rCCDO7IrP8uhiXuDVkTm18eXYapr1IjPNyzk5\nxjMuEE7NODRdOkLMySSbJ8X+1voICn1nS2PkW0PMvgqAHCRr2Qb8ZBQbPh0q\ne58erdwTsUHWtKxAKzolWkoplL/X4i6gjU2lEgPpzVyMM6bvMHnRhZe5yspf\ny59zjXReT3Yrs6DVpd9arH5heJ9b1w8Js9nmZd8liq0z0H989QGoXa36gtmE\n1GV35RHtfX9Pw9gMcFycS/PyluwQYcucd1fj1imQ08hel2JjcBADMItmjQLa\nTCFB\r\n=p7u5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGXLpH9Qj+6jMHjefrIpuBv6xSTiTuXfEQDYuWt1hD3ZAiA3ZWLSnVXYM2fNMSW1znIlOOUpZtjksfVBeZFglUMB6A=="}]},"maintainers":[{"name":"shihn","email":"preetshihn@gmail.com"}],"_npmUser":{"name":"shihn","email":"preetshihn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/points-on-path_0.2.1_1588306559868_0.8572769503941855"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-11T04:59:47.356Z","0.0.1":"2020-04-11T04:59:47.480Z","modified":"2022-05-13T03:58:54.130Z","0.1.0":"2020-04-11T21:02:57.931Z","0.1.1":"2020-04-13T23:43:41.836Z","0.2.0":"2020-04-14T23:30:36.956Z","0.2.1":"2020-05-01T04:16:00.000Z"},"maintainers":[{"name":"shihn","email":"preetshihn@gmail.com"}],"description":"Estimate points on a SVG path","homepage":"https://github.com/pshihn/points-on-path#readme","keywords":["SVG","graphics"],"repository":{"type":"git","url":"git+https://github.com/pshihn/points-on-path.git"},"author":{"name":"Preet Shihn"},"bugs":{"url":"https://github.com/pshihn/points-on-path/issues"},"license":"MIT","readme":"# points-on-path\n\nThis package calculate the points on a SVG Path with a certain tolerance. It can also simplify the shape to use fewer points. \nThis can really usefule when estimating lines/polygons for paths in WebGL or for Hit/Cosllision detections. \n\nThis package essentially combines packages [path-data-parser](https://github.com/pshihn/path-data-parser) and [points-on-curve](https://github.com/pshihn/bezier-points)\n\n## Install\n\nFrom npm\n\n```\nnpm install --save points-on-path\n```\n\nThe package is distributed as an ES6 module. \n\n## Usage\n\n### pointsOnPath(path: string, tolerance?: number, distance?: number): PathPoints\n\nPass in a SVG path string and get back a `PathPoints` object. A `PathPoints` gives you a list of points (each being a an array of 2 numbers `[x, y]`), and a flag telling you if the path is actually composed of multiple disconnected paths. \n\n```javascript\nPathPoints {\n  points: Point[];\n  continuous: boolean;\n}\n```\n\nTake this path for example:\n\n![points on path](https://user-images.githubusercontent.com/833927/79054782-ba8d0300-7bfc-11ea-8f16-ed36001c56c9.png)\n\nand estimate the points on the path\n\n```javascript\nimport { pointsOnPath } from 'points-on-path';\n\nconst points = pointsOnPath('M240,100c50,0,0,125,50,100s0,-125,50,-150s175,50,50,100s-175,50,-300,0s0,-125,50,-100s0,125,50,150s0,-100,50,-100');\n// plotPoints(points);\n```\n\n![points on path](https://user-images.githubusercontent.com/833927/79054650-8d8c2080-7bfb-11ea-93cf-2c070dfe63c5.png)\n\nThe method also accepts two optional values `tolerance` and `distance`. These are described by [points-on-curve](https://github.com/pshihn/bezier-points); to estimate more tolerant and fewer points. \n\n\n![points on path](https://user-images.githubusercontent.com/833927/79054652-8e24b700-7bfb-11ea-8ff8-68dce51a3940.png)\n\n![points on path](https://user-images.githubusercontent.com/833927/79054653-8ebd4d80-7bfb-11ea-8645-a5a0ed81cf84.png)\n\n## License\n[MIT License](https://github.com/pshihn/points-on-path/blob/master/LICENSE)\n\n","readmeFilename":"README.md"}