{"_id":"svg-path-sdf","_rev":"12-03e92713b72361fc3f230dfac9a09883","name":"svg-path-sdf","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"svg-path-sdf","version":"1.0.0","keywords":["sdf","svg","path","signed","distance","webgl","gl","stackgl"],"author":{"name":"Dima Yv","email":"df.creative@gmail.com"},"license":"MIT","_id":"svg-path-sdf@1.0.0","maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"}],"homepage":"https://github.com/dfcreative/svg-path-sdf#readme","bugs":{"url":"https://github.com/dfcreative/svg-path-sdf/issues"},"dist":{"shasum":"227ede24287e8ad6b59aca1d963d38cdacd43fd5","tarball":"https://registry.npmjs.org/svg-path-sdf/-/svg-path-sdf-1.0.0.tgz","integrity":"sha512-GcRXyekZUw1+voQME+bxlLH6WTwG/1ppOTkoBoFb+UtSkuTyHl8Gekp2QKXmWdYfB46UAr+UIt5ryu2KaftpRg==","signatures":[{"sig":"MEQCIE6cNU794b++EothpCvR877uQzM65G8SR6L0WQFDFoH2AiBgHtAYitn82yfUv46okd70x+FL3orMM8Oe9TIqXvLNAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"227ede24287e8ad6b59aca1d963d38cdacd43fd5","gitHead":"8cebd6c315555b9b6a03900306362ce83be704c3","scripts":{"test":"budo test"},"_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/dfcreative/svg-path-sdf.git","type":"git"},"_npmVersion":"4.6.1","description":"Get signed distance field for a svg path","directories":{},"_nodeVersion":"8.1.2","dependencies":{"bitmap-sdf":"^1.0.0","is-svg-path":"^1.0.1","draw-svg-path":"^1.0.0","parse-svg-path":"^0.1.2","svg-path-bounds":"^1.0.0"},"devDependencies":{"round-to":"^2.0.0","enable-mobile":"^1.0.7","insert-styles":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/svg-path-sdf-1.0.0.tgz_1503530133450_0.31605440587736666","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"svg-path-sdf","version":"1.1.0","keywords":["sdf","svg","path","signed","distance","webgl","gl","stackgl"],"author":{"name":"Dima Yv","email":"df.creative@gmail.com"},"license":"MIT","_id":"svg-path-sdf@1.1.0","maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"}],"homepage":"https://github.com/dfcreative/svg-path-sdf#readme","bugs":{"url":"https://github.com/dfcreative/svg-path-sdf/issues"},"dist":{"shasum":"45e5bdf45b39c6f93d1a00d3d2f8c45ef43a2494","tarball":"https://registry.npmjs.org/svg-path-sdf/-/svg-path-sdf-1.1.0.tgz","integrity":"sha512-wQO/nFeK8s9G1uPae4EFmnqx//WImriahvyo3G0qQ+ednjwIkheIA0ROgp0XWPjiHRc2tjLAnUOVMhCBEehyXg==","signatures":[{"sig":"MEUCIFRYYMfRoZVfN+uCguInmSIMS4yXlaDYDr3TDAi/x3YaAiEAhAyPPB+QTnmSG7WUaE3moxGf10wDba3FyprW8E2w4kU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"45e5bdf45b39c6f93d1a00d3d2f8c45ef43a2494","gitHead":"9779ce90c1bb810459d2a7169edc8042e0a9fb81","scripts":{"test":"budo test"},"_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/dfcreative/svg-path-sdf.git","type":"git"},"_npmVersion":"4.6.1","description":"Get signed distance field for a svg path","directories":{},"_nodeVersion":"8.1.2","dependencies":{"bitmap-sdf":"^1.0.0","is-svg-path":"^1.0.1","draw-svg-path":"^1.0.0","parse-svg-path":"^0.1.2","svg-path-bounds":"^1.0.0"},"devDependencies":{"round-to":"^2.0.0","enable-mobile":"^1.0.7","insert-styles":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/svg-path-sdf-1.1.0.tgz_1503569588888_0.7988083923701197","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"svg-path-sdf","version":"1.1.1","keywords":["sdf","svg","path","signed","distance","webgl","gl","stackgl"],"author":{"name":"Dima Yv","email":"df.creative@gmail.com"},"license":"MIT","_id":"svg-path-sdf@1.1.1","maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"}],"homepage":"https://github.com/dfcreative/svg-path-sdf#readme","bugs":{"url":"https://github.com/dfcreative/svg-path-sdf/issues"},"dist":{"shasum":"a2a94725bfe6c3c1ac9fa52660273f3f5f0932e5","tarball":"https://registry.npmjs.org/svg-path-sdf/-/svg-path-sdf-1.1.1.tgz","integrity":"sha512-E/yIecIP5sghPPwo91NKDcw1c746wCpAF9TQCBVRcputHvBzTTAtlC1Z7d66ZoAn+k4UOVN+3xd4+NOk8oE0sg==","signatures":[{"sig":"MEYCIQDyWfpYhgz3e7yXk5f1BIEYk83vL3Ic/iRRQxYfO9Q5SgIhAMMcV6BrUseqPnvaWgol9o/BW0GkBiHg16zcRL1G768j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"a2a94725bfe6c3c1ac9fa52660273f3f5f0932e5","gitHead":"cc5d45a67e2cdae32fb673f56b7624a5469b6a7b","scripts":{"test":"budo test"},"_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/dfcreative/svg-path-sdf.git","type":"git"},"_npmVersion":"4.6.1","description":"Get signed distance field for a svg path","directories":{},"_nodeVersion":"8.1.2","dependencies":{"bitmap-sdf":"^1.0.0","is-svg-path":"^1.0.1","draw-svg-path":"^1.0.0","parse-svg-path":"^0.1.2","svg-path-bounds":"^1.0.1"},"devDependencies":{"round-to":"^2.0.0","enable-mobile":"^1.0.7","insert-styles":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/svg-path-sdf-1.1.1.tgz_1503592628833_0.10915104509331286","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"svg-path-sdf","version":"1.1.2","keywords":["sdf","svg","path","signed","distance","webgl","gl","stackgl"],"author":{"name":"Dima Yv","email":"df.creative@gmail.com"},"license":"MIT","_id":"svg-path-sdf@1.1.2","maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"}],"homepage":"https://github.com/dy/svg-path-sdf#readme","bugs":{"url":"https://github.com/dy/svg-path-sdf/issues"},"dist":{"shasum":"4ebc349aea97e019bf0399b3bf6a1cc07ec6f3d9","tarball":"https://registry.npmjs.org/svg-path-sdf/-/svg-path-sdf-1.1.2.tgz","fileCount":5,"integrity":"sha512-dOH+KAAQMPh3phURH1gg4PjulxyuEzGESMjHiy4l4vGCrXpzGemH19e4VUTAXs6ipEUoHsVNdaG0i0CMMdFNVQ==","signatures":[{"sig":"MEUCIF0AWdj5nIzYFQ96gNVEaABvT/3IsrCRjvfzxHw9cT6KAiEA5rf97oMzVEA9iAD6knb+LTNrSW63YkKUnU0rozdxMPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbsSHXCRA9TVsSAnZWagAAm2IQAJbhYtvWpcyeXRnwTyCJ\n0OOt6Spd/QIlJlOE4Uz+C8rTzdeVVuZ2ERyYeWAxpZqmkzyTILzmA69np3WR\nck+B+IP7cLv/mb4OXanbAPjOYzoxGBPQEVZWYmaQbBz9GSo00FkeNA9uK9qq\nw/VUDd1gRMcJZ9QcdmRL7mw2KpSG3LxL1cs/ZY8KAoOPWFFJ73K87a+kraWO\n0XJooFcx4xRkGSlIkWID4kte/MvnegoVgPV/tGtCLzLm+O0npFyLMDdob7jk\nqFZamweHSmB8ytmcGimD0xtDutKPpdMaRrwfTFUqSQk8zvlTFlxtf+5R0W4w\nAQsStY51UeWftNwDuGpIx/lg9IGr1AjAs7LAQLqGd0dVdUsaCHMRKZx2FQGb\n6aW8tDftDHpmHGQYjoTZ3hhsBbVTyCHw8UjGeJ2lUbfRvWL9yRRsL+IiOEf2\nxg4yr7XzvKFH9S4rWnsFsclF/L3nIKXp3V1JxVYExP6QmUlHg6arrxAE4DHd\nJxbvhl91aXeUeEyrFehamIGIeIM8agaJZdIUT8pp/Y9V0go3QuzE4AtMrHau\n+yG5YjVX3uUMhqZACFarFrek2+tVNgHSKX6PolT768TSUDpeln4u4NroOaOE\nmK/qm53lmxsx537kIvjFW2bOnNaZ7k2bR1D/EpWdKilC8CnFqyyOaXHo5751\nLfyq\r\n=ecQh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"6abb58170cfa1aef7ef83dbb433f02834f060879","scripts":{"test":"budo test"},"_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/dy/svg-path-sdf.git","type":"git"},"_npmVersion":"6.4.1","description":"Get signed distance field for a svg path","directories":{},"_nodeVersion":"8.11.1","dependencies":{"bitmap-sdf":"^1.0.0","is-svg-path":"^1.0.1","draw-svg-path":"^1.0.0","parse-svg-path":"^0.1.2","svg-path-bounds":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"round-to":"^2.0.0","enable-mobile":"^1.0.7","insert-styles":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/svg-path-sdf_1.1.2_1538335190538_0.2175728675584958","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"svg-path-sdf","version":"1.1.3","keywords":["sdf","svg","path","signed","distance","webgl","gl","stackgl"],"author":{"name":"Dima Yv","email":"df.creative@gmail.com"},"license":"MIT","_id":"svg-path-sdf@1.1.3","maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/dy/svg-path-sdf#readme","bugs":{"url":"https://github.com/dy/svg-path-sdf/issues"},"dist":{"shasum":"92957a31784c0eaf68945472c8dc6bf9e6d126fc","tarball":"https://registry.npmjs.org/svg-path-sdf/-/svg-path-sdf-1.1.3.tgz","fileCount":5,"integrity":"sha512-vJJjVq/R5lSr2KLfVXVAStktfcfa1pNFjFOgyJnzZFXlO/fDZ5DmM8FpnSKKzLPfEYTVeXuVBTHF296TpxuJVg==","signatures":[{"sig":"MEYCIQCH3x8jFaJexUFIDlvGi0Vyur+lPyr/PAKV1hcWtmJ2EQIhAMiF6GRTx9tZJz+EzFalEw/bY4u549nPeGn9BSqa+F34","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEo0mCRA9TVsSAnZWagAA+WMP/3HT7/7TzUaldbnXPPAm\nmjRZkcWJk39E5WZj407w/3OWGgIt268yhL5I5rmt2hqtqvzeIC5lQ+GSy6N6\nTIgI6PcW1QIHNAVPmFGQHRdhKv/nkFtDjHXFOykIQLQPuCZnNnBvggUsKR3s\noJzqcmfUFZ9/lSMRc/xUNEpEzV1/i1VoKHaZV/VsTRTkEmFtaa6vC9581Uln\nE/7W9ySsvvjmx8tlsYyKwtEYkmQd16uKSeT0voh2Nw42sXNubuM8oxiW2LLn\n/+UluPRqdYPUktET5yUYeb1mpZcLLkh9HCny1uTu3sewj6IwDXiCtMpNi0G2\nBLNMqOfL0MuIOcOpFxYNRw3NW/kCGi8+E7Z914aE7QpRGwM6SxpwXLVbNfCb\nfy1BI7IA9aSCPurjAmYWPBziPyFx9TVu4gJiUAjTr5xq3k9x5DfAOa4xh0Bv\nYbzdFZbZQUUFphb7CBmxGh229ppxwlV0Tw7Sw4wRNiymgbbEGC9ft4A0/kSd\ncWiOCLNA0/1DCgLKu6qaKN21SQt/ueoIl/yz0XwzSYHXopiSWWCys9D2OAZl\n1Dz2SAocIjWYs5s218uOwOisieoo//VIykAyqS7RGYl0iN83sGAt3Ee39LHZ\nXgY3MnQ02mHWirOhLYMocfMYxeUL6nOUTZlMHrRLuXZUjARH4c2yZck1RGqu\nI4Py\r\n=IjNn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"411caa3df9defc0be3a6da1a95666f22c41354f4","scripts":{"test":"budo test"},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/dy/svg-path-sdf.git","type":"git"},"_npmVersion":"6.4.1","description":"Get signed distance field for a svg path","directories":{},"_nodeVersion":"8.11.1","dependencies":{"bitmap-sdf":"^1.0.0","is-svg-path":"^1.0.1","draw-svg-path":"^1.0.0","parse-svg-path":"^0.1.2","svg-path-bounds":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"bubleify":"^1.2.0","round-to":"^2.0.0","enable-mobile":"^1.0.7","insert-styles":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/svg-path-sdf_1.1.3_1544719653262_0.4157927324404662","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"svg-path-sdf","version":"2.0.0","description":"Get signed distance field for a svg path","main":"svg-path-sdf.js","scripts":{"build":"esbuild svg-path-sdf.js --bundle --outfile=svg-path-sdf.min.js --minify --format=esm"},"repository":{"type":"git","url":"git+https://github.com/dy/svg-path-sdf.git"},"keywords":["sdf","svg","path","signed","distance","webgl","gl","stackgl"],"author":{"name":"Dima Yv","email":"df.creative@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dy/svg-path-sdf/issues"},"homepage":"https://github.com/dy/svg-path-sdf#readme","dependencies":{"bitmap-sdf":"^1.0.0","is-svg-path":"^1.0.1","parse-svg-path":"^0.1.2","svg-path-bounds":"^1.0.1"},"_id":"svg-path-sdf@2.0.0","gitHead":"678582b6dfe9e9e050f19ff21316020499528d29","_nodeVersion":"23.7.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-vcYvz5ZR0hxZvuJE3ft4StgkpuSBPUrrfWdkTRtDhGZ1v+Qel64Sk/uZwYhxWYkjj2WTCMeaM2VYdE/bZR1tjg==","shasum":"24cb869650b40446cc75ab420dadf68364055191","tarball":"https://registry.npmjs.org/svg-path-sdf/-/svg-path-sdf-2.0.0.tgz","fileCount":8,"unpackedSize":26467,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCgPENBmPQJjwcPi5D5opSbZzfgl9hedKuX9BquDFJjfgIhAIpy2Q5XAkqpk8ihwHlDZraNuROk5N1auGgOzT6DwMss"}]},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/svg-path-sdf_2.0.0_1741148639180_0.7395487878235676"},"_hasShrinkwrap":false}},"time":{"created":"2017-08-23T23:15:34.386Z","modified":"2025-03-05T04:23:59.527Z","1.0.0":"2017-08-23T23:15:34.386Z","1.1.0":"2017-08-24T10:13:09.779Z","1.1.1":"2017-08-24T16:37:09.723Z","1.1.2":"2018-09-30T19:19:50.675Z","1.1.3":"2018-12-13T16:47:33.895Z","2.0.0":"2025-03-05T04:23:59.374Z"},"bugs":{"url":"https://github.com/dy/svg-path-sdf/issues"},"author":{"name":"Dima Yv","email":"df.creative@gmail.com"},"license":"MIT","homepage":"https://github.com/dy/svg-path-sdf#readme","keywords":["sdf","svg","path","signed","distance","webgl","gl","stackgl"],"repository":{"type":"git","url":"git+https://github.com/dy/svg-path-sdf.git"},"description":"Get signed distance field for a svg path","maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# svg-path-sdf [![experimental](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges)\n\nCreate signed distance field for an svg path data.\n\n![svg-path-sdf](https://github.com/dy/svg-path-sdf/blob/master/preview.png?raw=true)\n\n## Usage\n\n[![npm install svg-path-sdf](https://nodei.co/npm/svg-path-sdf.png?mini=true)](https://npmjs.org/package/svg-path-sdf/)\n\n```js\nimport pathSdf from 'svg-path-sdf'\n\nconst arr = pathSdf('M40,0A40,40 0 1,1 0,-40A40,40 0 0,1 40,0Z', {\n\twidth: 200,\n\theight: 200\n})\n```\n\n`arr` has `200×200` elements with value from `0..1` range, corresponding to distance. The path is drawn at the center of the sdf fitting to the minimum side.\n\n## distances = pathSdf(path, options|shape?)\n\nOption | Meaning\n---|---\n`width`, `height` | Output sdf size in px, defaults to `200×200`.\n`cutoff`, `radius` | SDF parameters for [bitmap-sdf](https://github.com/dy/bitmap-sdf), by default detected from shape to fit min side.\n`viewbox` | View box for the path data. If not defined, it is detected as path bounds via [svg-path-bounds](https://github.com/dy/svg-path-bounds).\n`stroke` | Whether to stroke shape. Positive number will stroke outside the amount of pixels, negative number will stroke inside, `0`-ish will disable stroke.\n\n## License\n\n(c) 2017 Dmitry Iv. MIT License\n\nDevelopment supported by plot.ly.\n\n<p align=center><a href=\"https://github.com/krishnized/license/\">🕉</a></p>\n","readmeFilename":"readme.md"}