{"_id":"trianglify","_rev":"51-068dd41d90f33b0f436da37c617bb7f3","name":"trianglify","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","dist-tags":{"latest":"4.1.1","next":"4.1.0-beta"},"versions":{"0.0.1":{"name":"trianglify","version":"0.0.1","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"trianglify.js","dependencies":{"d3":"3","jsdom":"0.10","xmldom":"0.1","btoa":"1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","_id":"trianglify@0.0.1","dist":{"shasum":"2a28ec5d6167690b747ba8425e403744fad3650c","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.0.1.tgz","integrity":"sha512-XQUF716iWZ8W8B/Ev0Cg5GkKdyeDP+gJfaoW7ze8Ce47/XMNEosFeg0Bpu2GTl8MJ7ewxx69UWrT9y7wzD7gAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKBvD0VFCkcici86TzlJA0//S/ao+DWUhN8lKEe49zOgIgHRrJxag7wg+Bf2DJqeQPby3iRsqbUDGDPc+XRe32b6Q="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}]},"0.1.0":{"name":"trianglify","version":"0.1.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"trianglify.js","dependencies":{"d3":"3","jsdom":"0.10","xmldom":"0.1","btoa":"1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","_id":"trianglify@0.1.0","dist":{"shasum":"c12a2ce655072b9ecb6df1db5689a358b7502bc0","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.1.0.tgz","integrity":"sha512-iSgoEjh9GyWa02S9wyIYRAk6FIsgqVLsX3DzO/xvwzYQdnPikSgrv4BFM06zbsCNJup6rDTKV3rgxmIv1Z7Sog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBKUWakPcXHV7dbbpEseZVYrBQ1gUNo5F7N6esO4TebiAiEAkQIGN9Vyi7KCEPvT9L2rh9DaZYJRudv7rvj0qKjsscA="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}]},"0.1.1":{"name":"trianglify","version":"0.1.1","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"trianglify.js","dependencies":{"d3":"3","jsdom":"0.10","xmldom":"0.1","btoa":"1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","_id":"trianglify@0.1.1","dist":{"shasum":"f90b784183063687a8dbf56a019dca150f555ead","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.1.1.tgz","integrity":"sha512-k3WicTflP0s0pgP7JMchWXqqNksFscETmlUrR2r0FNn/Ahb2bTP4BVCrXiUIiU40SVeKGY7iScWkdtLj5Lzwdg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICzz7v0sHaR2Oq6ypUvzi6ALJDwtrqEnGsk2ncmnF6NHAiB3E/h6FLCOHQQYJlFrI1+1AZZjh33OPdYeGzQRbzBmRg=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}]},"0.1.2":{"name":"trianglify","version":"0.1.2","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"trianglify.js","dependencies":{"d3":"3","jsdom":"0.10","xmldom":"0.1","btoa":"1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","_id":"trianglify@0.1.2","dist":{"shasum":"68316dd633237dba37554a80ac903b4c669b3245","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.1.2.tgz","integrity":"sha512-87V9rarMu+3LPGOxKb7+u0aoR0PK7arD+9v66kVJMEt3k2QXQQy6RcTvKn9fyxNJzheP7GMQux6hQ6jDupoQQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHrMHBMLVMtUc2tOjmLuMRbCm7/wI/rHnWwS7n3Ya9ogIhAKUFJNo2fn0SKuDNQJixS1mT26doNva/CelUlwZBXTDz"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}]},"0.1.3":{"name":"trianglify","version":"0.1.3","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"trianglify.js","dependencies":{"d3":"3","jsdom":"0.10","xmldom":"0.1","btoa":"1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"gulp":"^3.8.6","jshint-stylish":"^0.4.0","gulp-uglify":"^0.3.1","gulp-jshint":"^1.7.1","del":"^0.1.1","gulp-rename":"^1.2.0"},"_id":"trianglify@0.1.3","dist":{"shasum":"9aa3f867efb5d0c6c6fa4c719363492ca3d7c266","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.1.3.tgz","integrity":"sha512-QdNACnbzh7BzFvoII/1U6qCoyc9E551FY+9tx6xrs0LRWsD2vlLTUL/UVkKelGIueZQGfEVs4NUGLORmsC1Kxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJNZXpdVcSoZwpo6dJwcYggYuHUpfVEji83vxYL7kPYAIhAJbmW2oGw2On3wBkkMH9qqSR8suGj6mK/m7Gb8GxkKdY"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}]},"0.1.4":{"name":"trianglify","version":"0.1.4","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"trianglify.js","dependencies":{"d3":"3","jsdom":"0.10","xmldom":"0.1","btoa":"1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"gulp":"^3.8.6","jshint-stylish":"^0.4.0","gulp-uglify":"^0.3.1","gulp-jshint":"^1.7.1","del":"^0.1.1","gulp-rename":"^1.2.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"/","files":["trianglify.js","trianglify.min.js"]}],"_id":"trianglify@0.1.4","dist":{"shasum":"dd462f5be87c35912c96ad0120ea735e2221779c","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.1.4.tgz","integrity":"sha512-jtYSA4zz93DiN0MChLM+oTMkN4sLLqtVLvjg1wIyJuAt1rx3POBpT7l532LXhbvZwPDOeLkXzSA6LqUoyV/TfA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJVDsNV3wMoO0NDOefZgHzls9u3M7CqYXIGkELwaa2WgIgA6I7DDQeCFuui7CQmuFQeMf0Byvza6qmWfgIN9Gki1U="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}]},"0.1.5":{"name":"trianglify","version":"0.1.5","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"trianglify.js","dependencies":{"btoa":"1","d3":"3","jsdom":"1","xmldom":"0.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js"},"devDependencies":{"chai":"^1.9.2","del":"^0.1.1","gulp":"^3.8.6","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^1.1.1","gulp-rename":"^1.2.0","gulp-tag-version":"^1.1.0","gulp-uglify":"^0.3.1","jshint-stylish":"^0.4.0","mocha":"^1.21.4"},"npmName":"trianglify","npmFileMap":[{"basePath":"/","files":["trianglify.js","trianglify.min.js"]}],"gitHead":"004e396e3ee9c473cc84bd14f38fec3c5a93f64d","_id":"trianglify@0.1.5","_shasum":"39f98ded39b4c480f06467652c6d54ceb8e0cfa3","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"dist":{"shasum":"39f98ded39b4c480f06467652c6d54ceb8e0cfa3","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.1.5.tgz","integrity":"sha512-U7HFjRrui1FmAG4+2Q5D7phFM1+EUklnGuP4pSshYU0iv47cyMlW5ZU5I8OOhBubNfRinGiwQ1J1Y1oxSRomLQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2Cdc7s417nwelhvYsYYEWNvMa3iUY3s7vlfoQLfBXfAiBBvI9WZyXTm3u30u7uklPsFfW9qigh7xyBvMTDBOJMzg=="}]}},"0.2.0":{"name":"trianglify","version":"0.2.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"canvas":"^1.2.1","chroma-js":"^0.6.3","delaunay-fast":"^1.0.1","jsdom":"^3.1.2","seedrandom":"^2.3.11"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"node gulpfile.js"},"browser":{"jsdom":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^1.1.1","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","gulp-uglify":"^0.3.1","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^4.1.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"/dist/","files":["trianglify.min.js"]}],"gitHead":"d8495b35d36bede869b415b0e404fe4e2c2101c3","_id":"trianglify@0.2.0","_shasum":"b53fbad26f6976375a9613f0e4b23e2102ecd9fc","_from":".","_npmVersion":"2.7.3","_nodeVersion":"0.12.1","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"dist":{"shasum":"b53fbad26f6976375a9613f0e4b23e2102ecd9fc","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.2.0.tgz","integrity":"sha512-a7zIPWs+O7+n8HwHxJMynMo86k6qWASu/oowfzeybEnRGszEnB4HAEu7tN9K8orwsM+lzAJtW/uKX3Te6+/hjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEvfYixBjf+AAvANoa1XjjQlYfdDAe2Ij2MlTrXwAZddAiEAx6ErrFQtv/G5iBbB8YfI+8oW8J8EFy3LFOfhvn7jaMc="}]}},"0.2.1":{"name":"trianglify","version":"0.2.1","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"canvas":"^1.2.1","chroma-js":"^0.6.3","delaunay-fast":"^1.0.1","jsdom":"^3.1.2","seedrandom":"^2.3.11"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"node gulpfile.js"},"browser":{"jsdom":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^1.1.1","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","gulp-uglify":"^0.3.1","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^4.1.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"4f916f8084cb84c3dcecba12c7d1fa730e14b48a","_id":"trianglify@0.2.1","_shasum":"7dd3e52c9a29236365b6543d10e8ee2504670a73","_from":".","_npmVersion":"2.7.3","_nodeVersion":"0.12.1","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"dist":{"shasum":"7dd3e52c9a29236365b6543d10e8ee2504670a73","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.2.1.tgz","integrity":"sha512-tXDxm6BPsyRSTILOUEKsT7pKUwnCqC/730pfFgLm3XemPukFyo3/1S9V+1Q3UMvsKTmU0+t87wPTVxHgzz/lTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF7wGOa8vSuBDljAUHHCAZOLRvWWGbqNfVKlxyxE67P3AiAPDt9Fwuok40YE3+ja5jdRKzeuLQNewV90aD+y+F+IxQ=="}]}},"0.3.0":{"name":"trianglify","version":"0.3.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunay-fast":"^1.0.1","jsdom":"^3.1.2","seedrandom":"^2.3.11","canvas":"^1.2.3"},"optionalDependencies":{"canvas":"^1.2.3"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"node gulpfile.js","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^1.1.1","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","gulp-uglify":"^0.3.1","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^4.1.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"816e592625e549fc7c5055e0bfdecfc5d609c29e","_id":"trianglify@0.3.0","_shasum":"458f7c1187f1611f0813e1ff546cc966797b1ab7","_from":".","_npmVersion":"2.7.3","_nodeVersion":"0.12.1","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"dist":{"shasum":"458f7c1187f1611f0813e1ff546cc966797b1ab7","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.3.0.tgz","integrity":"sha512-e8/Q2dOOdZE0N4mSx0MA0fIv/4CruSJKz7zZonMrtHGO9GypTKUCWw5FRd2seddn86NfJFAmnLKGGExD7ov+sA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHvsvxIyw+ZekAVMXCw+OoNZZVfD10obUUpEHYCIpE0tAiEAtAw5l0Jhk1VoXKVKjAh1rHm5TPvP+FcBEk014fb1phQ="}]}},"0.3.1":{"name":"trianglify","version":"0.3.1","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunay-fast":"^1.0.1","jsdom":"^3.1.2","seedrandom":"^2.3.11","canvas":"^1.2.3"},"optionalDependencies":{"canvas":"^1.2.3"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPLv3","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"node gulpfile.js","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^1.1.1","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","gulp-uglify":"^0.3.1","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^4.1.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"1c55757868b98dc2efdd9acb9277b9cdc64cf867","_id":"trianglify@0.3.1","_shasum":"fad5479fc5219fe5310d827cdc283472ab7a167b","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.4","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"dist":{"shasum":"fad5479fc5219fe5310d827cdc283472ab7a167b","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.3.1.tgz","integrity":"sha512-QTshWuZPNjB3F4BtOsE2j0VNCHtik1y/LemH85QJitxl5T9SLZ/Oco3Yw03N2netZ5tfDqghQXFASUeubtM7yA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBbfNZIWSThCW3xZscKOHkjcHepvFBiSlWpXizmy0szFAiBViCGHypNt8u7jaP+76p/bg00IHcm+WycobJEt4NylHA=="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}]},"0.4.0":{"name":"trianglify","version":"0.4.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunay-fast":"^1.0.1","jsdom":"^7.0.2","seedrandom":"^2.3.11","canvas":"^1.3.0"},"optionalDependencies":{"canvas":"^1.3.0"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"node gulpfile.js","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^1.1.1","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","gulp-uglify":"^0.3.1","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^4.1.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"e29cf4ba92098b2587fe0f5840d4cf92ed3bd30d","_id":"trianglify@0.4.0","_shasum":"0beb69c3bda766d9776c40633cfe983d4ab9c4fb","_from":".","_npmVersion":"3.3.3","_nodeVersion":"4.0.0","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"dist":{"shasum":"0beb69c3bda766d9776c40633cfe983d4ab9c4fb","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-0.4.0.tgz","integrity":"sha512-xofuHiPVE9YT9xiBFRzrdZahMfgCb+k2B10DW5tphk1jxijt4HcSaReGjQYNAiGLcczC9YfXqvMe/erJZXTS+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQUeyV6CmFKr4kZZL8qMwRhL6TOWoyrG6wA++Cw7FwywIgDBfoYtVDIJDrXY8EJqkyerZREp/emZ/0fKjgXMNNOsU="}]}},"1.0.0":{"name":"trianglify","version":"1.0.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunay-fast":"^1.0.1","jsdom":"^7.0.2","seedrandom":"^2.3.11","canvas":"^1.3.0"},"optionalDependencies":{"canvas":"^1.3.0"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"node gulpfile.js","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^1.1.1","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","gulp-uglify":"^0.3.1","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^4.1.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"1e9dc7f621153ac43378aa4fbae88bde3ead9952","_id":"trianglify@1.0.0","_shasum":"7aee970c0b9cd07f9a5e6fd4cda5788ba814200f","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"dist":{"shasum":"7aee970c0b9cd07f9a5e6fd4cda5788ba814200f","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-1.0.0.tgz","integrity":"sha512-yVTg3rYZQiez/KYDysTecs40KIWqRU7Ep0OK5vaYyCN9ICxmguBh3af3RHDrgsgsYE0CHzvQjLQsKKglhgbo8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpw/jmX9NnK7Oxl01dDqouK4Ssz5qzy02eBUemN36U5QIhANkD8GLjfom4YVHryRV+08DIsVDw1nz/UYxMEAQEv9i5"}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/trianglify-1.0.0.tgz_1470242412925_0.3025486178230494"},"deprecated":"dist files are out of date in this release, please use v1.0.1"},"1.0.1":{"name":"trianglify","version":"1.0.1","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunay-fast":"^1.0.1","gulp":"^3.9.1","jsdom":"^7.0.2","seedrandom":"^2.3.11","canvas":"^1.3.0"},"optionalDependencies":{"canvas":"^1.3.0"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"gulp","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^1.1.1","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","gulp-uglify":"^0.3.1","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^4.1.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"049ae6caf688bdd449a26f23bc3dd7477ecc55ff","_id":"trianglify@1.0.1","_shasum":"a9c00cb49f3ba33e39acc8396abf0cd95c963146","_from":".","_npmVersion":"3.9.3","_nodeVersion":"5.11.1","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"dist":{"shasum":"a9c00cb49f3ba33e39acc8396abf0cd95c963146","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-1.0.1.tgz","integrity":"sha512-nHJeFz4YZA+tRgn9HQrNBGXI01MqiwmzdYcTdcv2BhT2Fw9MIUrW227BkRuGQmYPsVgdX5Widh8iSKeUcgIioA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDF9QZaBY4DI8oGIaVJEze9g+d0nylvQZHG0PyBTEaV0gIhAK7Wv75/kqIRSjDGQczZY9O+ghgYer8k+QfP0o8/7vdX"}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/trianglify-1.0.1.tgz_1470762314555_0.5991888847202063"}},"1.1.0":{"name":"trianglify","version":"1.1.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunay-fast":"^1.0.1","gulp":"^3.9.1","jsdom":"^7.0.2","seedrandom":"^2.3.11","canvas":"^1.3.0"},"optionalDependencies":{"canvas":"^1.3.0"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"gulp","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^1.1.1","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","gulp-uglify":"^0.3.1","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^4.1.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"3e3fa6a7eb522c0a923d735a1d3dc994b674d0d0","_id":"trianglify@1.1.0","_shasum":"9b8b276aac405feb9b45446e951643e18bca685c","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"dist":{"shasum":"9b8b276aac405feb9b45446e951643e18bca685c","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-1.1.0.tgz","integrity":"sha512-WBIWy2blSXIwjlG7LUk6ezEqETxoJoEy9ZP1V5Spxgtc/gjSh/0LUNWe+LbHiwDKBld7cI/90XxEKZCblqRDCQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGv0nd9YqczpZ2N2WP2unROeib3co6LaRsJlPN4nBVwQIgeh3gh2lYkJhW9VUkr5VI1d29B6s6wVorCKErzosbqY8="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify-1.1.0.tgz_1502814792881_0.8547652047127485"}},"1.2.0":{"name":"trianglify","version":"1.2.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunator":"^1.0.4","gulp":"^3.9.1","jsdom":"^7.0.2","seedrandom":"^2.3.11","canvas":"^1.3.0"},"optionalDependencies":{"canvas":"^1.3.0"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"gulp","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-babel-minify":"^0.2.0","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^1.1.1","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^4.1.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"a9d332c127ad01c6aa4daaf8db7153fffa6f20da","_id":"trianglify@1.2.0","_shasum":"daeb2023f9fde0e0cadc7c9d40efbdcff57d9ef6","_from":".","_npmVersion":"3.9.3","_nodeVersion":"5.11.1","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"dist":{"shasum":"daeb2023f9fde0e0cadc7c9d40efbdcff57d9ef6","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-1.2.0.tgz","integrity":"sha512-NNx+HRyWLZes2WSwvtPL8gAHFqsJ3pNK8cKuVyezi9l7MBexRGJvvYw2+oIHpQD6m4f/4d8LwqJLsTBLIG+Bxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYTxju/BHol+p8Hw1WDe2iplNpMqpHI73WsVVWF1cYsQIhAOmnJ+IaNnZsNcW3Pf9RnNisRE/WB6BLN9htiuVRqqOb"}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify-1.2.0.tgz_1509061237800_0.11924336827360094"}},"1.3.0":{"name":"trianglify","version":"1.3.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunator":"^1.0.4","jsdom":"^7.0.2","seedrandom":"^2.3.11","canvas":"^1.3.0"},"optionalDependencies":{"canvas":"^1.3.0"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"gulp","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-babel-minify":"^0.2.0","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^5.0.0","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^5.2.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"cc062c2177e086314663f47233ad7653d0795b22","_id":"trianglify@1.3.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"dist":{"integrity":"sha512-OoBNq0uPgRcNUwc8QgvwTEekJQywNcGzkGwHKXNNOLq0VQCzP4pNSkMts9MqdRV7WALaJI19YsXuzY4JrwMauQ==","shasum":"12664103bc46e00d42b7f044db67a42977eab78f","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-1.3.0.tgz","fileCount":19,"unpackedSize":112766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcKQiuCRA9TVsSAnZWagAADzkP/3U58UBT6NzpNVzxJwQr\nxF4Ymyj45hXHUPFRCxzofka0RbJKGbvgYYWTK9xnFhDZ/DVlYNDIjZjP1xwK\nTTss+jxdj6IByIaP8/2AAJM919Ssxy2ODhLOvasbVcqrbL9SdOof7VoIRbww\n9109JdmpJmtvbMAIQqYTaH9PIZEup1N6/FnVYGW3KxXe4G/WJrG8ii+jUyNs\nrprngEKIYLoHBZ4m3/YVJSRjYwfIHUMa0gl4p0S36rBagrO9B8uvUVf5qlso\nf95BPA4Hn3O/8HvDo8FONLcQhY/5gI3mbXcle4XBAMKwakYQb0YBlIqAPc4l\njpjP5vYey+L9XyOy/iA415EjfZls8qORPtDnVHwomlKeKRJDTfYNxGvAS61d\np2pGtEjNhuQuIJhf7PYxCcE+lW+GwJJcT4LxlRcxnyXNUESLfYigEmKJpTPm\n4j6U8AzG5CaX5yNcYy8KmU3itVfyQ7z2/Qe8VsFZveLbTCOGQNVE5LvQ+7db\nS3+BFXm9/HMNmHt56rqdEgoGP7ixme+BY1642ydpx7P0JjQAQh0QtutaxO0w\ndgURjv8W/nilA5IwykVQ5y+UfOWjmdEDS2AZBWOd9fDeNqNXTkPPy0FIVtTG\nfJtWMJD8HGhC7FjhfJnsr+P7PjjKo6wdXEV/aSd5FY/8+HuKNbAj+g9MpOux\nkl3n\r\n=fOUT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGdqnddLszFyljjvkyryfDhx/8O3eG6SoIUcsJg5zvgaAiBrRRmXJ8FsucEK12MPqgfZo8kxwCuJ7hhW66A97me8Dg=="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_1.3.0_1546193069781_0.16001849678186475"},"_hasShrinkwrap":false},"2.0.0":{"name":"trianglify","version":"2.0.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunator":"^1.0.4","jsdom":"^7.0.2","seedrandom":"^2.3.11","canvas":"^1.3.0"},"optionalDependencies":{"canvas":"^1.3.0"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"gulp","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-babel-minify":"^0.2.0","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^5.0.0","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^5.2.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"42a6dbc76a82a4dcb2778aaf7f121d168cc8c3de","_id":"trianglify@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"dist":{"integrity":"sha512-XzVIMXFJO73nnYlAVX2/O8psJY9cxNvThW+QZaRuJgn15uWEZtCFUDyquC/2DO/fQ0Fm19SSDpeslhXaL9nvvg==","shasum":"482c3f79dd795589d4902a87668c302d13df65d2","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-2.0.0.tgz","fileCount":20,"unpackedSize":115647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcKRCkCRA9TVsSAnZWagAA69IP+gMGCOx61me5Q+qy2z1y\nhjHSqRQUTAcAMwBU5YKBDoDm/iPU6yv3VNg7w2E+QFK4d9dZMPtX4rvStogp\noe/x42PhDy6EKJS9qZrwW+iFCzrScJzDVI+emKAAIlZ8prpQZRMdEWqX2TKs\nIi7/yJsRGZ2SoTquJ8ibrlk8JrlNcn/eRzg+jc0e/j2vB+6vEhPnDSqSN/Mq\nslHeNrMsq9Tj/s4qssBeQ6qHO7rhIaHVpd3X4fbMsdklAuPZCRSBQUkJmY0O\nmJLjnDJsq4eMAb8Rgb1UHkOWAtbzgcHnWD+1Fx9ojrY1dUR/qPc6P6KYWzbV\nJT08O5F0nQ12K7DYKrD/NcEQMxUy9bVf8ka5LDKi9kbxW4Nd6eyI9ElxBjN1\nQ85PEbCIjoOY14clOAJnfVR8O9Wo7+z6sHmQ0qvz5JeMWAw+oCnTsenEVXIN\nQO/KgjbG+db9VzcbUpVQAJYSURGM51UYUlWanNfqY6AKsI12wmGVgfppfB8I\nyMYbEYaPMe0nZbEvxyrRv7D9wMclMJVASd8wLlVNRuxvabD44qwmdGDU03tf\nL2315pdaU0sG6ghP26peVdLTuQP7Rw3eRHL3zg6mqYGdfW091rsEmKcuoKHc\nurL0011J6trBKiiQbhluJlR4fyZJedTPNbF4lfUABONmZPFMwHaeASzHyvnD\nBcyK\r\n=6Y28\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDsuE1n6b4VebIoiI2+55VcA4m4+c88h8k2FB6bzosCJAiBhVSm5RLb1xUr6jOirUW3iXdyaZDQY3fqWM5Lm/mqx0A=="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_2.0.0_1546195108110_0.46939789630890094"},"_hasShrinkwrap":false},"2.0.0-alpha.1":{"name":"trianglify","version":"2.0.0-alpha.1","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunator":"^1.0.4","jsdom":"^7.0.2","seedrandom":"^2.3.11","canvas":"^2.5.0"},"optionalDependencies":{"canvas":"^2.5.0"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"gulp","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-babel-minify":"^0.2.0","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^5.0.0","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^5.2.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"readme":"# Trianglify [![Build Status](https://travis-ci.org/qrohlf/trianglify.svg?branch=master)](https://travis-ci.org/qrohlf/trianglify)\n\n\nTrianglify is a library that I wrote to generate nice SVG background images like this one:\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n# Getting Trianglify\n\nYou can grab Trianglify with npm/yarn (recommended):\n\n```\nnpm install trianglify\n```\n\nInclude it in your HTML via CDNJS:\n\n```html\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/trianglify/2.0.0/trianglify.min.js\"></script>\n```\n\nOr clone the repo:\n\n```\ngit clone https://github.com/qrohlf/trianglify.git\n```\n\n\n# Quickstart\n\n```html\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/trianglify/2.0.0/trianglify.min.js\"></script>\n<script>\n\tvar pattern = Trianglify({\n\t\twidth: window.innerWidth,\n\t\theight: window.innerHeight\n\t});\n\tdocument.body.appendChild(pattern.canvas())\n</script>\n```\n\nSee https://qrohlf.com/trianglify for interactive examples and a walkthrough of the most commonly-used Trianglify options.\n\n# Licensing\n\nThe source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.\n\n**However**, it's worth noting that you own the copyright to the output image files which you create using Trianglify, just like you own the copyright to an image created using something like [GIMP](https://www.gimp.org/). If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.\n\n\n# API\n\nTrianglify exposes a single function into the global namespace, called `Trianglify`. This takes a single options object as an argument and returns a pattern object.\n\n```js\nvar Trianglify = require('trianglify'); // only needed in node.js\nvar pattern = Trianglify({width: 200, height: 200})\n```\n\nThe pattern object contains data about the generated pattern's options and geometry, as well as rending implementations.\n\n### pattern.opts\n\nObject containing the options used to generate the pattern.\n\n### pattern.polys\n\nThe colors and vertices of the polygons that make up the pattern, in the following format:\n\n```js\n[\n  ['color', [vertex, vertex, vertex]],\n  ['color', [vertex, vertex, vertex]],\n  ...\n]\n```\n\n### pattern.svg([opts])\n\nRendering function for SVG. Returns an SVGElement DOM node. Takes an optional options object. Currently the only supported option is `{includeNamespace: true}`, which will cause the output to include an `xmlns='http://www.w3.org/2000/svg'` attribute. This is helpful if you intend to serialize the svg string to a file, as most browsers and vector graphics programs require it. See [#41](https://github.com/qrohlf/trianglify/issues/41) for more details about this option.\n\n### pattern.canvas([HTMLCanvasElement])\n\nRendering function for canvas. When called with no arguments returns a HTMLCanvasElement DOM node. When passed an existing canvas element as an argument, renders the pattern to the existing canvas.\n\nTo use this in a node.js environment, the optional dependency [node-canvas](https://github.com/Automattic/node-canvas) needs to be installed.\n\n### pattern.png()\n\nRendering function for PNG. Returns a data URI with the PNG data in base64 encoding. See [examples/save-as-png.js](examples/save-as-png.js) for an example of decoding this into a file.\n\n\n# Options\n\nTrianglify is configured by an options object passed in as the only argument. The following option keys are supported:\n\n### width\n\nInteger, defaults to `600`. Specify the width in pixels of the pattern to generate.\n\n### height\n\nInteger, defaults to `400`. Specify the height in pixels of the pattern to generate.\n\n### cell_size\n\nInteger, defaults to `75`. Specify the size of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.\n\n### variance\n\nDecimal value between 0 and 1 (inclusive), defaults to `0.75`. Specify the amount of randomness used when generating triangles.\n\n### seed\n\nNumber or string, defaults to `null`. Seeds the random number generator to create repeatable patterns. When set to null, the random number will be seeded with random values from the environment. An example usage would be passing in blog post titles as the seed to generate unique trianglify patterns for every post on a blog that won't change when the page reloads.\n\n### x_colors\n\nFalse, string, or array of CSS-formatted colors, default is `'random'`. Specify the color gradient used on the x axis.\n\nIf false, the colors will not vary over the x axis; this requires the y_color to have a specified value.\n\nValid string values are 'random' or the name of a [colorbrewer palette](http://bl.ocks.org/mbostock/5577023) (i.e. 'YlGnBu' or 'RdBu'). When set to 'random', a gradient will be randomly selected from the colorbrewer library.\n\nValid array values should specify the color stops in any CSS format (i.e. `['#000000', '#4CAFE8', '#FFFFFF']`).\n\n### y_colors\n\nFalse, string or array of CSS-formatted colors, default is `'match_x'`. When set to 'match_x' the same gradient will be used on both axes.\nIf false, the colors will not vary over the y axis; this requires the x_color to have a specified value.\nOtherwise, accepts the same options as x_colors.\n\n### color_space\n\nString, defaults to `'lab'`. Set the color space used for generating gradients. Supported values are rgb, hsv, hsl, hsi, lab and hcl. See this [blog post](https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) for some background on why this matters.\n\n### color_function\n\nSpecify a custom function for coloring triangles, defaults to `null`. Accepts a function to override the standard gradient coloring that takes the x,y coordinates of a triangle's centroid as arguments and returns a CSS-formatted color string representing the color that triangle should have.\n\nHere is an example color function that uses the HSL color format to generate a rainbow pattern:\n\n```javascript\nvar colorFunc = function(x, y) {\n\treturn 'hsl('+Math.floor(Math.abs(x*y)*360)+',80%,60%)';\n};\n\nvar pattern = Trianglify({color_function: colorFunc})\n```\n\n### stroke_width\n\nNumber, defaults to `1.51`. Specify the width of the stroke on triangle shapes in the pattern. The default value is the ideal value for eliminating antialiasing artifacts when rendering patterns to a canvas.\n\n### points\n\nArray of points ([x, y]) to trianglulate. When not specified an array randomised points is generated filling the space.\n","readmeFilename":"Readme.md","gitHead":"d3b48a149097c533964a30ffc5ae096c64bb4c5e","_id":"trianglify@2.0.0-alpha.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"dist":{"integrity":"sha512-Zyg220/C/Ymk3vHlQchbqW9gYVZ0g2c14HJrbaoKtEaFPSrL/gOgPObofxSqVvDzvX8jHPGWIxFUEMQUq+s7Vw==","shasum":"65dd124c7a17ce5b01479cb936e632a73ba566d4","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-2.0.0-alpha.1.tgz","fileCount":20,"unpackedSize":115932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGpoCCRA9TVsSAnZWagAAZqUP+wStGDviFcG00jbCTxSh\nTmz5rvHkSaXCoF53O6XkgAGDq7isIhGbkDHV70ln3xoRmnDQI3bYevw4CiHN\nU1P+zKwKlyPbDbrjCEIjBeGC6aJS610HC1+QY77Au2ml0yMP+x0iETnU85m9\nQDEmB8cbHxD+P2sAqAr60oTazvDYkGBCdUrcgVh9tfMREcCwlN4mogiJQv6n\n9+w9px8lwTbTxP4CuaL1f/HPTFdmkr9Lknpbc0T3SrBBtkE9dxhD4DWs0HL3\nDI3XrP2vx97KVdBSetgNXJAz33dWih7XiqJvEneW6qN/hmoEWvxoeQC0tXDN\n5wfOetbeRZ0Z6QmEFcFusxm3HbyyfwhotFeevg93HBJdG+ZHudMkIVq5vDTK\nXPjr9FOEHkaq3RwcnUUV6+edGyoI5mkg5k/vA44ldEadlz0ubnAFuJ4q0sVx\nZqBqYi929hiQXJxtsw/cPYdz3YBOlQcVQHKSjXLNjHfRec5Xkx3SPqsddp3K\nbvQiItHEXWoWxtHPZZLpCUa+Grr5ZDmw5ntxGJtLC7+wEGtb23co0kK71uQj\nNvGEIt7IKeL8pwJ/bf2LdPO6sXE+BY+1DsI+Zztfa3O2Xh+QN6UnEESxWM3/\ntdHqLj9LpeHNdWmDcjlPmPSkIxVBvhbC29uQPGVDK/epAZLlzmeouxLdVvFP\nxP+0\r\n=9cIY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsNzF8gqrgwyycPZVIm8/JoGUMpr+RS//EG9h2o/+OmwIhANLfJ5F9bY0zLpRhCZsQjp+joPrfTsWjQmsvqG3H/6p0"}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_2.0.0-alpha.1_1562024449695_0.9859974330358632"},"_hasShrinkwrap":false},"2.0.0-alpha.2":{"name":"trianglify","version":"2.0.0-alpha.2","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunator":"^1.0.4","jsdom":"^7.0.2","seedrandom":"^2.3.11","canvas":"^2.5.0"},"optionalDependencies":{"canvas":"^2.5.0"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"gulp","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-babel-minify":"^0.2.0","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^5.0.0","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^5.2.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"readme":"# Trianglify [![Build Status](https://travis-ci.org/qrohlf/trianglify.svg?branch=master)](https://travis-ci.org/qrohlf/trianglify)\n\n\nTrianglify is a library that I wrote to generate nice SVG background images like this one:\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n# Getting Trianglify\n\nYou can grab Trianglify with npm/yarn (recommended):\n\n```\nnpm install trianglify\n```\n\nInclude it in your HTML via CDNJS:\n\n```html\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/trianglify/2.0.0/trianglify.min.js\"></script>\n```\n\nOr clone the repo:\n\n```\ngit clone https://github.com/qrohlf/trianglify.git\n```\n\n\n# Quickstart\n\n```html\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/trianglify/2.0.0/trianglify.min.js\"></script>\n<script>\n\tvar pattern = Trianglify({\n\t\twidth: window.innerWidth,\n\t\theight: window.innerHeight\n\t});\n\tdocument.body.appendChild(pattern.canvas())\n</script>\n```\n\nSee https://qrohlf.com/trianglify for interactive examples and a walkthrough of the most commonly-used Trianglify options.\n\n# Licensing\n\nThe source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.\n\n**However**, it's worth noting that you own the copyright to the output image files which you create using Trianglify, just like you own the copyright to an image created using something like [GIMP](https://www.gimp.org/). If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.\n\n\n# API\n\nTrianglify exposes a single function into the global namespace, called `Trianglify`. This takes a single options object as an argument and returns a pattern object.\n\n```js\nvar Trianglify = require('trianglify'); // only needed in node.js\nvar pattern = Trianglify({width: 200, height: 200})\n```\n\nThe pattern object contains data about the generated pattern's options and geometry, as well as rending implementations.\n\n### pattern.opts\n\nObject containing the options used to generate the pattern.\n\n### pattern.polys\n\nThe colors and vertices of the polygons that make up the pattern, in the following format:\n\n```js\n[\n  ['color', [vertex, vertex, vertex]],\n  ['color', [vertex, vertex, vertex]],\n  ...\n]\n```\n\n### pattern.svg([opts])\n\nRendering function for SVG. Returns an SVGElement DOM node. Takes an optional options object. Currently the only supported option is `{includeNamespace: true}`, which will cause the output to include an `xmlns='http://www.w3.org/2000/svg'` attribute. This is helpful if you intend to serialize the svg string to a file, as most browsers and vector graphics programs require it. See [#41](https://github.com/qrohlf/trianglify/issues/41) for more details about this option.\n\n### pattern.canvas([HTMLCanvasElement])\n\nRendering function for canvas. When called with no arguments returns a HTMLCanvasElement DOM node. When passed an existing canvas element as an argument, renders the pattern to the existing canvas.\n\nTo use this in a node.js environment, the optional dependency [node-canvas](https://github.com/Automattic/node-canvas) needs to be installed.\n\n### pattern.png()\n\nRendering function for PNG. Returns a data URI with the PNG data in base64 encoding. See [examples/save-as-png.js](examples/save-as-png.js) for an example of decoding this into a file.\n\n\n# Options\n\nTrianglify is configured by an options object passed in as the only argument. The following option keys are supported:\n\n### width\n\nInteger, defaults to `600`. Specify the width in pixels of the pattern to generate.\n\n### height\n\nInteger, defaults to `400`. Specify the height in pixels of the pattern to generate.\n\n### cell_size\n\nInteger, defaults to `75`. Specify the size of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.\n\n### variance\n\nDecimal value between 0 and 1 (inclusive), defaults to `0.75`. Specify the amount of randomness used when generating triangles.\n\n### seed\n\nNumber or string, defaults to `null`. Seeds the random number generator to create repeatable patterns. When set to null, the random number will be seeded with random values from the environment. An example usage would be passing in blog post titles as the seed to generate unique trianglify patterns for every post on a blog that won't change when the page reloads.\n\n### x_colors\n\nFalse, string, or array of CSS-formatted colors, default is `'random'`. Specify the color gradient used on the x axis.\n\nIf false, the colors will not vary over the x axis; this requires the y_color to have a specified value.\n\nValid string values are 'random' or the name of a [colorbrewer palette](http://bl.ocks.org/mbostock/5577023) (i.e. 'YlGnBu' or 'RdBu'). When set to 'random', a gradient will be randomly selected from the colorbrewer library.\n\nValid array values should specify the color stops in any CSS format (i.e. `['#000000', '#4CAFE8', '#FFFFFF']`).\n\n### y_colors\n\nFalse, string or array of CSS-formatted colors, default is `'match_x'`. When set to 'match_x' the same gradient will be used on both axes.\nIf false, the colors will not vary over the y axis; this requires the x_color to have a specified value.\nOtherwise, accepts the same options as x_colors.\n\n### color_space\n\nString, defaults to `'lab'`. Set the color space used for generating gradients. Supported values are rgb, hsv, hsl, hsi, lab and hcl. See this [blog post](https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) for some background on why this matters.\n\n### color_function\n\nSpecify a custom function for coloring triangles, defaults to `null`. Accepts a function to override the standard gradient coloring that takes the x,y coordinates of a triangle's centroid as arguments and returns a CSS-formatted color string representing the color that triangle should have.\n\nHere is an example color function that uses the HSL color format to generate a rainbow pattern:\n\n```javascript\nvar colorFunc = function(x, y) {\n\treturn 'hsl('+Math.floor(Math.abs(x*y)*360)+',80%,60%)';\n};\n\nvar pattern = Trianglify({color_function: colorFunc})\n```\n\n### stroke_width\n\nNumber, defaults to `1.51`. Specify the width of the stroke on triangle shapes in the pattern. The default value is the ideal value for eliminating antialiasing artifacts when rendering patterns to a canvas.\n\n### points\n\nArray of points ([x, y]) to trianglulate. When not specified an array randomised points is generated filling the space.\n","readmeFilename":"Readme.md","gitHead":"c30a4a648f15ab71ac59f34566d4fc72946d38ed","_id":"trianglify@2.0.0-alpha.2","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"dist":{"integrity":"sha512-b3bX6sXfztS/3xzJCWvzz2PRl2qWqUCAIblrWKJE75kG16niX+ORxOkDyw1IQxP973sY6d69+Z8RrytFbt9A1Q==","shasum":"e7df9e06fbbae9b6f4634eb0bda419f1dd7deb70","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-2.0.0-alpha.2.tgz","fileCount":20,"unpackedSize":115995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGptyCRA9TVsSAnZWagAAO+QP/3e7UT2qh7b8mT3yrIkQ\n1k/2ojkE8ioiwqJqKEjRE5weGewtTmHGLCWUgc5eNMl/6TKz97cjV6tZbWlQ\nWy4dvQeKQBjJlcibtGLlJi++0ufQCDPBOe8RoYU9ZPWAoqbKBIXn5nuAORLJ\nkvoVxkOsM4tTJIMagNWJadhOBkafgxRU2REjQZAMYZiFBSUoj+vDHkGs3bar\noG1uCsFpBY++4oRHwEKHuwGHN+AbnLFb6HRcPdkEgzekKbYcaSMxw48iPZTm\ntPo6DIqlePpnVF/e5vwABtl3fMiuZPIRBCLEK/Qa41x1rlPt6obCOj5x+Zv0\ntXgs2RKgHkITTD1ZaV8GfAqUxPuOTdrayMOG1eCLlJPZZTEAl7tqx16N1SUm\n3u/UlrRN16g6+k2Ys86nnZgS/qhavy/2J8TU2U+XhYya9pjDyqcWPkG51wJY\nqJIe05Exihn+Cn0YSxFossLm4Ra/cy5VqpA7DdvZ+AIne/YgMQ5iSnQVrRRY\nSt6u32tgq/gGZ6RGbt2BEQsKzz8c1EYR7dRUgX6RlCSQ81+L2EkJLKpCDKWb\nsHeWthQf58MHQAyDEuWtd+Rv21hj210vxyjevIpIqioK6v4mJM8V0V7bY4RZ\nNcIA4tCQVWv71odeAaGfC6L8o6CCZ7KjHHs3gmphOo4EZNeQaru4VmXYbdMI\n29jD\r\n=V4pm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAEyJbmo66Wr2OBB+oyvI6r+1RQkk2yMRFbVR7kDupytAiEAt7bOEKqdrFb72BQYf/Cog6tYwxQNtylS0FoipRA23tM="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_2.0.0-alpha.2_1562024818217_0.22886999232011407"},"_hasShrinkwrap":false},"3.0.0":{"name":"trianglify","version":"3.0.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"lib/trianglify.js","dependencies":{"chroma-js":"^0.6.3","colors":"^1.1.2","delaunator":"^1.0.4","jsdom":"^7.0.2","natives":"^1.1.3","seedrandom":"^2.3.11","canvas":"^2.6.1"},"optionalDependencies":{"canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","d3.js","visualization"],"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","scripts":{"test":"mocha test/test.js","start":"gulp","postinstall":"node scripts/postinstall.js"},"browser":{"jsdom":false,"canvas":false},"devDependencies":{"browserify":"^9.0.3","chai":"^2.1.0","del":"^0.1.1","gulp":"^3.8.6","gulp-babel-minify":"^0.2.0","gulp-bump":"^0.1.11","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jshint":"^1.7.1","gulp-mocha":"^5.0.0","gulp-rename":"^1.2.0","gulp-sourcemaps":"^1.5.0","gulp-tag-version":"^1.1.0","jshint-stylish":"^0.4.0","mocha":"^2.1.0","node-notifier":"^5.2.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"npmName":"trianglify","npmFileMap":[{"basePath":"dist","files":["trianglify.min.js"]}],"gitHead":"7e4605a2c6f57b3da322a93120d9772fe81c921e","_id":"trianglify@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"dist":{"integrity":"sha512-9lFrhF6vkTpfyxunU4zwuhRwLLShR1Xp7GGy72t8ZR0TvE+nGIq4sdD/XveZ6hUZcEbLRCnGsjAgE8oMi6fmiA==","shasum":"b8d675b864db342f4aea22aab606a6ca52114dd8","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-3.0.0.tgz","fileCount":20,"unpackedSize":115949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehheGCRA9TVsSAnZWagAArIoP/0QZZSvlN8D4/uUV1w1z\nU2FliT5KZ7aMoFf65+dZ9zQ3E+BSr6Q8VzUHTM5ZGjL7zob/IcmRNCUSwtm5\nNWg+YalN3CfQHrWnpXZU7TCxArKQyfr7WIP8jFNB48Y581qmRAGlPt/aS8W4\niCGT+EQDWTo/4M5QYPj3leTFCGwxk2jezY+xZXP/Gej0Oz4SN85/eQ//cMKw\naajIzNbgTlDaYtto0mFlKRc7VTZqEOG07SxUCL8nATZ34KggVe3eS9Lu9YGg\nI04BqrtvbMdnegFkfaLxYtQ+8aEy9YTlffSRUY34Akk3kU4KBD24cn3jjyb6\nfrWIt8MCw5WedoRRZuTq1cwWXBrq9KLy4/7B8S2cCB1nE7bHL3AFY2I19rUV\nBqZzsaCm+jA2jAVEpNfzB1iD4GF+52AJdUG6HbxUH7rDHJudt/DsjdOg/mpL\nRU44znTofh/nWtxU/STeRfxIJeV3HYYKpwEpR7qaLyAaA/TTEpW7MmLdJPVb\nhQcDYl2kYlga+ee+2NsmSreSG3LFXVMzO1DLS/YreCyTT1f+UMYnW4wFgb7U\nX8k17wTtQ7SnVegGz8l8ldJEjWErwRahHlVN/9mC4JPnWRCQEvwPHiWVtxGl\nIzgqTeQxt2Jv+2qmrEfhYp23IM0R+NuGNHHj4vTZg0hFuFBXaBw8FGqbIHjx\n+rJA\r\n=1c9k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8BMkUfhB6NqRR4tZz959epVIMHYyAUav6isr2n6VgIAIgOVwg5OhP83/G1puJXpUcbHGl3+qYsSERhBeYyu8Ixwc="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_3.0.0_1585846150172_0.2739945709574032"},"_hasShrinkwrap":false},"4.0.0-next.0":{"name":"trianglify","version":"4.0.0-next.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"dist/trianglify.js","browser":"dist/trianglify.umd.js","module":"dist/trianglify.module.js","scripts":{"lint":"standard","test":"jest","build":"rollup -c","dev":"rollup -c -w","publish-beta":"npm build && npm publish --tag next","ci":"npm run lint && npm run build && npm run test"},"dependencies":{"chroma-js":"^2.1.0","delaunator":"^4.0.1","canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","canvas","visualization","pattern","lowpoly"],"standard":{"parser":"babel-eslint","ignore":["dist","**/vendor/**"]},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@rollup/plugin-babel":"^5.0.0","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","babel-eslint":"^10.1.0","jest":"^25.5.4","rollup":"^2.7.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^5.3.0","standard":"^14.3.3"},"readme":"# Trianglify ![Build Status](https://github.com/qrohlf/trianglify/workflows/build/badge.svg)\n\n\nTrianglify is a library that I wrote to generate nice SVG background images like this one:\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n# Contents\n[📦 Getting Trianglify](#getting-trianglify)  \n[🏎 Quickstart](#quickstart)  \n[⚖️ Licensing](#licensing)  \n[📖 API](#api)  \n[🎨 Configuration](#configuration)\n\n# Getting Trianglify\n\nYou can grab Trianglify with npm/yarn (recommended):\n\n```\nnpm install --save trianglify\n```\n\nInclude it in your application via the unpkg CDN:\n\n```\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n```\n\nOr download a .zip from the [**releases page**](https://github.com/qrohlf/trianglify/releases).\n\n\n# Quickstart\n\n**Browsers**\n```html\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n<script>\n  const pattern = trianglify({\n    width: window.innerWidth,\n    height: window.innerHeight\n  })\n  document.body.appendChild(pattern.toCanvas())\n</script>\n```\n\n**Node**\n```js\nconst trianglify = require('trianglify')\nconst fs = require('fs')\n\nconst canvas = trianglify({\n  width: 1920,\n  height: 1080\n}).toCanvas()\n\nconst file = fs.createWriteStream('trianglify.png')\ncanvas.createPNGStream().pipe(file)\n```\n\nYou can see the [`examples/`](./examples) folder for more usage examples.\n\nThe https://trianglify.io/ GUI is a good place to play around with the various configuration parameters and see their effect on the generated output, live.\n\n# Licensing\n\nThe source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.\n\n**However**, it's worth noting that you own the copyright to the output image files which you create using Trianglify, just like you own the copyright to an image created using something like [GIMP](https://www.gimp.org/). If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.\n\n\n# API\n\nTrianglify is primarily used by calling the `trianglify` function, which returns a `trianglify.Pattern` object.\n\n```js\n// load the library, either via a window global (browsers) or require call (node)\n// in es-module environments, you can `import trianglify from 'trianglify'` as well\nconst trianglify = window.trianglify || require('trianglify')\n\nconst options = { height: 400, width: 600 }\nconst pattern = trianglify(options)\nconsole.log(pattern instanceof trianglify.Pattern) // true\n```\n\n## pattern\n\nThis object holds the generated geometry and colors, and exposes a number of methods for rendering this geometry to the DOM or a Canvas.\n\n\n**`pattern.opts`**\n\nObject containing the options used to generate the pattern.\n\n\n**`pattern.points`**\n\nThe pseudo-random point grid used for the pattern geometry, in the following format:\n\n```js\n[\n  [x, y],\n  [x, y],\n  [x, y],\n  // and so on...\n]\n```\n\n\n**`pattern.polys`**\n\nThe array of colored polygons that make up the pattern, in the following format:\n\n```js\n// {x, y} center of the first polygon in the pattern\npattern.polys[0].centroid\n\n// [i, i, i] three indexes into the pattern.points array, \n// defining the shape corners\npattern.polys[0].vertexIndices\n\n// Chroma.js color object defining the color of the polygon\npattern.polys[0].color\n```\n\n\n**`pattern.toSVG(destSVG?, svgOpts?)`**\n\nRendering function for SVG. In browser or browser-like (e.g. JSDOM) environments, this will return a SVGElement DOM node. In node environments, this will return a lightweight node tree structure that can be serialized to a valid SVG string using the `toString()` function.\n\nIf an existing svg element is passed as the `destSVG`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nThe `svgOpts` option allows for some svg-specific customizations to the output:\n\n```js\nconst svgOpts = {\n  // Include or exclude the xmlns='http://www.w3.org/2000/svg' attribute on\n  // the root <svg> tag. See https://github.com/qrohlf/trianglify/issues/41\n  // for additional details on why this is sometimes important\n  includeNamespace: true,\n  // Controls how many decimals to round coordinate values to.\n  // You can set this to -1 to disable rounding. Default is 1.\n  coordinateDecimals: 1\n}\n```\n\n\n**`pattern.toSVGTree(svgOpts?)`**\n\nAlternate rendering function for SVG. Returns a lightweight node tree structure that can be seralized to a valid SVG string using the `toString()` function. In node environments, this is an alias for\n`pattern.toSVG()`.\n\n\n**`pattern.toCanvas(destCanvas?, canvasOpts?)`**\n\nRendering function for canvas. In browser and browser-like environments, returns a Canvas HTMLElement node. In node environments, this will return a node-canvas object which follows [a superset of the Web Canvas API](https://github.com/Automattic/node-canvas#documentation).\n\nIf an existing canvas element is passed as the `destCanvas`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nTo use this in a node.js environment, the optional dependency [node-canvas](https://github.com/Automattic/node-canvas) needs to be installed as a dependency of your project `npm install -save canvas`.\n\nThe `canvasOpts` option allows for some canvas-specific customizations to the output:\n\n```js\nconst canvasOpts = {\n  // render the canvas at native pixel densities for high-dpi (\"retina\")\n  // devices. This is a browser-only feature, as node environments do\n  // not typically expose information about the pixel ratio of the device\n  // they are running on\n  retina: true\n}\n```\n\n# Configuration\n\nTrianglify is configured by an options object passed in as the only argument. The following option keys are supported, see below for a complete description of what each option does.\n\n```js\nconst defaultOptions = {\n  width: 600,\n  height: 400,\n  cellSize: 75,\n  variance: 0.75,\n  seed: null,\n  xColors: 'random',\n  yColors: 'match',\n  fill: true,\n  palette: trianglify.colorbrewer,\n  colorSpace: 'lab',\n  colorFunction: trianglify.colorFunctions.interpolateLinear(0.5),\n  strokeWidth: 0,\n  points: null\n}\n```\n\n**`width`**\n\nInteger, defaults to `600`. Specify the width in pixels of the pattern to generate.\n\n**`height`**\n\nInteger, defaults to `400`. Specify the height in pixels of the pattern to generate.\n\n**`cellSize`**\n\nInteger, defaults to `75`. Specify the size in pixels of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.\n\n**`variance`**\n\nDecimal value between 0 and 1 (inclusive), defaults to `0.75`. Specify the amount of randomness used when generating triangles. You may set this higher than 1, but doing so may result in patterns that include \"gaps\" at the edges.\n\n**`seed`**\n\nString, defaults to `null`. Seeds the random number generator to create repeatable patterns. When set to null, the RNG will be seeded with random values from the environment. An example usage would be passing in blog post titles as the seed to generate unique but consistient trianglify patterns for every post on a blog site.\n\n**`xColors`**\n\nFalse, string, or array of CSS-formatted colors, default is `'random'`. Specify the color gradient used on the x axis.\n\nValid string values are 'random', or the name of a [colorbrewer palette](http://bl.ocks.org/mbostock/5577023) (i.e. 'YlGnBu' or 'RdBu'). When set to 'random', a gradient will be randomly selected from the colorbrewer library.\n\nValid array values should specify the color stops in any CSS format (i.e. `['#000000', '#4CAFE8', '#FFFFFF']`).\n\n**`yColors`**\n\nFalse, string or array of CSS-formatted colors, default is `'match'`. When set to 'match' the x-axis color gradient will be used on both axes. Otherwise, accepts the same options as xColors.\n\n**`palette`**\n\nThe array of color combinations to pick from when using `random` for the xColors or yColors. See [`utils/colorbrewer.js`](./utils/colorbrewer.js) for the format of this data.\n\n**`colorSpace`**\n\nString, defaults to `'lab'`. Set the color space used for generating gradients. Supported values are rgb, hsv, hsl, hsi, lab and hcl. See this [blog post](https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) for some background on why this matters.\n\n**`colorFunction`**\n\nSpecify a custom function for coloring triangles, defaults to `null`. Accepts a function to override the standard gradient coloring, which is passed a variety of data about the pattern and each polygon and must return a Chroma.js color object.\n\nSee [`examples/color-function-example.html`](./examples/color-function-example.html) and [`utils/colorFunctions.js`](./utils/colorFunctions.js) for more information about the built-in color functions, and how to write custom color functions.\n\n**`fill`**\n\nBoolean, defaults to `true`. Specifies whether the polygons generated by Trianglify should be filled in.\n\n**`strokeWidth`**\n\nNumber, defaults to 0. Specify the width of the strokes used to outline the polygons. This can be used in conjunction with `fill: false` to generate weblike patterns.\n\n**`points`**\n\nArray of points ([x, y]) to triangulate, defaults to null. When not specified an array randomised points is generated filling the space. Points must be within the coordinate space defined by `width` and `height`. See [`examples/custom-points-example.html`](./examples/custom-points-example.html) for a demonstration of how this option can be used to generate circular trianglify patterns.\n","readmeFilename":"Readme.md","gitHead":"13abf914026f827f610ab2f288275eae6b657d81","_id":"trianglify@4.0.0-next.0","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-f4FtjbIy5bjS0KccYIxL/1FCn8RX38oPxzyVgJx0NvXU0t7wNUidPplhVQM/Jsvnz8aLFZ+MV8/4gA8WC9ctbQ==","shasum":"8d6188acdc3f64fca82a561cd8fb228da11ea1f8","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-4.0.0-next.0.tgz","fileCount":30,"unpackedSize":365956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetauPCRA9TVsSAnZWagAAnskP/RDicwlsdphPRkvSW2ga\nZQL4zH+sVrESmqsbYPAjFP++mlFs59A060OOIYRDS43ZOJBNRoQeIONEGH1E\nmMZtaoPKVfmFsZq/Pg64IyACJ3LdNBjHAXA7FA8BAHbRg/tVX5F6fUrFzCl2\nomSeWP0t98g2dxY/VfCIDIJZThNUU4EyTAxLMdNkh94nJKSS0kz7uJKtuInh\niDbep1hvIkypnj24D6ug0syyx4+I17J3NIbvOkpNA4dBak+DGe4+9aftJlLC\nofiz3RBHroIppeudE4mDlmj3qKUfOgPVDDwxHblKvdEBxFT/+iwYFxdCYiUM\nkUtP5NgpYqetzy5WJX01+0S7yI3qmYjNWa2SEUywtbL/BzaareXjbrZM4lkY\njQuVhCEDBG0ruMqOmRH30Ftgf7ARnJtchoUh9SJgcgyz+4SsVBHo0/hmsgLL\n6L0kD47EC36oYU4UNCdtWywcJ4buf30iORR+oRlvyMI3VXhtL6Hra7z12a7D\n4kltwUSuRfCjut0ng3flxllP81xZ+hbGULdOeFqLcth6DdhOLthofFCd49Uz\ndye71+IRKWfozFZv94EFfb4QeJq7W3F6Hn0mQHFzLztB3SIWBK9yOgDdK3B4\nGckHxNI2qQhgGcw1UbkNLMwz4LhRuWcQTYqOAvaAdBT2egRc3kYKYwPssDFy\n16/z\r\n=FjfQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPqLPSzw0MmeNLhHimDGmW9gR5QRNVz60xS2qEiVfxSgIhALrIkE2VqncVsAKnJaN8DwS6yC5PtHBn240bS3gRPBvU"}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_4.0.0-next.0_1588964239349_0.9982841104816402"},"_hasShrinkwrap":false},"4.0.0-next.1":{"name":"trianglify","version":"4.0.0-next.1","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"dist/trianglify.js","browser":"dist/trianglify.umd.js","module":"dist/trianglify.module.js","scripts":{"lint":"standard","test":"jest","build":"rollup -c","dev":"rollup -c -w","publish-beta":"npm run build && npm publish --tag next","ci":"npm run lint && npm run build && npm run test"},"dependencies":{"chroma-js":"^2.1.0","delaunator":"^4.0.1","canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","canvas","visualization","pattern","lowpoly"],"standard":{"parser":"babel-eslint","ignore":["dist","**/vendor/**"]},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@rollup/plugin-babel":"^5.0.0","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","babel-eslint":"^10.1.0","jest":"^25.5.4","rollup":"^2.7.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^5.3.0","standard":"^14.3.3"},"readme":"# Trianglify ![Build Status](https://github.com/qrohlf/trianglify/workflows/build/badge.svg)\n\n\nTrianglify is a library that I wrote to generate nice SVG background images like this one:\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n# Contents\n[📦 Getting Trianglify](#getting-trianglify)  \n[🏎 Quickstart](#quickstart)  \n[⚖️ Licensing](#licensing)  \n[📖 API](#api)  \n[🎨 Configuration](#configuration)\n\n# Getting Trianglify\n\nYou can grab Trianglify with npm/yarn (recommended):\n\n```\nnpm install --save trianglify\n```\n\nInclude it in your application via the unpkg CDN:\n\n```\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n```\n\nOr download a .zip from the [**releases page**](https://github.com/qrohlf/trianglify/releases).\n\n\n# Quickstart\n\n**Browsers**\n```html\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n<script>\n  const pattern = trianglify({\n    width: window.innerWidth,\n    height: window.innerHeight\n  })\n  document.body.appendChild(pattern.toCanvas())\n</script>\n```\n\n**Node**\n```js\nconst trianglify = require('trianglify')\nconst fs = require('fs')\n\nconst canvas = trianglify({\n  width: 1920,\n  height: 1080\n}).toCanvas()\n\nconst file = fs.createWriteStream('trianglify.png')\ncanvas.createPNGStream().pipe(file)\n```\n\nYou can see the [`examples/`](./examples) folder for more usage examples.\n\nThe https://trianglify.io/ GUI is a good place to play around with the various configuration parameters and see their effect on the generated output, live.\n\n# Licensing\n\nThe source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.\n\n**However**, it's worth noting that you own the copyright to the output image files which you create using Trianglify, just like you own the copyright to an image created using something like [GIMP](https://www.gimp.org/). If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.\n\n\n# API\n\nTrianglify is primarily used by calling the `trianglify` function, which returns a `trianglify.Pattern` object.\n\n```js\n// load the library, either via a window global (browsers) or require call (node)\n// in es-module environments, you can `import trianglify from 'trianglify'` as well\nconst trianglify = window.trianglify || require('trianglify')\n\nconst options = { height: 400, width: 600 }\nconst pattern = trianglify(options)\nconsole.log(pattern instanceof trianglify.Pattern) // true\n```\n\n## pattern\n\nThis object holds the generated geometry and colors, and exposes a number of methods for rendering this geometry to the DOM or a Canvas.\n\n\n**`pattern.opts`**\n\nObject containing the options used to generate the pattern.\n\n\n**`pattern.points`**\n\nThe pseudo-random point grid used for the pattern geometry, in the following format:\n\n```js\n[\n  [x, y],\n  [x, y],\n  [x, y],\n  // and so on...\n]\n```\n\n\n**`pattern.polys`**\n\nThe array of colored polygons that make up the pattern, in the following format:\n\n```js\n// {x, y} center of the first polygon in the pattern\npattern.polys[0].centroid\n\n// [i, i, i] three indexes into the pattern.points array, \n// defining the shape corners\npattern.polys[0].vertexIndices\n\n// Chroma.js color object defining the color of the polygon\npattern.polys[0].color\n```\n\n\n**`pattern.toSVG(destSVG?, svgOpts?)`**\n\nRendering function for SVG. In browser or browser-like (e.g. JSDOM) environments, this will return a SVGElement DOM node. In node environments, this will return a lightweight node tree structure that can be serialized to a valid SVG string using the `toString()` function.\n\nIf an existing svg element is passed as the `destSVG`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nThe `svgOpts` option allows for some svg-specific customizations to the output:\n\n```js\nconst svgOpts = {\n  // Include or exclude the xmlns='http://www.w3.org/2000/svg' attribute on\n  // the root <svg> tag. See https://github.com/qrohlf/trianglify/issues/41\n  // for additional details on why this is sometimes important\n  includeNamespace: true,\n  // Controls how many decimals to round coordinate values to.\n  // You can set this to -1 to disable rounding. Default is 1.\n  coordinateDecimals: 1\n}\n```\n\n\n**`pattern.toSVGTree(svgOpts?)`**\n\nAlternate rendering function for SVG. Returns a lightweight node tree structure that can be seralized to a valid SVG string using the `toString()` function. In node environments, this is an alias for\n`pattern.toSVG()`.\n\n\n**`pattern.toCanvas(destCanvas?, canvasOpts?)`**\n\nRendering function for canvas. In browser and browser-like environments, returns a Canvas HTMLElement node. In node environments, this will return a node-canvas object which follows [a superset of the Web Canvas API](https://github.com/Automattic/node-canvas#documentation).\n\nIf an existing canvas element is passed as the `destCanvas`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nTo use this in a node.js environment, the optional dependency [node-canvas](https://github.com/Automattic/node-canvas) needs to be installed as a dependency of your project `npm install -save canvas`.\n\nThe `canvasOpts` option allows for some canvas-specific customizations to the output:\n\n```js\nconst canvasOpts = {\n  // render the canvas at native pixel densities for high-dpi (\"retina\")\n  // devices. This is a browser-only feature, as node environments do\n  // not typically expose information about the pixel ratio of the device\n  // they are running on\n  retina: true\n}\n```\n\n# Configuration\n\nTrianglify is configured by an options object passed in as the only argument. The following option keys are supported, see below for a complete description of what each option does.\n\n```js\nconst defaultOptions = {\n  width: 600,\n  height: 400,\n  cellSize: 75,\n  variance: 0.75,\n  seed: null,\n  xColors: 'random',\n  yColors: 'match',\n  fill: true,\n  palette: trianglify.colorbrewer,\n  colorSpace: 'lab',\n  colorFunction: trianglify.colorFunctions.interpolateLinear(0.5),\n  strokeWidth: 0,\n  points: null\n}\n```\n\n**`width`**\n\nInteger, defaults to `600`. Specify the width in pixels of the pattern to generate.\n\n**`height`**\n\nInteger, defaults to `400`. Specify the height in pixels of the pattern to generate.\n\n**`cellSize`**\n\nInteger, defaults to `75`. Specify the size in pixels of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.\n\n**`variance`**\n\nDecimal value between 0 and 1 (inclusive), defaults to `0.75`. Specify the amount of randomness used when generating triangles. You may set this higher than 1, but doing so may result in patterns that include \"gaps\" at the edges.\n\n**`seed`**\n\nString, defaults to `null`. Seeds the random number generator to create repeatable patterns. When set to null, the RNG will be seeded with random values from the environment. An example usage would be passing in blog post titles as the seed to generate unique but consistient trianglify patterns for every post on a blog site.\n\n**`xColors`**\n\nFalse, string, or array of CSS-formatted colors, default is `'random'`. Specify the color gradient used on the x axis.\n\nValid string values are 'random', or the name of a [colorbrewer palette](http://bl.ocks.org/mbostock/5577023) (i.e. 'YlGnBu' or 'RdBu'). When set to 'random', a gradient will be randomly selected from the colorbrewer library.\n\nValid array values should specify the color stops in any CSS format (i.e. `['#000000', '#4CAFE8', '#FFFFFF']`).\n\n**`yColors`**\n\nFalse, string or array of CSS-formatted colors, default is `'match'`. When set to 'match' the x-axis color gradient will be used on both axes. Otherwise, accepts the same options as xColors.\n\n**`palette`**\n\nThe array of color combinations to pick from when using `random` for the xColors or yColors. See [`utils/colorbrewer.js`](./utils/colorbrewer.js) for the format of this data.\n\n**`colorSpace`**\n\nString, defaults to `'lab'`. Set the color space used for generating gradients. Supported values are rgb, hsv, hsl, hsi, lab and hcl. See this [blog post](https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) for some background on why this matters.\n\n**`colorFunction`**\n\nSpecify a custom function for coloring triangles, defaults to `null`. Accepts a function to override the standard gradient coloring, which is passed a variety of data about the pattern and each polygon and must return a Chroma.js color object.\n\nSee [`examples/color-function-example.html`](./examples/color-function-example.html) and [`utils/colorFunctions.js`](./utils/colorFunctions.js) for more information about the built-in color functions, and how to write custom color functions.\n\n**`fill`**\n\nBoolean, defaults to `true`. Specifies whether the polygons generated by Trianglify should be filled in.\n\n**`strokeWidth`**\n\nNumber, defaults to 0. Specify the width of the strokes used to outline the polygons. This can be used in conjunction with `fill: false` to generate weblike patterns.\n\n**`points`**\n\nArray of points ([x, y]) to triangulate, defaults to null. When not specified an array randomised points is generated filling the space. Points must be within the coordinate space defined by `width` and `height`. See [`examples/custom-points-example.html`](./examples/custom-points-example.html) for a demonstration of how this option can be used to generate circular trianglify patterns.\n","readmeFilename":"Readme.md","gitHead":"35b9986426b38d5a6f9ec9fe3c90541b713c7a5d","_id":"trianglify@4.0.0-next.1","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-DHDiRG8tB6sSaQt3o/m7qSIe8OlA20yAaqzhN5P1jZRqP/4oinEdkjitYfElelKRxMr9vXO8NPBu9VH/kXy0FQ==","shasum":"eb18c34ac3d18a7109dbb0bb7e42d9ddbb1cc0cf","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-4.0.0-next.1.tgz","fileCount":30,"unpackedSize":365960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetavSCRA9TVsSAnZWagAA4gYP/iqzK3aORph53kkEhKPK\nDLQqxhWgq/XCjAR0iekONovBe5RSBfM/MuGpCbxanoRDdwigsPK8nSmxLVca\nYnPrJJFFCcGCcYKpcEIFgxwDBqmCFIOgA2fqxDAOhvms8EosVwU8jJbAwfpE\nYzkj4fY6zpOq4nJhQk6VYKJlIcMxrsUnY/4xRsNcEmFl6G1e9UqjYO13dfzp\n+YSSfdxFfUJ7qj2lkTlpNuDrmcbpmo2/EKEjt7QBuSTWbqtbjkOswAoylqMV\nhwzBQim0IiIgMknBgVUAnp9IKU9NIcdfusHyvJVw7Ozso68OVKI2iMnc3SuC\nGh75/Vd61TYVc/Ghk0auk2y3YjbK5xvBkIQ+Zckz+XVtCI9QtSkFWlZHTmMB\nxD4wHQMioGwl4z53jWCiJflsS13hFzV74aCyDep+6hk9e4bc+IvNELiCt4YS\nOFsYFzfloNpChHpyqoAfTpub5EF6QKZlWK1ugfLd7ol7IQ92A8kNaO496TyN\nRjJr4w9KLXRXqh5rhhRf5MFw3Imed8I3Gk85Ovm2BQSSUfdXD8tKkHQpvNle\nFWCQACjGPS+YVgY9zgIUjuSDyUOiibpI9DfzLu6eXQkXS1TSVIoX1uYWZp88\nEkVkOeKfZwcFtuhwQzqdmz4UQlQErQn7Y31kxlSGpJsE3zuUmW386pv8SM+L\nRIDu\r\n=prvL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtk9QurU+IkgIDRojQclMv70+/XUHCuLWFKCFZJiSeRwIhAIpcqYW8YOn948lZR7XVC/hvgb5ZIcIzf6aL+zgoFllo"}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_4.0.0-next.1_1588964305934_0.8342922059465956"},"_hasShrinkwrap":false},"4.0.0-next.2":{"name":"trianglify","version":"4.0.0-next.2","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"dist/trianglify.js","browser":"dist/trianglify.umd.js","module":"dist/trianglify.module.js","scripts":{"lint":"standard","test":"jest","build":"rollup -c","dev":"rollup -c -w","publish-beta":"npm run build && npm publish --tag next","ci":"npm run lint && npm run build && npm run test"},"dependencies":{"chroma-js":"^2.1.0","delaunator":"^4.0.1","canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","canvas","visualization","pattern","lowpoly"],"standard":{"parser":"babel-eslint","ignore":["dist","**/vendor/**"]},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@rollup/plugin-babel":"^5.0.0","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","babel-eslint":"^10.1.0","jest":"^25.5.4","rollup":"^2.7.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^5.3.0","standard":"^14.3.3"},"readme":"# Trianglify ![Build Status](https://github.com/qrohlf/trianglify/workflows/build/badge.svg)\n\n\nTrianglify is a library that I wrote to generate nice SVG background images like this one:\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n# Contents\n[📦 Getting Trianglify](#getting-trianglify)  \n[🏎 Quickstart](#quickstart)  \n[⚖️ Licensing](#licensing)  \n[📖 API](#api)  \n[🎨 Configuration](#configuration)\n\n# Getting Trianglify\n\nYou can grab Trianglify with npm/yarn (recommended):\n\n```\nnpm install --save trianglify\n```\n\nInclude it in your application via the unpkg CDN:\n\n```\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n```\n\nOr download a .zip from the [**releases page**](https://github.com/qrohlf/trianglify/releases).\n\n\n# Quickstart\n\n**Browsers**\n```html\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n<script>\n  const pattern = trianglify({\n    width: window.innerWidth,\n    height: window.innerHeight\n  })\n  document.body.appendChild(pattern.toCanvas())\n</script>\n```\n\n**Node**\n```js\nconst trianglify = require('trianglify')\nconst fs = require('fs')\n\nconst canvas = trianglify({\n  width: 1920,\n  height: 1080\n}).toCanvas()\n\nconst file = fs.createWriteStream('trianglify.png')\ncanvas.createPNGStream().pipe(file)\n```\n\nYou can see the [`examples/`](./examples) folder for more usage examples.\n\nThe https://trianglify.io/ GUI is a good place to play around with the various configuration parameters and see their effect on the generated output, live.\n\n# Licensing\n\nThe source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.\n\n**However**, it's worth noting that you own the copyright to the output image files which you create using Trianglify, just like you own the copyright to an image created using something like [GIMP](https://www.gimp.org/). If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.\n\n\n# API\n\nTrianglify is primarily used by calling the `trianglify` function, which returns a `trianglify.Pattern` object.\n\n```js\n// load the library, either via a window global (browsers) or require call (node)\n// in es-module environments, you can `import trianglify from 'trianglify'` as well\nconst trianglify = window.trianglify || require('trianglify')\n\nconst options = { height: 400, width: 600 }\nconst pattern = trianglify(options)\nconsole.log(pattern instanceof trianglify.Pattern) // true\n```\n\n## pattern\n\nThis object holds the generated geometry and colors, and exposes a number of methods for rendering this geometry to the DOM or a Canvas.\n\n\n**`pattern.opts`**\n\nObject containing the options used to generate the pattern.\n\n\n**`pattern.points`**\n\nThe pseudo-random point grid used for the pattern geometry, in the following format:\n\n```js\n[\n  [x, y],\n  [x, y],\n  [x, y],\n  // and so on...\n]\n```\n\n\n**`pattern.polys`**\n\nThe array of colored polygons that make up the pattern, in the following format:\n\n```js\n// {x, y} center of the first polygon in the pattern\npattern.polys[0].centroid\n\n// [i, i, i] three indexes into the pattern.points array, \n// defining the shape corners\npattern.polys[0].vertexIndices\n\n// Chroma.js color object defining the color of the polygon\npattern.polys[0].color\n```\n\n\n**`pattern.toSVG(destSVG?, svgOpts?)`**\n\nRendering function for SVG. In browser or browser-like (e.g. JSDOM) environments, this will return a SVGElement DOM node. In node environments, this will return a lightweight node tree structure that can be serialized to a valid SVG string using the `toString()` function.\n\nIf an existing svg element is passed as the `destSVG`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nThe `svgOpts` option allows for some svg-specific customizations to the output:\n\n```js\nconst svgOpts = {\n  // Include or exclude the xmlns='http://www.w3.org/2000/svg' attribute on\n  // the root <svg> tag. See https://github.com/qrohlf/trianglify/issues/41\n  // for additional details on why this is sometimes important\n  includeNamespace: true,\n  // Controls how many decimals to round coordinate values to.\n  // You can set this to -1 to disable rounding. Default is 1.\n  coordinateDecimals: 1\n}\n```\n\n\n**`pattern.toSVGTree(svgOpts?)`**\n\nAlternate rendering function for SVG. Returns a lightweight node tree structure that can be seralized to a valid SVG string using the `toString()` function. In node environments, this is an alias for\n`pattern.toSVG()`.\n\n\n**`pattern.toCanvas(destCanvas?, canvasOpts?)`**\n\nRendering function for canvas. In browser and browser-like environments, returns a Canvas HTMLElement node. In node environments, this will return a node-canvas object which follows [a superset of the Web Canvas API](https://github.com/Automattic/node-canvas#documentation).\n\nIf an existing canvas element is passed as the `destCanvas`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nTo use this in a node.js environment, the optional dependency [node-canvas](https://github.com/Automattic/node-canvas) needs to be installed as a dependency of your project `npm install -save canvas`.\n\nThe `canvasOpts` option allows for some canvas-specific customizations to the output:\n\n```js\nconst canvasOpts = {\n  // render the canvas at native pixel densities for high-dpi (\"retina\")\n  // devices. This is a browser-only feature, as node environments do\n  // not typically expose information about the pixel ratio of the device\n  // they are running on\n  retina: true\n}\n```\n\n# Configuration\n\nTrianglify is configured by an options object passed in as the only argument. The following option keys are supported, see below for a complete description of what each option does.\n\n```js\nconst defaultOptions = {\n  width: 600,\n  height: 400,\n  cellSize: 75,\n  variance: 0.75,\n  seed: null,\n  xColors: 'random',\n  yColors: 'match',\n  fill: true,\n  palette: trianglify.colorbrewer,\n  colorSpace: 'lab',\n  colorFunction: trianglify.colorFunctions.interpolateLinear(0.5),\n  strokeWidth: 0,\n  points: null\n}\n```\n\n**`width`**\n\nInteger, defaults to `600`. Specify the width in pixels of the pattern to generate.\n\n**`height`**\n\nInteger, defaults to `400`. Specify the height in pixels of the pattern to generate.\n\n**`cellSize`**\n\nInteger, defaults to `75`. Specify the size in pixels of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.\n\n**`variance`**\n\nDecimal value between 0 and 1 (inclusive), defaults to `0.75`. Specify the amount of randomness used when generating triangles. You may set this higher than 1, but doing so may result in patterns that include \"gaps\" at the edges.\n\n**`seed`**\n\nString, defaults to `null`. Seeds the random number generator to create repeatable patterns. When set to null, the RNG will be seeded with random values from the environment. An example usage would be passing in blog post titles as the seed to generate unique but consistient trianglify patterns for every post on a blog site.\n\n**`xColors`**\n\nFalse, string, or array of CSS-formatted colors, default is `'random'`. Specify the color gradient used on the x axis.\n\nValid string values are 'random', or the name of a [colorbrewer palette](http://bl.ocks.org/mbostock/5577023) (i.e. 'YlGnBu' or 'RdBu'). When set to 'random', a gradient will be randomly selected from the colorbrewer library.\n\nValid array values should specify the color stops in any CSS format (i.e. `['#000000', '#4CAFE8', '#FFFFFF']`).\n\n**`yColors`**\n\nFalse, string or array of CSS-formatted colors, default is `'match'`. When set to 'match' the x-axis color gradient will be used on both axes. Otherwise, accepts the same options as xColors.\n\n**`palette`**\n\nThe array of color combinations to pick from when using `random` for the xColors or yColors. See [`utils/colorbrewer.js`](./utils/colorbrewer.js) for the format of this data.\n\n**`colorSpace`**\n\nString, defaults to `'lab'`. Set the color space used for generating gradients. Supported values are rgb, hsv, hsl, hsi, lab and hcl. See this [blog post](https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) for some background on why this matters.\n\n**`colorFunction`**\n\nSpecify a custom function for coloring triangles, defaults to `null`. Accepts a function to override the standard gradient coloring, which is passed a variety of data about the pattern and each polygon and must return a Chroma.js color object.\n\nSee [`examples/color-function-example.html`](./examples/color-function-example.html) and [`utils/colorFunctions.js`](./utils/colorFunctions.js) for more information about the built-in color functions, and how to write custom color functions.\n\n**`fill`**\n\nBoolean, defaults to `true`. Specifies whether the polygons generated by Trianglify should be filled in.\n\n**`strokeWidth`**\n\nNumber, defaults to 0. Specify the width of the strokes used to outline the polygons. This can be used in conjunction with `fill: false` to generate weblike patterns.\n\n**`points`**\n\nArray of points ([x, y]) to triangulate, defaults to null. When not specified an array randomised points is generated filling the space. Points must be within the coordinate space defined by `width` and `height`. See [`examples/custom-points-example.html`](./examples/custom-points-example.html) for a demonstration of how this option can be used to generate circular trianglify patterns.\n","readmeFilename":"Readme.md","gitHead":"62a75835262875424c0cfc4453ef207efcedb855","_id":"trianglify@4.0.0-next.2","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-TMQkfVRTDoEGlQ9ghiJ/sFiIJhyBMKUWTJYa5vCbvRjCsxsMxBujEwbOcprJjlW3jrB3T+zmoCvANMoGURjU2A==","shasum":"526611fcc3b7937dd0bcfc9252789dc9c86f2620","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-4.0.0-next.2.tgz","fileCount":53,"unpackedSize":1133510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevBL3CRA9TVsSAnZWagAAt08P/30gx6jz5ouxHfCyouxl\ndOk7X5QZb2im0zEhuXSs3PZkYQKVYVmIhtlpFevE0RgJZcG2BBNt4DxwED7X\nw7l0keYtUCgk+uwQSOr8q2Cji+u0w/JqchX407OAgCieYDb8QChNtUlA4pDm\n5KUY17vSRwkOh6Lp7Qoun4aqbHybGvBTqrfLFdtVPrQBwoxoNW9dRhenENKB\nF6FLtbpYCTyhrevjCaT61STLv2djPxnQAYmEuY2xnn0tufAp1w6Va6mskgnr\n5r5NetucO219UhC39P58VCzDl99h5DxuoRuLEnZC5e9L6DUw0uhZq0qROliE\nNOKhNoRDvPa+Tm+NiZp5pjVs441eOxDrGq39VASZg41y3qh9feY3Ol4hsRDm\nOxUZl/Hq0hg0MgTpDgZfZCpRlKKqfR+D+5dIKgeDW8LPxbiuPYFQkZbbNsia\nPuV1R/D1WCdFT3AjTElHLPxw54pB102MTLTAGK/MU5rJ5b+L9PQwson0zzNX\nn8XGStRyQFotGCTWzbM5Y2V/CObi0Y1rM2hL5VqGWmZjO8UZuhtSXDMpIVpO\nEHToKt2sn+yuCWd5eEVM8CBb9sXn8m8m3XiMxSTDt+o/t4wAhff+2rdiD7+Z\n8bKk7oZc1jQdKUp50ugxBFBZSjRczrOkBqshg+4QqUTd0qbwDR0VKxnNrMH1\n24L3\r\n=G4w4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzk4ai9zVN0McDDEnonHNN1R849QrTs9/YXJ3q1Zfi5AIgF8zLAGAvwmXfJMXhgQ71Nv6wg6V3EByz7Ttqq6S2LCQ="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_4.0.0-next.2_1589383927438_0.6050621355913153"},"_hasShrinkwrap":false},"4.0.0-next.3":{"name":"trianglify","version":"4.0.0-next.3","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"dist/trianglify.js","scripts":{"lint":"standard","test":"jest","build":"rollup -c","dev":"rollup -c -w","publish-beta":"npm run build && npm publish --tag next","ci":"npm run lint && npm run build && npm run test"},"dependencies":{"chroma-js":"^2.1.0","delaunator":"^4.0.1","canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","canvas","visualization","pattern","lowpoly"],"standard":{"parser":"babel-eslint","ignore":["dist","**/vendor/**"]},"jest":{"setupFiles":["jest-canvas-mock"]},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@rollup/plugin-babel":"^5.0.0","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","babel-eslint":"^10.1.0","jest":"^25.5.4","jest-canvas-mock":"^2.2.0","rollup":"^2.7.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^5.3.0","standard":"^14.3.3"},"readme":"# Trianglify ![Build Status](https://github.com/qrohlf/trianglify/workflows/build/badge.svg)\n\n\nTrianglify is a library that I wrote to generate nice SVG background images like this one:\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n# Contents\n[📦 Getting Trianglify](#getting-trianglify)  \n[🏎 Quickstart](#quickstart)  \n[⚖️ Licensing](#licensing)  \n[📖 API](#api)  \n[🎨 Configuration](#configuration)\n\n# Getting Trianglify\n\nYou can grab Trianglify with npm/yarn (recommended):\n\n```\nnpm install --save trianglify\n```\n\nInclude it in your application via the unpkg CDN:\n\n```\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n```\n\nOr download a .zip from the [**releases page**](https://github.com/qrohlf/trianglify/releases).\n\n\n# Quickstart\n\n**Browsers**\n```html\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n<script>\n  const pattern = trianglify({\n    width: window.innerWidth,\n    height: window.innerHeight\n  })\n  document.body.appendChild(pattern.toCanvas())\n</script>\n```\n\n**Node**\n```js\nconst trianglify = require('trianglify')\nconst fs = require('fs')\n\nconst canvas = trianglify({\n  width: 1920,\n  height: 1080\n}).toCanvas()\n\nconst file = fs.createWriteStream('trianglify.png')\ncanvas.createPNGStream().pipe(file)\n```\n\nYou can see the [`examples/`](./examples) folder for more usage examples.\n\nThe https://trianglify.io/ GUI is a good place to play around with the various configuration parameters and see their effect on the generated output, live.\n\n# Licensing\n\nThe source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.\n\n**However**, it's worth noting that you own the copyright to the output image files which you create using Trianglify, just like you own the copyright to an image created using something like [GIMP](https://www.gimp.org/). If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.\n\n\n# API\n\nTrianglify is primarily used by calling the `trianglify` function, which returns a `trianglify.Pattern` object.\n\n```js\n// load the library, either via a window global (browsers) or require call (node)\n// in es-module environments, you can `import trianglify from 'trianglify'` as well\nconst trianglify = window.trianglify || require('trianglify')\n\nconst options = { height: 400, width: 600 }\nconst pattern = trianglify(options)\nconsole.log(pattern instanceof trianglify.Pattern) // true\n```\n\n## pattern\n\nThis object holds the generated geometry and colors, and exposes a number of methods for rendering this geometry to the DOM or a Canvas.\n\n\n**`pattern.opts`**\n\nObject containing the options used to generate the pattern.\n\n\n**`pattern.points`**\n\nThe pseudo-random point grid used for the pattern geometry, in the following format:\n\n```js\n[\n  [x, y],\n  [x, y],\n  [x, y],\n  // and so on...\n]\n```\n\n\n**`pattern.polys`**\n\nThe array of colored polygons that make up the pattern, in the following format:\n\n```js\n// {x, y} center of the first polygon in the pattern\npattern.polys[0].centroid\n\n// [i, i, i] three indexes into the pattern.points array, \n// defining the shape corners\npattern.polys[0].vertexIndices\n\n// Chroma.js color object defining the color of the polygon\npattern.polys[0].color\n```\n\n\n**`pattern.toSVG(destSVG?, svgOpts?)`**\n\nRendering function for SVG. In browser or browser-like (e.g. JSDOM) environments, this will return a SVGElement DOM node. In node environments, this will return a lightweight node tree structure that can be serialized to a valid SVG string using the `toString()` function.\n\nIf an existing svg element is passed as the `destSVG`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nThe `svgOpts` option allows for some svg-specific customizations to the output:\n\n```js\nconst svgOpts = {\n  // Include or exclude the xmlns='http://www.w3.org/2000/svg' attribute on\n  // the root <svg> tag. See https://github.com/qrohlf/trianglify/issues/41\n  // for additional details on why this is sometimes important\n  includeNamespace: true,\n  // Controls how many decimals to round coordinate values to.\n  // You can set this to -1 to disable rounding. Default is 1.\n  coordinateDecimals: 1\n}\n```\n\n\n**`pattern.toSVGTree(svgOpts?)`**\n\nAlternate rendering function for SVG. Returns a lightweight node tree structure that can be seralized to a valid SVG string using the `toString()` function. In node environments, this is an alias for\n`pattern.toSVG()`.\n\n\n**`pattern.toCanvas(destCanvas?, canvasOpts?)`**\n\nRendering function for canvas. In browser and browser-like environments, returns a Canvas HTMLElement node. In node environments, this will return a node-canvas object which follows [a superset of the Web Canvas API](https://github.com/Automattic/node-canvas#documentation).\n\nIf an existing canvas element is passed as the `destCanvas`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nTo use this in a node.js environment, the optional dependency [node-canvas](https://github.com/Automattic/node-canvas) needs to be installed as a dependency of your project `npm install -save canvas`.\n\nThe `canvasOpts` option allows for some canvas-specific customizations to the output:\n\n```js\nconst canvasOpts = {\n  // determines how the canvas is rendered on high-DPI (aka \"retina\") devices.\n  // - 'auto' will automatically render the canvas at the appropriate scale ratio\n  //   for pixel-perfect display.\n  // - a numeric value will render the canvas at that specific scale factor\n  //   for example, 2.0 will render it at 2x resolution, wheras 0.5 will render\n  //   at half resolution\n  // - 'false' will disable scaling, and the canvas will be rendered at the \n  //   exact resolution specified by `width, height`\n  scaling: 'auto',\n  // if the canvas is rendered at a different resolution than the {width, height}\n  // trianglify will apply some inline style attributes to scale it back to\n  // the requested {width, height} options. Set applyCssScaling to false to \n  // disable this behavior.\n  applyCssScaling: true\n}\n```\n\n# Configuration\n\nTrianglify is configured by an options object passed in as the only argument. The following option keys are supported, see below for a complete description of what each option does.\n\n```js\nconst defaultOptions = {\n  width: 600,\n  height: 400,\n  cellSize: 75,\n  variance: 0.75,\n  seed: null,\n  xColors: 'random',\n  yColors: 'match',\n  fill: true,\n  palette: trianglify.colorbrewer,\n  colorSpace: 'lab',\n  colorFunction: trianglify.colorFunctions.interpolateLinear(0.5),\n  strokeWidth: 0,\n  points: null\n}\n```\n\n**`width`**\n\nInteger, defaults to `600`. Specify the width in pixels of the pattern to generate.\n\n**`height`**\n\nInteger, defaults to `400`. Specify the height in pixels of the pattern to generate.\n\n**`cellSize`**\n\nInteger, defaults to `75`. Specify the size in pixels of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.\n\n**`variance`**\n\nDecimal value between 0 and 1 (inclusive), defaults to `0.75`. Specify the amount of randomness used when generating triangles. You may set this higher than 1, but doing so may result in patterns that include \"gaps\" at the edges.\n\n**`seed`**\n\nString, defaults to `null`. Seeds the random number generator to create repeatable patterns. When set to null, the RNG will be seeded with random values from the environment. An example usage would be passing in blog post titles as the seed to generate unique but consistient trianglify patterns for every post on a blog site.\n\n**`xColors`**\n\nFalse, string, or array of CSS-formatted colors, default is `'random'`. Specify the color gradient used on the x axis.\n\nValid string values are 'random', or the name of a [colorbrewer palette](http://bl.ocks.org/mbostock/5577023) (i.e. 'YlGnBu' or 'RdBu'). When set to 'random', a gradient will be randomly selected from the colorbrewer library.\n\nValid array values should specify the color stops in any CSS format (i.e. `['#000000', '#4CAFE8', '#FFFFFF']`).\n\n**`yColors`**\n\nFalse, string or array of CSS-formatted colors, default is `'match'`. When set to 'match' the x-axis color gradient will be used on both axes. Otherwise, accepts the same options as xColors.\n\n**`palette`**\n\nThe array of color combinations to pick from when using `random` for the xColors or yColors. See [`utils/colorbrewer.js`](./utils/colorbrewer.js) for the format of this data.\n\n**`colorSpace`**\n\nString, defaults to `'lab'`. Set the color space used for generating gradients. Supported values are rgb, hsv, hsl, hsi, lab and hcl. See this [blog post](https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) for some background on why this matters.\n\n**`colorFunction`**\n\nSpecify a custom function for coloring triangles, defaults to `null`. Accepts a function to override the standard gradient coloring, which is passed a variety of data about the pattern and each polygon and must return a Chroma.js color object.\n\nSee [`examples/color-function-example.html`](./examples/color-function-example.html) and [`utils/colorFunctions.js`](./utils/colorFunctions.js) for more information about the built-in color functions, and how to write custom color functions.\n\n**`fill`**\n\nBoolean, defaults to `true`. Specifies whether the polygons generated by Trianglify should be filled in.\n\n**`strokeWidth`**\n\nNumber, defaults to 0. Specify the width of the strokes used to outline the polygons. This can be used in conjunction with `fill: false` to generate weblike patterns.\n\n**`points`**\n\nArray of points ([x, y]) to triangulate, defaults to null. When not specified an array randomised points is generated filling the space. Points must be within the coordinate space defined by `width` and `height`. See [`examples/custom-points-example.html`](./examples/custom-points-example.html) for a demonstration of how this option can be used to generate circular trianglify patterns.\n","readmeFilename":"Readme.md","gitHead":"0f0f41879afc4a9e0167a4de809ea79420dda482","_id":"trianglify@4.0.0-next.3","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-nvO5YHC/x+FZiW3N68mpzvGn4Njdx2cc2ri4SRw6fh1XUxRsk124SBLs6esBvek0Vgt1MiWmazcsbKw0AhnLOA==","shasum":"17bfc3e3a02d1b13827ae8f7e1d75ac44425811b","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-4.0.0-next.3.tgz","fileCount":54,"unpackedSize":1135490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevCCPCRA9TVsSAnZWagAA1V4P/Ri4hMJqj9NjNaXHOQvE\nc/78pSig0wBqCwVu9QAVaR0e2utIQpg+0I/C+BMOKZ5PIoRfu2jF/aNF7u2J\nmjfWemPc0kGjBnwFOBuRsYeuI6P0SPvoWPIXilNDn9UHezhMi7ZhFNqb/jtc\nkt7sZ+gvz1kqWRq2c85dU1W2bOGtUS+Xoo0+YbgOPfUjBi48i5RKIbXe9NM9\nQuHI3PCYDOkP0WjzocLDRfC3EPfO7icdAymz7uGLB/fpNiQk1Nx9MdG0mVlv\niv4pLPLTjv+I0fMe3AaY6TMeZRHeKkZpyCUDznlHAaIbxy+mmpApVZGo6uy8\nUE7z5fO01mPcxnucW+B1a8WyKM1NodXvdts8yE8MDj0N0fEKVDdB/T2ie/Qf\ncm0k5gBw7HR6iDSVsGrKGSLYR46bKPBSR5RiOsbSWVJixNFGAXgaA1I0V54M\nGNm/EVHQPkIZP382lyagpr7kSKOvsJLLInN/AagZutYBYj4jluT1fcx5MCEu\nWS6Tg4GiHOOeN5axJBk/FcrVnynTI8Ct/y2RE1KD8w+ktbAoqKVLAgz5PwGN\n7DROTBUSSi71/993SQMgxpjzRHyOQ91iu+Waj4gRAJXAiT7nDEsqqATaAwdn\nifgBqtINn+BIZAaZb42ZBppDS+RxNeKlBAgltPKNQYKj69eYmsIkTXC5SWiW\nDjuJ\r\n=ubzm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEhbSA+ZE8sV007xB0GGrEcju+9LbYwqrxkmQLh/96+VAiEA/J/CvcI5HwFbgf8RZ/q6j+dJtEXsgYiGdz/1Ru/KnJ0="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_4.0.0-next.3_1589387406560_0.9836242938034678"},"_hasShrinkwrap":false},"4.0.0-next.4":{"name":"trianglify","version":"4.0.0-next.4","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"dist/trianglify.js","scripts":{"lint":"standard","test":"jest","build":"rollup -c","dev":"rollup -c -w","publish-beta":"npm run build && npm publish --tag next","ci":"npm run lint && npm run build && npm run test"},"dependencies":{"chroma-js":"^2.1.0","delaunator":"^4.0.1","canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","canvas","visualization","pattern","lowpoly"],"standard":{"parser":"babel-eslint","ignore":["dist","**/vendor/**"]},"jest":{"setupFiles":["jest-canvas-mock"]},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@rollup/plugin-babel":"^5.0.0","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","babel-eslint":"^10.1.0","jest":"^25.5.4","jest-canvas-mock":"^2.2.0","rollup":"^2.7.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^5.3.0","standard":"^14.3.3"},"readme":"# Trianglify ![Build Status](https://github.com/qrohlf/trianglify/workflows/build/badge.svg)\n\n\nTrianglify is a library that I wrote to generate nice SVG background images like this one:\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n# Contents\n[📦 Getting Trianglify](#getting-trianglify)  \n[🏎 Quickstart](#quickstart)  \n[⚖️ Licensing](#licensing)  \n[📖 API](#api)  \n[🎨 Configuration](#configuration)\n\n# Getting Trianglify\n\nYou can grab Trianglify with npm/yarn (recommended):\n\n```\nnpm install --save trianglify\n```\n\nInclude it in your application via the unpkg CDN:\n\n```\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n```\n\nOr download a .zip from the [**releases page**](https://github.com/qrohlf/trianglify/releases).\n\n\n# Quickstart\n\n**Browsers**\n```html\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n<script>\n  const pattern = trianglify({\n    width: window.innerWidth,\n    height: window.innerHeight\n  })\n  document.body.appendChild(pattern.toCanvas())\n</script>\n```\n\n**Node**\n```js\nconst trianglify = require('trianglify')\nconst fs = require('fs')\n\nconst canvas = trianglify({\n  width: 1920,\n  height: 1080\n}).toCanvas()\n\nconst file = fs.createWriteStream('trianglify.png')\ncanvas.createPNGStream().pipe(file)\n```\n\nYou can see the [`examples/`](./examples) folder for more usage examples.\n\nThe https://trianglify.io/ GUI is a good place to play around with the various configuration parameters and see their effect on the generated output, live.\n\n# Licensing\n\nThe source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.\n\n**However**, it's worth noting that you own the copyright to the output image files which you create using Trianglify, just like you own the copyright to an image created using something like [GIMP](https://www.gimp.org/). If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.\n\n\n# API\n\nTrianglify is primarily used by calling the `trianglify` function, which returns a `trianglify.Pattern` object.\n\n```js\n// load the library, either via a window global (browsers) or require call (node)\n// in es-module environments, you can `import trianglify from 'trianglify'` as well\nconst trianglify = window.trianglify || require('trianglify')\n\nconst options = { height: 400, width: 600 }\nconst pattern = trianglify(options)\nconsole.log(pattern instanceof trianglify.Pattern) // true\n```\n\n## pattern\n\nThis object holds the generated geometry and colors, and exposes a number of methods for rendering this geometry to the DOM or a Canvas.\n\n\n**`pattern.opts`**\n\nObject containing the options used to generate the pattern.\n\n\n**`pattern.points`**\n\nThe pseudo-random point grid used for the pattern geometry, in the following format:\n\n```js\n[\n  [x, y],\n  [x, y],\n  [x, y],\n  // and so on...\n]\n```\n\n\n**`pattern.polys`**\n\nThe array of colored polygons that make up the pattern, in the following format:\n\n```js\n// {x, y} center of the first polygon in the pattern\npattern.polys[0].centroid\n\n// [i, i, i] three indexes into the pattern.points array, \n// defining the shape corners\npattern.polys[0].vertexIndices\n\n// Chroma.js color object defining the color of the polygon\npattern.polys[0].color\n```\n\n\n**`pattern.toSVG(destSVG?, svgOpts?)`**\n\nRendering function for SVG. In browser or browser-like (e.g. JSDOM) environments, this will return a SVGElement DOM node. In node environments, this will return a lightweight node tree structure that can be serialized to a valid SVG string using the `toString()` function.\n\nIf an existing svg element is passed as the `destSVG`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nThe `svgOpts` option allows for some svg-specific customizations to the output:\n\n```js\nconst svgOpts = {\n  // Include or exclude the xmlns='http://www.w3.org/2000/svg' attribute on\n  // the root <svg> tag. See https://github.com/qrohlf/trianglify/issues/41\n  // for additional details on why this is sometimes important\n  includeNamespace: true,\n  // Controls how many decimals to round coordinate values to.\n  // You can set this to -1 to disable rounding. Default is 1.\n  coordinateDecimals: 1\n}\n```\n\n\n**`pattern.toSVGTree(svgOpts?)`**\n\nAlternate rendering function for SVG. Returns a lightweight node tree structure that can be seralized to a valid SVG string using the `toString()` function. In node environments, this is an alias for\n`pattern.toSVG()`.\n\n\n**`pattern.toCanvas(destCanvas?, canvasOpts?)`**\n\nRendering function for canvas. In browser and browser-like environments, returns a Canvas HTMLElement node. In node environments, this will return a node-canvas object which follows [a superset of the Web Canvas API](https://github.com/Automattic/node-canvas#documentation).\n\nIf an existing canvas element is passed as the `destCanvas`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nTo use this in a node.js environment, the optional dependency [node-canvas](https://github.com/Automattic/node-canvas) needs to be installed as a dependency of your project `npm install -save canvas`.\n\nThe `canvasOpts` option allows for some canvas-specific customizations to the output:\n\n```js\nconst canvasOpts = {\n  // determines how the canvas is rendered on high-DPI (aka \"retina\") devices.\n  // - 'auto' will automatically render the canvas at the appropriate scale ratio\n  //   for pixel-perfect display.\n  // - a numeric value will render the canvas at that specific scale factor\n  //   for example, 2.0 will render it at 2x resolution, wheras 0.5 will render\n  //   at half resolution\n  // - 'false' will disable scaling, and the canvas will be rendered at the \n  //   exact resolution specified by `width, height`\n  scaling: 'auto',\n  // if the canvas is rendered at a different resolution than the {width, height}\n  // trianglify will apply some inline style attributes to scale it back to\n  // the requested {width, height} options. Set applyCssScaling to false to \n  // disable this behavior.\n  applyCssScaling: true\n}\n```\n\n# Configuration\n\nTrianglify is configured by an options object passed in as the only argument. The following option keys are supported, see below for a complete description of what each option does.\n\n```js\nconst defaultOptions = {\n  width: 600,\n  height: 400,\n  cellSize: 75,\n  variance: 0.75,\n  seed: null,\n  xColors: 'random',\n  yColors: 'match',\n  fill: true,\n  palette: trianglify.colorbrewer,\n  colorSpace: 'lab',\n  colorFunction: trianglify.colorFunctions.interpolateLinear(0.5),\n  strokeWidth: 0,\n  points: null\n}\n```\n\n**`width`**\n\nInteger, defaults to `600`. Specify the width in pixels of the pattern to generate.\n\n**`height`**\n\nInteger, defaults to `400`. Specify the height in pixels of the pattern to generate.\n\n**`cellSize`**\n\nInteger, defaults to `75`. Specify the size in pixels of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.\n\n**`variance`**\n\nDecimal value between 0 and 1 (inclusive), defaults to `0.75`. Specify the amount of randomness used when generating triangles. You may set this higher than 1, but doing so may result in patterns that include \"gaps\" at the edges.\n\n**`seed`**\n\nString, defaults to `null`. Seeds the random number generator to create repeatable patterns. When set to null, the RNG will be seeded with random values from the environment. An example usage would be passing in blog post titles as the seed to generate unique but consistient trianglify patterns for every post on a blog site.\n\n**`xColors`**\n\nFalse, string, or array of CSS-formatted colors, default is `'random'`. Specify the color gradient used on the x axis.\n\nValid string values are 'random', or the name of a [colorbrewer palette](http://bl.ocks.org/mbostock/5577023) (i.e. 'YlGnBu' or 'RdBu'). When set to 'random', a gradient will be randomly selected from the colorbrewer library.\n\nValid array values should specify the color stops in any CSS format (i.e. `['#000000', '#4CAFE8', '#FFFFFF']`).\n\n**`yColors`**\n\nFalse, string or array of CSS-formatted colors, default is `'match'`. When set to 'match' the x-axis color gradient will be used on both axes. Otherwise, accepts the same options as xColors.\n\n**`palette`**\n\nThe array of color combinations to pick from when using `random` for the xColors or yColors. See [`utils/colorbrewer.js`](./utils/colorbrewer.js) for the format of this data.\n\n**`colorSpace`**\n\nString, defaults to `'lab'`. Set the color space used for generating gradients. Supported values are rgb, hsv, hsl, hsi, lab and hcl. See this [blog post](https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) for some background on why this matters.\n\n**`colorFunction`**\n\nSpecify a custom function for coloring triangles, defaults to `null`. Accepts a function to override the standard gradient coloring, which is passed a variety of data about the pattern and each polygon and must return a Chroma.js color object.\n\nSee [`examples/color-function-example.html`](./examples/color-function-example.html) and [`utils/colorFunctions.js`](./utils/colorFunctions.js) for more information about the built-in color functions, and how to write custom color functions.\n\n**`fill`**\n\nBoolean, defaults to `true`. Specifies whether the polygons generated by Trianglify should be filled in.\n\n**`strokeWidth`**\n\nNumber, defaults to 0. Specify the width of the strokes used to outline the polygons. This can be used in conjunction with `fill: false` to generate weblike patterns.\n\n**`points`**\n\nArray of points ([x, y]) to triangulate, defaults to null. When not specified an array randomised points is generated filling the space. Points must be within the coordinate space defined by `width` and `height`. See [`examples/custom-points-example.html`](./examples/custom-points-example.html) for a demonstration of how this option can be used to generate circular trianglify patterns.\n","readmeFilename":"Readme.md","gitHead":"e047cd9e7dd46af953ebbe062bb9f6bcef9997ec","_id":"trianglify@4.0.0-next.4","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-QIMLH/jLKgxIzVLCbHiV8A5E0WDrAguK1oW3Md7LK+6R6ab0baNK6T04Im+6V0uxLPNGJtQ55gNg8wJfWMwxWA==","shasum":"daf4a7d0b8ac4b338d962a2f76a313465c1ffc89","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-4.0.0-next.4.tgz","fileCount":54,"unpackedSize":1135490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevCG+CRA9TVsSAnZWagAAWHoP/2TXIsUlCHwFifzUTcqq\nqZ/CAfXEXfygTLy5m/n8TgkpwFBntDf03rvpgW3m4iM1arSChIlkj082rWdN\nTOR7VMTO/y5ZfkMAb9FssrUz/JWhJlq/f+SToJaPwZ7TeJzGHQv60aeHZ/me\nAEJi+HM3sSGnaor62VBR6BsY6NGjnsWXgRh79AJ8u1WUN8v8rg5kC5qYzmdk\nN6WiUPEqGrvFXS8dnzjGysjGuYZmPheipOW1aLmt2k4b0KgIw4v9LkIKUYo+\njTLZyHdqyz9/af0tvjp0XZJQ41nDVRHT/98nIU5AqOQxEa6++n+CWjwR9LZ2\nHh105eiS3zoImVNWuNd0SScZ6FuSeiWzHgLU/pWIZ4jWIQ/AlCIU2lMss2C0\ntrlYN/XPdjr1wysNvfbok8bBKvGFeja3TBwd1cSXXiEkotmU83wvr0ryV00q\nZ6WcB9JACqbzmAzov0AoKekO2fT1fe7c7uZlQL+roKkXeD2vWRyBcYTsHrK9\n8NmP/4zC7zOl1qP4Cf98M4OBN6jUU+8Mn718M5hulWXyVPkLF7C7MpcV2qSw\nu+6yI2cM8eSv58UiaOajWSIOjA3YY035lB6GYdZVuhznDv9k/iUsJv74BNq/\njLPfGQckKtbR75uc7kaArC1eCzBPSNfxhE+0SS5592tvEvu51J2+kGSycxAF\njqPH\r\n=lrNL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG7Oj8frNkvd5Od6se9//8+fQcuoVJlZVkJsEfAYeVVvAiAVOZGySIUdEv/9l+/4sskKc+VuIkicxF+UKXa45+pleg=="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_4.0.0-next.4_1589387709819_0.03518129278170434"},"_hasShrinkwrap":false},"4.0.0-next.5":{"name":"trianglify","version":"4.0.0-next.5","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"dist/trianglify.js","scripts":{"lint":"standard","test":"jest","build":"rollup -c","dev":"rollup -c -w","publish-beta":"npm run build && npm publish --tag next","ci":"npm run lint && npm run build && npm run test"},"dependencies":{"chroma-js":"^2.1.0","delaunator":"^4.0.1","canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","canvas","visualization","pattern","lowpoly"],"standard":{"parser":"babel-eslint","ignore":["dist","**/vendor/**"]},"jest":{"setupFiles":["jest-canvas-mock"]},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@rollup/plugin-babel":"^5.0.0","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","babel-eslint":"^10.1.0","jest":"^25.5.4","jest-canvas-mock":"^2.2.0","rollup":"^2.7.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^5.3.0","standard":"^14.3.3"},"readme":"# Trianglify ![Build Status](https://github.com/qrohlf/trianglify/workflows/build/badge.svg)\n\n\nTrianglify is a library that I wrote to generate nice SVG background images like this one:\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n# Contents\n[📦 Getting Trianglify](#getting-trianglify)  \n[🏎 Quickstart](#quickstart)  \n[⚖️ Licensing](#licensing)  \n[📖 API](#api)  \n[🎨 Configuration](#configuration)\n\n# Getting Trianglify\n\nYou can grab Trianglify with npm/yarn (recommended):\n\n```\nnpm install --save trianglify\n```\n\nInclude it in your application via the unpkg CDN:\n\n```\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n```\n\nOr download a .zip from the [**releases page**](https://github.com/qrohlf/trianglify/releases).\n\n\n# Quickstart\n\n**Browsers**\n```html\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n<script>\n  const pattern = trianglify({\n    width: window.innerWidth,\n    height: window.innerHeight\n  })\n  document.body.appendChild(pattern.toCanvas())\n</script>\n```\n\n**Node**\n```js\nconst trianglify = require('trianglify')\nconst fs = require('fs')\n\nconst canvas = trianglify({\n  width: 1920,\n  height: 1080\n}).toCanvas()\n\nconst file = fs.createWriteStream('trianglify.png')\ncanvas.createPNGStream().pipe(file)\n```\n\nYou can see the [`examples/`](./examples) folder for more usage examples.\n\nThe https://trianglify.io/ GUI is a good place to play around with the various configuration parameters and see their effect on the generated output, live.\n\n# Licensing\n\nThe source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.\n\n**However**, it's worth noting that you own the copyright to the output image files which you create using Trianglify, just like you own the copyright to an image created using something like [GIMP](https://www.gimp.org/). If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.\n\n\n# API\n\nTrianglify is primarily used by calling the `trianglify` function, which returns a `trianglify.Pattern` object.\n\n```js\n// load the library, either via a window global (browsers) or require call (node)\n// in es-module environments, you can `import trianglify from 'trianglify'` as well\nconst trianglify = window.trianglify || require('trianglify')\n\nconst options = { height: 400, width: 600 }\nconst pattern = trianglify(options)\nconsole.log(pattern instanceof trianglify.Pattern) // true\n```\n\n## pattern\n\nThis object holds the generated geometry and colors, and exposes a number of methods for rendering this geometry to the DOM or a Canvas.\n\n\n**`pattern.opts`**\n\nObject containing the options used to generate the pattern.\n\n\n**`pattern.points`**\n\nThe pseudo-random point grid used for the pattern geometry, in the following format:\n\n```js\n[\n  [x, y],\n  [x, y],\n  [x, y],\n  // and so on...\n]\n```\n\n\n**`pattern.polys`**\n\nThe array of colored polygons that make up the pattern, in the following format:\n\n```js\n// {x, y} center of the first polygon in the pattern\npattern.polys[0].centroid\n\n// [i, i, i] three indexes into the pattern.points array, \n// defining the shape corners\npattern.polys[0].vertexIndices\n\n// Chroma.js color object defining the color of the polygon\npattern.polys[0].color\n```\n\n\n**`pattern.toSVG(destSVG?, svgOpts?)`**\n\nRendering function for SVG. In browser or browser-like (e.g. JSDOM) environments, this will return a SVGElement DOM node. In node environments, this will return a lightweight node tree structure that can be serialized to a valid SVG string using the `toString()` function.\n\nIf an existing svg element is passed as the `destSVG`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nThe `svgOpts` option allows for some svg-specific customizations to the output:\n\n```js\nconst svgOpts = {\n  // Include or exclude the xmlns='http://www.w3.org/2000/svg' attribute on\n  // the root <svg> tag. See https://github.com/qrohlf/trianglify/issues/41\n  // for additional details on why this is sometimes important\n  includeNamespace: true,\n  // Controls how many decimals to round coordinate values to.\n  // You can set this to -1 to disable rounding. Default is 1.\n  coordinateDecimals: 1\n}\n```\n\n\n**`pattern.toSVGTree(svgOpts?)`**\n\nAlternate rendering function for SVG. Returns a lightweight node tree structure that can be seralized to a valid SVG string using the `toString()` function. In node environments, this is an alias for\n`pattern.toSVG()`.\n\n\n**`pattern.toCanvas(destCanvas?, canvasOpts?)`**\n\nRendering function for canvas. In browser and browser-like environments, returns a Canvas HTMLElement node. In node environments, this will return a node-canvas object which follows [a superset of the Web Canvas API](https://github.com/Automattic/node-canvas#documentation).\n\nIf an existing canvas element is passed as the `destCanvas`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nTo use this in a node.js environment, the optional dependency [node-canvas](https://github.com/Automattic/node-canvas) needs to be installed as a dependency of your project `npm install -save canvas`.\n\nThe `canvasOpts` option allows for some canvas-specific customizations to the output:\n\n```js\nconst canvasOpts = {\n  // determines how the canvas is rendered on high-DPI (aka \"retina\") devices.\n  // - 'auto' will automatically render the canvas at the appropriate scale ratio\n  //   for pixel-perfect display.\n  // - a numeric value will render the canvas at that specific scale factor\n  //   for example, 2.0 will render it at 2x resolution, wheras 0.5 will render\n  //   at half resolution\n  // - 'false' will disable scaling, and the canvas will be rendered at the \n  //   exact resolution specified by `width, height`\n  scaling: 'auto',\n  // if the canvas is rendered at a different resolution than the {width, height}\n  // trianglify will apply some inline style attributes to scale it back to\n  // the requested {width, height} options. Set applyCssScaling to false to \n  // disable this behavior.\n  applyCssScaling: true\n}\n```\n\n# Configuration\n\nTrianglify is configured by an options object passed in as the only argument. The following option keys are supported, see below for a complete description of what each option does.\n\n```js\nconst defaultOptions = {\n  width: 600,\n  height: 400,\n  cellSize: 75,\n  variance: 0.75,\n  seed: null,\n  xColors: 'random',\n  yColors: 'match',\n  fill: true,\n  palette: trianglify.colorbrewer,\n  colorSpace: 'lab',\n  colorFunction: trianglify.colorFunctions.interpolateLinear(0.5),\n  strokeWidth: 0,\n  points: null\n}\n```\n\n**`width`**\n\nInteger, defaults to `600`. Specify the width in pixels of the pattern to generate.\n\n**`height`**\n\nInteger, defaults to `400`. Specify the height in pixels of the pattern to generate.\n\n**`cellSize`**\n\nInteger, defaults to `75`. Specify the size in pixels of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.\n\n**`variance`**\n\nDecimal value between 0 and 1 (inclusive), defaults to `0.75`. Specify the amount of randomness used when generating triangles. You may set this higher than 1, but doing so may result in patterns that include \"gaps\" at the edges.\n\n**`seed`**\n\nString, defaults to `null`. Seeds the random number generator to create repeatable patterns. When set to null, the RNG will be seeded with random values from the environment. An example usage would be passing in blog post titles as the seed to generate unique but consistient trianglify patterns for every post on a blog site.\n\n**`xColors`**\n\nFalse, string, or array of CSS-formatted colors, default is `'random'`. Specify the color gradient used on the x axis.\n\nValid string values are 'random', or the name of a [colorbrewer palette](http://bl.ocks.org/mbostock/5577023) (i.e. 'YlGnBu' or 'RdBu'). When set to 'random', a gradient will be randomly selected from the colorbrewer library.\n\nValid array values should specify the color stops in any CSS format (i.e. `['#000000', '#4CAFE8', '#FFFFFF']`).\n\n**`yColors`**\n\nFalse, string or array of CSS-formatted colors, default is `'match'`. When set to 'match' the x-axis color gradient will be used on both axes. Otherwise, accepts the same options as xColors.\n\n**`palette`**\n\nThe array of color combinations to pick from when using `random` for the xColors or yColors. See [`utils/colorbrewer.js`](./utils/colorbrewer.js) for the format of this data.\n\n**`colorSpace`**\n\nString, defaults to `'lab'`. Set the color space used for generating gradients. Supported values are rgb, hsv, hsl, hsi, lab and hcl. See this [blog post](https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) for some background on why this matters.\n\n**`colorFunction`**\n\nSpecify a custom function for coloring triangles, defaults to `null`. Accepts a function to override the standard gradient coloring, which is passed a variety of data about the pattern and each polygon and must return a Chroma.js color object.\n\nSee [`examples/color-function-example.html`](./examples/color-function-example.html) and [`utils/colorFunctions.js`](./utils/colorFunctions.js) for more information about the built-in color functions, and how to write custom color functions.\n\n**`fill`**\n\nBoolean, defaults to `true`. Specifies whether the polygons generated by Trianglify should be filled in.\n\n**`strokeWidth`**\n\nNumber, defaults to 0. Specify the width of the strokes used to outline the polygons. This can be used in conjunction with `fill: false` to generate weblike patterns.\n\n**`points`**\n\nArray of points ([x, y]) to triangulate, defaults to null. When not specified an array randomised points is generated filling the space. Points must be within the coordinate space defined by `width` and `height`. See [`examples/custom-points-example.html`](./examples/custom-points-example.html) for a demonstration of how this option can be used to generate circular trianglify patterns.\n","readmeFilename":"Readme.md","gitHead":"62c94233d3084f7f5141124fd8c143a9d6202259","_id":"trianglify@4.0.0-next.5","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-yVn5rhueO50N+RYEmm0QtJ9Y4Q6NI4wpfAVfoq1W8dSkTM1Z+FFniLSIg192icJsIsnvjazPNGJceUVPQ8mVzw==","shasum":"14ac7fe5bf963c1062faa13c6b42edb73de03aaa","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-4.0.0-next.5.tgz","fileCount":54,"unpackedSize":1135490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyzaNCRA9TVsSAnZWagAA+D0P/3YcSmfYFWbIxpVPxtU9\n9qulQkZV3xXwnPCfAde2Hh9X1ihEtV0Qhr3yUyx3oN/cZOrfuOcxBE1bSQ0m\nMner7omBUHSBm9vAT9/VGQdkledh8iWsudrZTEGl5+UpEB1kFjC812YAvlzK\nEUObyEusZSgI1z/aRYmwLz3FQmvgQ2EbLUaxJql2eOi3/CA0paQIa/eKKsRH\nhQhdpbHhEDrtY6dkAoq+FDMKo2v1yvFgmn9WDq5zdvA/N8yqDto3a4HZRWyf\nVEZzvrPHcCvU210Ih99EJiO0gC2MWH7pQG8UzvmrLr3VkmLIKa1XonoM4F9i\nkdIZOShWN9dIwQLzYdnSt4gebeMH8/lCd5TNEEQdK8ETCbT9f8m+LWmgmfUd\nmjxpoc00C3FoLo2yLUESJQCeJkq/l4/ZYYg16P2Jt48kdh+qTrQOr7T3DkPA\nclCEjeC9MZMJOzWFtlcr5SUxlzrbmHIWoe0ADtSNyy8GrOhFzPMESfNhrBoI\na0ETMHc3w8Y0Ggj7dMmdrGTTzzRyk+TDo54XG/fmThluFrJZ20c+spXw6SYB\n8d9E8NeLK8DWMXoCPELzeI0p17mQn0yb6WalYiwYiZGqKtKwcb9oL8EFeqUf\n0+MWEFT2plleUmOjB1IhkdCf118XEZgYJfBWI8JPOwt4pwlvyKBz/ISvmu7v\noXfa\r\n=ItRq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCBE3YsuapFzGeKI6lYi+dmRQ8SRjyt83nrGVHnq1hygIgCl5H/d8J6AWaXD4O4XpcTgQDuMESf0bnK/pYJkY4LZM="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_4.0.0-next.5_1590376076923_0.8579932192332682"},"_hasShrinkwrap":false},"4.0.0":{"name":"trianglify","version":"4.0.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"dist/trianglify.js","scripts":{"lint":"standard","test":"jest","build":"rollup -c","dev":"rollup -c -w","publish-beta":"npm run build && npm publish --tag next","ci":"npm run lint && npm run build && npm run test"},"dependencies":{"chroma-js":"^2.1.0","delaunator":"^4.0.1","canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","canvas","visualization","pattern","lowpoly"],"standard":{"parser":"babel-eslint","ignore":["dist","**/vendor/**"]},"jest":{"setupFiles":["jest-canvas-mock"]},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@rollup/plugin-babel":"^5.0.0","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","babel-eslint":"^10.1.0","jest":"^25.5.4","jest-canvas-mock":"^2.2.0","rollup":"^2.7.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^5.3.0","standard":"^14.3.3"},"gitHead":"1238aba4224b49fb5ec8aac3a5a3bb10d61cb321","_id":"trianglify@4.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-AtN7awENzQuh9dUeOa9ghly8M/MrTWIcer/GzQpX21Hk4ecgVe4O/AlSiTXAT2ViAiBqggWg4etelP3vyAyjqQ==","shasum":"1b7943bfb310b62f5144648654b826f413f22c1d","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-4.0.0.tgz","fileCount":31,"unpackedSize":368197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJey97RCRA9TVsSAnZWagAAgMQP/0+5XSwOvBbiACqQhlZY\nAJDi7yHblGPRDwSKIjKKZ+H1/+oODgQs+hPgjsUWxn1s1n9wpEoA2BP3/Xol\ncWNCaJKGQ0ixjRnZL+WxfFtS2ldzvAzwGbiNwFPewMvv/kL84iy+CflpItdd\nApU1CZsGr7f0DJqmQdy0htqyXOamt1E94K+IPLRsW7ID2zZ8Wsa/W5krC0f+\n/jqD3m+x4It/C87uwKDOxmlFLKXyMWH5DYb+64Fq1gD3wduV6ZHfOt5Q94HL\noyD6uq4FaN4T8ehFSObzRjIapuJGLbJ1qdAU9Dy27OS5Ke2S+fLpu+tSb+yh\nYHQGiUG4E0g3DLxSb6Dt3mtcHREgvubo+wqBOiRE02MfmSPS4RjnZCaNcW8l\njicPfGqPXGsp3uImq54C32+S7de3/7c2WgOucCTKnS7TabEC6QPmeSqys4Xi\nd+PRfHMmu8/t0lxm+UAogPqbAmyhNMLvW34TVCUWkCLHRTSLFTv5S82WJY4U\nMVH8V76n1vOKhc/Mit/B9ngEFAopZMcRz0dJQsGX77O0kV0fDJ27TV2TJ2KH\nMb9YXnVN8zuPb1l9IpGfHfhosPRrhj/igXc4BaD1pzH6escVfgA6VfeL16vZ\nmJXexH1h7xO5xS+vP0fjfEvHTiJWvycB7O7HgGCXbpoR+2562dNrLq8PeA7I\nSH3x\r\n=meu/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCi0cxfb986Upfc2//meQXkwV2QPjNkwvGEf70XcKw8AQIgL+jYij6HOAsiDWBsQxJYmN1bx0ZOkSu7NlEgvPuR7HI="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_4.0.0_1590419152796_0.980125719896421"},"_hasShrinkwrap":false},"4.1.0-beta":{"name":"trianglify","version":"4.1.0-beta","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"dist/trianglify.js","scripts":{"lint":"standard","test":"jest","build":"rollup -c","dev":"rollup -c -w","publish-beta":"npm run build && npm publish --tag next","ci":"npm run lint && npm run build && npm run test"},"dependencies":{"chroma-js":"^2.1.0","delaunator":"^4.0.1","canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","canvas","visualization","pattern","lowpoly"],"standard":{"parser":"babel-eslint","ignore":["dist","**/vendor/**"]},"jest":{"setupFiles":["jest-canvas-mock"]},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@rollup/plugin-babel":"^5.0.0","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","babel-eslint":"^10.1.0","jest":"^25.5.4","jest-canvas-mock":"^2.2.0","rollup":"^2.7.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^5.3.0","standard":"^14.3.3"},"readme":"# Trianglify ![Build Status](https://github.com/qrohlf/trianglify/workflows/build/badge.svg)\n\n\nTrianglify is a library that I wrote to generate nice SVG background images like this one:\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n# Contents\n[📦 Getting Trianglify](#getting-trianglify)  \n[🏎 Quickstart](#quickstart)  \n[⚖️ Licensing](#licensing)  \n[📖 API](#api)  \n[🎨 Configuration](#configuration)\n\n# Getting Trianglify\n\nYou can grab Trianglify with npm/yarn (recommended):\n\n```\nnpm install --save trianglify\n```\n\nInclude it in your application via the unpkg CDN:\n\n```\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n```\n\nOr download a .zip from the [**releases page**](https://github.com/qrohlf/trianglify/releases).\n\n\n# Quickstart\n\n**Browsers**\n```html\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n<script>\n  const pattern = trianglify({\n    width: window.innerWidth,\n    height: window.innerHeight\n  })\n  document.body.appendChild(pattern.toCanvas())\n</script>\n```\n\n**Node**\n```js\nconst trianglify = require('trianglify')\nconst fs = require('fs')\n\nconst canvas = trianglify({\n  width: 1920,\n  height: 1080\n}).toCanvas()\n\nconst file = fs.createWriteStream('trianglify.png')\ncanvas.createPNGStream().pipe(file)\n```\n\nYou can see the [`examples/`](./examples) folder for more usage examples.\n\nThe https://trianglify.io/ GUI is a good place to play around with the various configuration parameters and see their effect on the generated output, live.\n\n# Licensing\n\nThe source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.\n\n**However**, it's worth noting that you own the copyright to the output image files which you create using Trianglify, just like you own the copyright to an image created using something like [GIMP](https://www.gimp.org/). If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.\n\n\n# API\n\nTrianglify is primarily used by calling the `trianglify` function, which returns a `trianglify.Pattern` object.\n\n```js\n// load the library, either via a window global (browsers) or require call (node)\n// in es-module environments, you can `import trianglify from 'trianglify'` as well\nconst trianglify = window.trianglify || require('trianglify')\n\nconst options = { height: 400, width: 600 }\nconst pattern = trianglify(options)\nconsole.log(pattern instanceof trianglify.Pattern) // true\n```\n\n## pattern\n\nThis object holds the generated geometry and colors, and exposes a number of methods for rendering this geometry to the DOM or a Canvas.\n\n\n**`pattern.opts`**\n\nObject containing the options used to generate the pattern.\n\n\n**`pattern.points`**\n\nThe pseudo-random point grid used for the pattern geometry, in the following format:\n\n```js\n[\n  [x, y],\n  [x, y],\n  [x, y],\n  // and so on...\n]\n```\n\n\n**`pattern.polys`**\n\nThe array of colored polygons that make up the pattern, in the following format:\n\n```js\n// {x, y} center of the first polygon in the pattern\npattern.polys[0].centroid\n\n// [i, i, i] three indexes into the pattern.points array, \n// defining the shape corners\npattern.polys[0].vertexIndices\n\n// Chroma.js color object defining the color of the polygon\npattern.polys[0].color\n```\n\n\n**`pattern.toSVG(destSVG?, svgOpts?)`**\n\nRendering function for SVG. In browser or browser-like (e.g. JSDOM) environments, this will return a SVGElement DOM node. In node environments, this will return a lightweight node tree structure that can be serialized to a valid SVG string using the `toString()` function.\n\nIf an existing svg element is passed as the `destSVG`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nThe `svgOpts` option allows for some svg-specific customizations to the output:\n\n```js\nconst svgOpts = {\n  // Include or exclude the xmlns='http://www.w3.org/2000/svg' attribute on\n  // the root <svg> tag. See https://github.com/qrohlf/trianglify/issues/41\n  // for additional details on why this is sometimes important\n  includeNamespace: true,\n  // Controls how many decimals to round coordinate values to.\n  // You can set this to -1 to disable rounding. Default is 1.\n  coordinateDecimals: 1\n}\n```\n\n\n**`pattern.toSVGTree(svgOpts?)`**\n\nAlternate rendering function for SVG. Returns a lightweight node tree structure that can be seralized to a valid SVG string using the `toString()` function. In node environments, this is an alias for\n`pattern.toSVG()`.\n\n\n**`pattern.toCanvas(destCanvas?, canvasOpts?)`**\n\nRendering function for canvas. In browser and browser-like environments, returns a Canvas HTMLElement node. In node environments, this will return a node-canvas object which follows [a superset of the Web Canvas API](https://github.com/Automattic/node-canvas#documentation).\n\nIf an existing canvas element is passed as the `destCanvas`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nTo use this in a node.js environment, the optional dependency [node-canvas](https://github.com/Automattic/node-canvas) needs to be installed as a dependency of your project `npm install -save canvas`.\n\nThe `canvasOpts` option allows for some canvas-specific customizations to the output:\n\n```js\nconst canvasOpts = {\n  // determines how the canvas is rendered on high-DPI (aka \"retina\") devices.\n  // - 'auto' will automatically render the canvas at the appropriate scale ratio\n  //   for pixel-perfect display.\n  // - a numeric value will render the canvas at that specific scale factor\n  //   for example, 2.0 will render it at 2x resolution, wheras 0.5 will render\n  //   at half resolution\n  // - 'false' will disable scaling, and the canvas will be rendered at the \n  //   exact resolution specified by `width, height`\n  scaling: 'auto',\n  // if the canvas is rendered at a different resolution than the {width, height}\n  // trianglify will apply some inline style attributes to scale it back to\n  // the requested {width, height} options. Set applyCssScaling to false to \n  // disable this behavior.\n  applyCssScaling: true\n}\n```\n\n# Configuration\n\nTrianglify is configured by an options object passed in as the only argument. The following option keys are supported, see below for a complete description of what each option does.\n\n```js\nconst defaultOptions = {\n  width: 600,\n  height: 400,\n  cellSize: 75,\n  variance: 0.75,\n  seed: null,\n  xColors: 'random',\n  yColors: 'match',\n  fill: true,\n  palette: trianglify.colorbrewer,\n  colorSpace: 'lab',\n  colorFunction: trianglify.colorFunctions.interpolateLinear(0.5),\n  strokeWidth: 0,\n  points: null\n}\n```\n\n**`width`**\n\nInteger, defaults to `600`. Specify the width in pixels of the pattern to generate.\n\n**`height`**\n\nInteger, defaults to `400`. Specify the height in pixels of the pattern to generate.\n\n**`cellSize`**\n\nInteger, defaults to `75`. Specify the size in pixels of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.\n\n**`variance`**\n\nDecimal value between 0 and 1 (inclusive), defaults to `0.75`. Specify the amount of randomness used when generating triangles. You may set this higher than 1, but doing so may result in patterns that include \"gaps\" at the edges.\n\n**`seed`**\n\nString, defaults to `null`. Seeds the random number generator to create repeatable patterns. When set to null, the RNG will be seeded with random values from the environment. An example usage would be passing in blog post titles as the seed to generate unique but consistient trianglify patterns for every post on a blog site.\n\n**`xColors`**\n\nFalse, string, or array of CSS-formatted colors, default is `'random'`. Specify the color gradient used on the x axis.\n\nValid string values are 'random', or the name of a [colorbrewer palette](http://bl.ocks.org/mbostock/5577023) (i.e. 'YlGnBu' or 'RdBu'). When set to 'random', a gradient will be randomly selected from the colorbrewer library.\n\nValid array values should specify the color stops in any CSS format (i.e. `['#000000', '#4CAFE8', '#FFFFFF']`).\n\n**`yColors`**\n\nFalse, string or array of CSS-formatted colors, default is `'match'`. When set to 'match' the x-axis color gradient will be used on both axes. Otherwise, accepts the same options as xColors.\n\n**`palette`**\n\nThe array of color combinations to pick from when using `random` for the xColors or yColors. See [`src/utils/colorbrewer.js`](./src/utils/colorbrewer.js) for the format of this data.\n\n**`colorSpace`**\n\nString, defaults to `'lab'`. Set the color space used for generating gradients. Supported values are rgb, hsv, hsl, hsi, lab and hcl. See this [blog post](https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) for some background on why this matters.\n\n**`colorFunction`**\n\nSpecify a custom function for coloring triangles, defaults to `null`. Accepts a function to override the standard gradient coloring, which is passed a variety of data about the pattern and each polygon and must return a Chroma.js color object.\n\nSee [`examples/color-function-example.html`](./examples/color-function-example.html) and [`utils/colorFunctions.js`](./utils/colorFunctions.js) for more information about the built-in color functions, and how to write custom color functions.\n\n**`fill`**\n\nBoolean, defaults to `true`. Specifies whether the polygons generated by Trianglify should be filled in.\n\n**`strokeWidth`**\n\nNumber, defaults to 0. Specify the width of the strokes used to outline the polygons. This can be used in conjunction with `fill: false` to generate weblike patterns.\n\n**`points`**\n\nArray of points ([x, y]) to triangulate, defaults to null. When not specified an array randomised points is generated filling the space. Points must be within the coordinate space defined by `width` and `height`. See [`examples/custom-points-example.html`](./examples/custom-points-example.html) for a demonstration of how this option can be used to generate circular trianglify patterns.\n","readmeFilename":"Readme.md","gitHead":"c19118fac4d12cbe759c7eba8e918d7b4fe10602","_id":"trianglify@4.1.0-beta","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-wuqC5pki4u+gNoZDxNqqGNuzGVRQET10jwq4M702y5RdT87QdBD/Tg+VdPDOLMvVWdmjY9mBpK6xU5BRe8nV3w==","shasum":"fc67895dddbb6898f146aff6156d889b445dca4a","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-4.1.0-beta.tgz","fileCount":32,"unpackedSize":369491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl1E8CRA9TVsSAnZWagAAowgP/2i7sJJpGzQmekctL1Z0\n1nvKvqWcuPZ7hLvrghKF/V1QoM0lHtQG+aB4uvB11u3y1kw6aBqCj80D8fUB\nh52tVkoxKLCSxIEW9NKlJeVg8y/elZFTxY18iRQ/eN/otH7JTIJUYo5+X3H2\n6zqchBPqvnHYtQnvt/XE5eAtJqFTQ+BM7+GuEp+JOIG1SM5VljXSOMdncUbJ\nc2tiqfIFmJzuFMyqdndMRYnGK7KeQJRyhlvHo271WN1aXBcSKPdWGnWNGrk9\nB5Fj1HI1yc1CjKCSkA2MCrC5J4Vypnx4GQJ3q1lsRaUfdg9hOreBI3qb141W\nniSy8Q5PvISSzPHvDnNTE4LJZGyemz8BXNkYqrrwQmYOkI+fnidph5+DE1Wd\ny1XgekPBj2XGhDvL6pNjDyshlnkq0cJH99ZQlBmgM2il80WVvgSaA23AGgzf\n7ow/nElUfg2Hi1cjloyParYspkLGe4gk5O26lNG7tfEmMf08qqdSCzd51zjw\nhH/bwL5UyK4/g6nVqas2grr+CXgnq3TPr0UNYISFvUmgfhcIXjFi6bqi2FUE\nzMsutvvkr0uy3DX+ouie65+GoeDqUpPvk+ZSFnOhOJojcjHpvrcSyhiN49UZ\nxESfiM8HG7NuGFyHaVroGpEE4EGoKXoBkGFL765qiQeSHNscxeo+Tcfd1f0I\nPv6P\r\n=te2k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG7Wu2YWmAewSsNCDZbHdE8qmVb9zLOw6wOUrJzJ3tPfAiBN5B7z/VGdo4GfDPRgICJPIDg82xQfdqAyuCHbQG1idw=="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_4.1.0-beta_1603752251609_0.34454367787652607"},"_hasShrinkwrap":false},"4.1.0":{"name":"trianglify","version":"4.1.0","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"dist/trianglify.js","scripts":{"lint":"standard","test":"jest","build":"rollup -c","dev":"rollup -c -w","publish-beta":"npm run build && npm publish --tag next","ci":"npm run lint && npm run build && npm run test"},"dependencies":{"chroma-js":"^2.1.0","delaunator":"^4.0.1","canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","canvas","visualization","pattern","lowpoly"],"standard":{"parser":"babel-eslint","ignore":["dist","**/vendor/**"]},"jest":{"setupFiles":["jest-canvas-mock"]},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@rollup/plugin-babel":"^5.0.0","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","babel-eslint":"^10.1.0","jest":"^25.5.4","jest-canvas-mock":"^2.2.0","rollup":"^2.7.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^5.3.0","standard":"^14.3.3"},"gitHead":"133ec6e7e508454f5194e1b003f7c3be6405d834","_id":"trianglify@4.1.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-c3i0nQmeEVIjcpeSeANtL2AvwzEp4IG3JOQMn442joKmBMFieA2ngZr0C3w8WRv6bpi3cJf/gSm5YMvMJOkpsA==","shasum":"0952cd3ba0f0d2589eeaf155eb3a78be09732621","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-4.1.0.tgz","fileCount":32,"unpackedSize":393724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnwQjCRA9TVsSAnZWagAApTEP/jhrlHbhWhGFvwptq1fp\ni0itCIZZ8257weRTFPz6cSgNuyRB0pvCw+2eHcTfK5PRLiryKg1+NM8aPoMP\n+Ib4WT+6/fFrgjzVQWBljCxSULIg5lI8n3CQx10bXWVrjL/G2w++xFAuHn+9\nuChZ8/0dUPUYwEKW6UL4SmtFPAsKE3UtD7XKF+KL6knWsLMb8jPuPcSVh9xl\n78cLl7Ua7priryHKS1tRDjiPGnxh0HIyxYb/Dijqv00EVasaMtZ6TfBrQqF8\nagaxbZsUqAE8+fobMJFf9pEzfw0DWcM2cQ9fF9lA1AHYfCkeUbVS/RAEBOWK\nWtI9erkQpOOdwkWsGapyVhWIfckOJMhBL585AAVAFPnuJRWgpHC8IGP5LlEa\nelRL7fuuucZbQb694shyO60+12XU/TwdUlHzUZNbGje904g1hlS4O6qC3xAw\nyv42o8SSj05zmxfxBsa7wBiva8Dyygaw3ZNXDHdvH2awUcS1kls5qW856I3q\nM9WV3SjeUs+hgMeSn20XcLqcEmcEOh7mK782Tm+GIvT9hMR0uOiPvQnrhTSq\nHQTjz44ZHxG+CXpGuTpC0guj5dCdiCLuL3n3Z18dw874qJSqIVmxDGeYEsAZ\nKePkRKCVUSNqFtZJrw6I1aG/2YoaN7auAUMJvueoRrfFUCuwKmg240pZ5Zej\nBjoU\r\n=TOf9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGmnjUgHDHNnEndObR5d1pWbibEDV+p1UTkfaz93ldBAIhANaNn8gqj9XekWKRdvvRO0fwWadDPKnY4lM4B3YHr/Jz"}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_4.1.0_1604256802693_0.29698693318943525"},"_hasShrinkwrap":false},"4.1.1":{"name":"trianglify","version":"4.1.1","description":"Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.","main":"dist/trianglify.js","scripts":{"lint":"standard","test":"jest","build":"rollup -c","dev":"rollup -c -w","publish-beta":"npm run build && npm publish --tag next","ci":"npm run lint && npm run build && npm run test"},"dependencies":{"chroma-js":"^2.1.0","delaunator":"^4.0.1","canvas":"^2.6.1"},"directories":{"example":"examples"},"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"keywords":["svg","canvas","visualization","pattern","lowpoly"],"standard":{"parser":"babel-eslint","ignore":["dist","**/vendor/**"]},"jest":{"setupFiles":["jest-canvas-mock"]},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"license":"GPL-3.0","bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"homepage":"https://github.com/qrohlf/trianglify","devDependencies":{"@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-class-properties":"^7.8.3","@babel/preset-env":"^7.9.6","@rollup/plugin-babel":"^5.0.0","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","babel-eslint":"^10.1.0","jest":"^25.5.4","jest-canvas-mock":"^2.2.0","rollup":"^2.7.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^5.3.0","standard":"^14.3.3"},"gitHead":"0d469f288fa72b7dce91ea36a58a1261487953ff","_id":"trianglify@4.1.1","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-zWfv8Qq9b3eYYiMMseGd1kvOW4xqfyGXs5xSA3pgpM2ynP+ABSFK81yVtwk4Waj9tC9jwJLiR3DHLPKlzZYO5Q==","shasum":"329976dcd43f4fa63e81f20b4a11364b538f6b94","tarball":"https://registry.npmjs.org/trianglify/-/trianglify-4.1.1.tgz","fileCount":32,"unpackedSize":393724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnwR8CRA9TVsSAnZWagAA+AoP/1UJJcsJWUJIE5xmowa+\npbhYl3teieC3jaPoUZaCLkl6uF0FHe//pCe5QC4Y0D+1BXIe/7jI6qZQnrFT\nXEN5V9BJKPXrGiN1rwfhSeLzpnwjEt7L7zR5DtH3AT7uD8k3VXZk8gpRBFsW\nNC3L7eCUWXWe623tolCW8s9/fPNO8FhgRkz314RIUHjNn+1lI4MpYj8UDK/6\n0SxtQCrMoNF+T0mSl9KiZ1xFSbBx/SWARTNICEW7bEqi3FRSBUwPbVR3XmNR\ngBsGQRP9SUBZyH0TtAAsPbdtcZZ7u+ZE3upCyVxT2LTaH+e2B1H8a+8sJDOB\nyVgpFuDQpU2rZD3a2lEkuQ+CAFg5msd6/qxahFx9AveSd+qB4wYVzrpa5Egw\nbggcBCszrfLQyxUKB7GoU0KLT6ISUTKVMn3kvRB20VqTcmLt5l13oWaYXIyY\n/8dz0ADzcuUgWdfRh9lBui6Q0vm/cfIuXJW+VzeSHJh0hAkk1iAJ9HuyHs37\nFlmFoGnU31xMO/5qOnrhfrubTLTV/ZZur/e+vcMpIdvsm+vuQ2WUT8DAhp9Y\n2chZqXSw0VlFnYu+w0RUaAVX/FJTUcRIqB0CTW+ii6yRUgfmc+k6HVYhr9K4\nSCWxIaJZBjEwwgYe6tKA3FzJ7McaBBkv/uBXjBmkXBOJ2mSajmmCx/XMq3K+\n6ekA\r\n=m5QJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFDRJ3Ku4MKr7KP99xaVlFRCDoDS0rOQay+blvMHOipaAiAaf/meckvToNmRmQnr2cwo8cvRYQX206tICcvAnu5iBg=="}]},"maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"_npmUser":{"name":"qrohlf","email":"qr@qrohlf.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trianglify_4.1.1_1604256891602_0.035601121147065706"},"_hasShrinkwrap":false}},"readme":"# Trianglify ![Build Status](https://github.com/qrohlf/trianglify/workflows/build/badge.svg)\n\n\nTrianglify is a library that I wrote to generate nice SVG background images like this one:\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n# Contents\n[📦 Getting Trianglify](#getting-trianglify)  \n[🏎 Quickstart](#quickstart)  \n[⚖️ Licensing](#licensing)  \n[📖 API](#api)  \n[🎨 Configuration](#configuration)\n\n# 📦 Getting Trianglify\n\nYou can grab Trianglify with npm/yarn (recommended):\n\n```\nnpm install --save trianglify\n```\n\nInclude it in your application via the unpkg CDN:\n\n```\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n```\n\nOr download a .zip from the [**releases page**](https://github.com/qrohlf/trianglify/releases).\n\n\n# 🏎 Quickstart\n\n**Browsers**\n```html\n<script src='https://unpkg.com/trianglify@^4/dist/trianglify.bundle.js'></script>\n<script>\n  const pattern = trianglify({\n    width: window.innerWidth,\n    height: window.innerHeight\n  })\n  document.body.appendChild(pattern.toCanvas())\n</script>\n```\n\n**Node**\n```js\nconst trianglify = require('trianglify')\nconst fs = require('fs')\n\nconst canvas = trianglify({\n  width: 1920,\n  height: 1080\n}).toCanvas()\n\nconst file = fs.createWriteStream('trianglify.png')\ncanvas.createPNGStream().pipe(file)\n```\n\nYou can see the [`examples/`](./examples) folder for more usage examples.\n\nThe https://trianglify.io/ GUI is a good place to play around with the various configuration parameters and see their effect on the generated output, live.\n\n# ⚖️ Licensing\n\nThe source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license.\n\n**However**, it's worth noting that you own the copyright to the output image files which you create using Trianglify, just like you own the copyright to an image created using something like [GIMP](https://www.gimp.org/). If you just want to use an image file that was generated using Trianglify in your project, and do not plan to distribute the Trianglify source code or compiled versions of it, you do not need to worry about the license restrictions described above.\n\n\n# 📖 API\n\nTrianglify is primarily used by calling the `trianglify` function, which returns a `trianglify.Pattern` object.\n\n```js\n// load the library, either via a window global (browsers) or require call (node)\n// in es-module environments, you can `import trianglify from 'trianglify'` as well\nconst trianglify = window.trianglify || require('trianglify')\n\nconst options = { height: 400, width: 600 }\nconst pattern = trianglify(options)\nconsole.log(pattern instanceof trianglify.Pattern) // true\n```\n\n## pattern\n\nThis object holds the generated geometry and colors, and exposes a number of methods for rendering this geometry to the DOM or a Canvas.\n\n\n**`pattern.opts`**\n\nObject containing the options used to generate the pattern.\n\n\n**`pattern.points`**\n\nThe pseudo-random point grid used for the pattern geometry, in the following format:\n\n```js\n[\n  [x, y],\n  [x, y],\n  [x, y],\n  // and so on...\n]\n```\n\n\n**`pattern.polys`**\n\nThe array of colored polygons that make up the pattern, in the following format:\n\n```js\n// {x, y} center of the first polygon in the pattern\npattern.polys[0].centroid\n\n// [i, i, i] three indexes into the pattern.points array, \n// defining the shape corners\npattern.polys[0].vertexIndices\n\n// Chroma.js color object defining the color of the polygon\npattern.polys[0].color\n```\n\n\n**`pattern.toSVG(destSVG?, svgOpts?)`**\n\nRendering function for SVG. In browser or browser-like (e.g. JSDOM) environments, this will return a SVGElement DOM node. In node environments, this will return a lightweight node tree structure that can be serialized to a valid SVG string using the `toString()` function.\n\nIf an existing svg element is passed as the `destSVG`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nThe `svgOpts` option allows for some svg-specific customizations to the output:\n\n```js\nconst svgOpts = {\n  // Include or exclude the xmlns='http://www.w3.org/2000/svg' attribute on\n  // the root <svg> tag. See https://github.com/qrohlf/trianglify/issues/41\n  // for additional details on why this is sometimes important\n  includeNamespace: true,\n  // Controls how many decimals to round coordinate values to.\n  // You can set this to -1 to disable rounding. Default is 1.\n  coordinateDecimals: 1\n}\n```\n\n\n**`pattern.toSVGTree(svgOpts?)`**\n\nAlternate rendering function for SVG. Returns a lightweight node tree structure that can be seralized to a valid SVG string using the `toString()` function. In node environments, this is an alias for\n`pattern.toSVG()`.\n\n\n**`pattern.toCanvas(destCanvas?, canvasOpts?)`**\n\nRendering function for canvas. In browser and browser-like environments, returns a Canvas HTMLElement node. In node environments, this will return a node-canvas object which follows [a superset of the Web Canvas API](https://github.com/Automattic/node-canvas#documentation).\n\nIf an existing canvas element is passed as the `destCanvas`, this function will render the pattern to the pre-existing element instead of creating a new one.\n\nTo use this in a node.js environment, the optional dependency [node-canvas](https://github.com/Automattic/node-canvas) needs to be installed as a dependency of your project `npm install -save canvas`.\n\nThe `canvasOpts` option allows for some canvas-specific customizations to the output:\n\n```js\nconst canvasOpts = {\n  // determines how the canvas is rendered on high-DPI (aka \"retina\") devices.\n  // - 'auto' will automatically render the canvas at the appropriate scale ratio\n  //   for pixel-perfect display.\n  // - a numeric value will render the canvas at that specific scale factor\n  //   for example, 2.0 will render it at 2x resolution, wheras 0.5 will render\n  //   at half resolution\n  // - 'false' will disable scaling, and the canvas will be rendered at the \n  //   exact resolution specified by `width, height`\n  scaling: 'auto',\n  // if the canvas is rendered at a different resolution than the {width, height}\n  // trianglify will apply some inline style attributes to scale it back to\n  // the requested {width, height} options. Set applyCssScaling to false to \n  // disable this behavior.\n  applyCssScaling: true\n}\n```\n\n# 🎨 Configuration\n\nTrianglify is configured by an options object passed in as the only argument. The following option keys are supported, see below for a complete description of what each option does.\n\n```js\nconst defaultOptions = {\n  width: 600,\n  height: 400,\n  cellSize: 75,\n  variance: 0.75,\n  seed: null,\n  xColors: 'random',\n  yColors: 'match',\n  fill: true,\n  palette: trianglify.colorbrewer,\n  colorSpace: 'lab',\n  colorFunction: trianglify.colorFunctions.interpolateLinear(0.5),\n  strokeWidth: 0,\n  points: null\n}\n```\n\n**`width`**\n\nInteger, defaults to `600`. Specify the width in pixels of the pattern to generate.\n\n**`height`**\n\nInteger, defaults to `400`. Specify the height in pixels of the pattern to generate.\n\n**`cellSize`**\n\nInteger, defaults to `75`. Specify the size in pixels of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.\n\n**`variance`**\n\nDecimal value between 0 and 1 (inclusive), defaults to `0.75`. Specify the amount of randomness used when generating triangles. You may set this higher than 1, but doing so may result in patterns that include \"gaps\" at the edges.\n\n**`seed`**\n\nString, defaults to `null`. Seeds the random number generator to create repeatable patterns. When set to null, the RNG will be seeded with random values from the environment. An example usage would be passing in blog post titles as the seed to generate unique but consistient trianglify patterns for every post on a blog site.\n\n**`xColors`**\n\nFalse, string, or array of CSS-formatted colors, default is `'random'`. Specify the color gradient used on the x axis.\n\nValid string values are 'random', or the name of a [colorbrewer palette](http://bl.ocks.org/mbostock/5577023) (i.e. 'YlGnBu' or 'RdBu'). When set to 'random', a gradient will be randomly selected from the colorbrewer library.\n\nValid array values should specify the color stops in any CSS format (i.e. `['#000000', '#4CAFE8', '#FFFFFF']`).\n\n**`yColors`**\n\nFalse, string or array of CSS-formatted colors, default is `'match'`. When set to 'match' the x-axis color gradient will be used on both axes. Otherwise, accepts the same options as xColors.\n\n**`palette`**\n\nThe array of color combinations to pick from when using `random` for the xColors or yColors. See [`src/utils/colorbrewer.js`](./src/utils/colorbrewer.js) for the format of this data.\n\n**`colorSpace`**\n\nString, defaults to `'lab'`. Set the color space used for generating gradients. Supported values are rgb, hsv, hsl, hsi, lab and hcl. See this [blog post](https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) for some background on why this matters.\n\n**`colorFunction`**\n\nSpecify a custom function for coloring triangles, defaults to `null`. Accepts a function to override the standard gradient coloring, which is passed a variety of data about the pattern and each polygon and must return a Chroma.js color object.\n\nSee [`examples/color-function-example.html`](./examples/color-function-example.html) and [`utils/colorFunctions.js`](./utils/colorFunctions.js) for more information about the built-in color functions, and how to write custom color functions.\n\n**`fill`**\n\nBoolean, defaults to `true`. Specifies whether the polygons generated by Trianglify should be filled in.\n\n**`strokeWidth`**\n\nNumber, defaults to 0. Specify the width of the strokes used to outline the polygons. This can be used in conjunction with `fill: false` to generate weblike patterns.\n\n**`points`**\n\nArray of points ([x, y]) to triangulate, defaults to null. When not specified an array randomised points is generated filling the space. Points must be within the coordinate space defined by `width` and `height`. See [`examples/custom-points-example.html`](./examples/custom-points-example.html) for a demonstration of how this option can be used to generate circular trianglify patterns.\n","maintainers":[{"name":"qrohlf","email":"qr@qrohlf.com"}],"time":{"modified":"2022-06-27T21:13:49.288Z","created":"2014-04-15T14:55:54.508Z","0.0.1":"2014-04-15T14:55:54.508Z","0.1.0":"2014-04-15T22:45:54.570Z","0.1.1":"2014-04-16T14:17:27.421Z","0.1.2":"2014-04-29T17:31:28.957Z","0.1.3":"2014-07-24T13:22:08.859Z","0.1.4":"2014-08-31T16:40:44.705Z","0.1.5":"2014-10-12T05:05:58.919Z","0.2.0":"2015-04-06T20:17:57.600Z","0.2.1":"2015-04-15T16:45:06.485Z","0.3.0":"2015-07-02T02:26:28.220Z","0.3.1":"2015-07-26T15:41:08.591Z","0.4.0":"2015-11-05T14:34:46.177Z","1.0.0":"2016-08-03T16:40:15.701Z","1.0.1":"2016-08-09T17:05:18.688Z","1.1.0":"2017-08-15T16:33:13.060Z","1.2.0":"2017-10-26T23:40:37.925Z","1.3.0":"2018-12-30T18:04:29.901Z","2.0.0":"2018-12-30T18:38:28.274Z","2.0.0-alpha.1":"2019-07-01T23:40:49.865Z","2.0.0-alpha.2":"2019-07-01T23:46:58.500Z","3.0.0":"2020-04-02T16:49:10.353Z","4.0.0-next.0":"2020-05-08T18:57:19.572Z","4.0.0-next.1":"2020-05-08T18:58:26.023Z","4.0.0-next.2":"2020-05-13T15:32:07.606Z","4.0.0-next.3":"2020-05-13T16:30:06.811Z","4.0.0-next.4":"2020-05-13T16:35:10.004Z","4.0.0-next.5":"2020-05-25T03:07:57.114Z","4.0.0":"2020-05-25T15:05:52.935Z","4.1.0-beta":"2020-10-26T22:44:11.745Z","4.1.0":"2020-11-01T18:53:22.841Z","4.1.1":"2020-11-01T18:54:51.798Z"},"homepage":"https://github.com/qrohlf/trianglify","keywords":["svg","canvas","visualization","pattern","lowpoly"],"repository":{"type":"git","url":"git://github.com/qrohlf/trianglify.git"},"author":{"name":"Quinn Rohlf","email":"qr@qrohlf.com"},"bugs":{"url":"https://github.com/qrohlf/trianglify/issues"},"license":"GPL-3.0","readmeFilename":"Readme.md","users":{"rafszul":true,"epickris":true,"huangkai":true,"nano":true,"autrearium":true,"mannieschumpert":true,"thetimmaeh":true}}