{"_id":"@basementuniverse/canvas-helpers","_rev":"11-fda3f2fe67c54aab32f61ac32341fb36","name":"@basementuniverse/canvas-helpers","dist-tags":{"latest":"1.7.0"},"versions":{"1.0.0":{"name":"@basementuniverse/canvas-helpers","version":"1.0.0","author":{"url":"https://gordonlarrigan.com","name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com"},"license":"MIT","_id":"@basementuniverse/canvas-helpers@1.0.0","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"dist":{"shasum":"12719c5ae734ae157944880dd4460e23616755e9","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.0.0.tgz","fileCount":9,"integrity":"sha512-9286PBtJTSFF6G/zedmojzsg0W/n7fcezgCRBEvJ6tSCcc0nw2WNUfpLAXmoiv6KFgNNzn2ZbLM55p/84jFpFg==","signatures":[{"sig":"MEYCIQC0wj5gnnPOpmziZ0gf2Z2+ng6Hlv0eKgV/IbNaqC+GMQIhAIftWwlTW7hewvlS8TM8gSrSqKV37EyLE6Kd2GrkqAdQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":114918},"main":"build/index.js","types":"build/index.d.ts","gitHead":"e3bb4de6270c14b3ef9fcf90a7f52f501ef2ed01","scripts":{"build":"webpack"},"_npmUser":{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"},"repository":{"url":"git+https://github.com/basementuniverse/canvas-helpers.git","type":"git"},"_npmVersion":"10.8.2","description":"A collection of helpers for working with HTML5 canvas","directories":{},"_nodeVersion":"20.18.3","dependencies":{"@basementuniverse/vec":"^2.3.3","@basementuniverse/utils":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.3.2","ts-loader":"^8.0.7","typescript":"^5.8.3","@types/node":"^18.11.12","webpack-cli":"^4.1.0","clean-webpack-plugin":"^4.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/canvas-helpers_1.0.0_1749684862613_0.6039725637755919","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@basementuniverse/canvas-helpers","version":"1.1.0","author":{"url":"https://gordonlarrigan.com","name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com"},"license":"MIT","_id":"@basementuniverse/canvas-helpers@1.1.0","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"dist":{"shasum":"dab35192788faf5074b6e7c338aec439492fa1bd","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.1.0.tgz","fileCount":9,"integrity":"sha512-AYzW2YfNIHKCGHQCKT+Ki3IrHUxRPt9PiBxCx9TKAZSfsv11dH9X28nQ/BoSU+NMT2xsNE8Xqy5h/dGd2zLORA==","signatures":[{"sig":"MEUCIBaMh8dLUhoZxD7gczuzYcOq25aFjJW3tp1xl/17VqWQAiEA/Akk3IjbwUxHjR3/obhO5RM8Q3YBFWa68NjHus/21Iw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":115972},"main":"build/index.js","types":"build/index.d.ts","gitHead":"f02423c098c253a799ca624ba77f1494fef3464c","scripts":{"build":"webpack"},"_npmUser":{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"},"repository":{"url":"git+https://github.com/basementuniverse/canvas-helpers.git","type":"git"},"_npmVersion":"10.8.2","description":"A collection of helpers for working with HTML5 canvas","directories":{},"_nodeVersion":"20.18.3","dependencies":{"@basementuniverse/vec":"^2.3.3","@basementuniverse/utils":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.3.2","ts-loader":"^8.0.7","typescript":"^5.8.3","@types/node":"^18.11.12","webpack-cli":"^4.1.0","clean-webpack-plugin":"^4.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/canvas-helpers_1.1.0_1749764717518_0.9917567848307525","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@basementuniverse/canvas-helpers","version":"1.2.0","author":{"url":"https://gordonlarrigan.com","name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com"},"license":"MIT","_id":"@basementuniverse/canvas-helpers@1.2.0","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"dist":{"shasum":"2f5453e0d7043bcfcb60777288b0fc4064304806","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.2.0.tgz","fileCount":9,"integrity":"sha512-M2s8bNzOHSf/TD7OkfTn08RJ+gn7h7Sh6muh+taiY07K74Syep9Ih6YxIdDoV47yO3BfexGg48TYzKs36WmkAA==","signatures":[{"sig":"MEUCIFkk0AFCVnRdS2ITbdj4iUrOlwKbjum7W1TdXrkOjThHAiEAzBFEXo/XAkylXi2JN/HTl3xK/2ho90alHdPDmGNKRAg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116189},"main":"build/index.js","types":"build/index.d.ts","gitHead":"6d212eab9b83abb47000c0fd597d1f540418ed15","scripts":{"build":"webpack"},"_npmUser":{"name":"basementuniverse","actor":{"name":"basementuniverse","type":"user","email":"gordonlarrigan@gmail.com"},"email":"gordonlarrigan@gmail.com"},"repository":{"url":"git+https://github.com/basementuniverse/canvas-helpers.git","type":"git"},"_npmVersion":"10.8.2","description":"A collection of helpers for working with HTML5 canvas","directories":{},"_nodeVersion":"20.18.3","dependencies":{"@basementuniverse/vec":"^2.3.3","@basementuniverse/utils":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.3.2","ts-loader":"^8.0.7","typescript":"^5.8.3","@types/node":"^18.11.12","webpack-cli":"^4.1.0","clean-webpack-plugin":"^4.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/canvas-helpers_1.2.0_1751050123361_0.8352296168296189","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@basementuniverse/canvas-helpers","version":"1.2.1","author":{"url":"https://gordonlarrigan.com","name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com"},"license":"MIT","_id":"@basementuniverse/canvas-helpers@1.2.1","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"dist":{"shasum":"f9436a5c3144b0b5d32d11d8cae18a9fc4ef59f0","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.2.1.tgz","fileCount":9,"integrity":"sha512-Ra5SH8vk7zA8cwTdgaPqzZPLods6tm2d7DvpdL+IDgSLuEl1/JTzkXPR0aLfkZ0UU8YIrscMUsUUvGnO5cGXHg==","signatures":[{"sig":"MEYCIQDe/pw2axMTpWx69g3rYC3fB4hjT8pFUV2LNaTbUf9frgIhAOIaZ568rS5Q9RkWGYTpsV6e8eT3oCr1BycwoRd0qdBf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116189},"main":"build/index.js","types":"build/index.d.ts","gitHead":"8677298484c1df67c75c000164221068bda63dab","scripts":{"build":"webpack"},"_npmUser":{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"},"repository":{"url":"git+https://github.com/basementuniverse/canvas-helpers.git","type":"git"},"_npmVersion":"10.8.2","description":"A collection of helpers for working with HTML5 canvas","directories":{},"_nodeVersion":"20.18.3","dependencies":{"@basementuniverse/vec":"^2.3.3","@basementuniverse/utils":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.3.2","ts-loader":"^8.0.7","typescript":"^5.8.3","@types/node":"^18.11.12","webpack-cli":"^4.1.0","clean-webpack-plugin":"^4.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/canvas-helpers_1.2.1_1752216733897_0.678635119815427","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@basementuniverse/canvas-helpers","version":"1.3.0","author":{"url":"https://gordonlarrigan.com","name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com"},"license":"MIT","_id":"@basementuniverse/canvas-helpers@1.3.0","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"dist":{"shasum":"200a41fd859b07564e175fae0a5ed54075a0cd69","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.3.0.tgz","fileCount":10,"integrity":"sha512-l/m5lM/aYnWrk7Bo7oSyiZ0wsIoAMJRdnV7+EgUFRCzG7WYkSrUDZjbFGYBLepEAql9FtM9ML4jva93hQRcPKQ==","signatures":[{"sig":"MEUCIQDrAzElGuJLBXiGdXKAwOIaP8Ll5FTIX0DRzz+5oHR04gIgJyWkTF58xLjVWGgLTNiEewhpQvVomp5Oo6Hoeo1WpdU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":138216},"main":"build/index.js","types":"build/index.d.ts","gitHead":"6912e5d6ed08f3f1fce5e331bf39bb9d86df2ad0","scripts":{"build":"webpack"},"_npmUser":{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"},"repository":{"url":"git+https://github.com/basementuniverse/canvas-helpers.git","type":"git"},"_npmVersion":"11.5.1","description":"A collection of helpers for working with HTML5 canvas","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@basementuniverse/vec":"^2.3.3","@basementuniverse/utils":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.3.2","ts-loader":"^8.0.7","typescript":"^5.8.3","@types/node":"^18.11.12","webpack-cli":"^4.1.0","clean-webpack-plugin":"^4.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/canvas-helpers_1.3.0_1757144714964_0.41535579976546444","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@basementuniverse/canvas-helpers","version":"1.4.0","author":{"url":"https://gordonlarrigan.com","name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com"},"license":"MIT","_id":"@basementuniverse/canvas-helpers@1.4.0","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"dist":{"shasum":"2106fe29c934ecdd1b72ed4ac342381e869c9f57","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.4.0.tgz","fileCount":10,"integrity":"sha512-kIIHf35gafJkdIxCMkP9c1jgVW389iFUux9uKm4ATWtGH8g/EqZYI2evuIt7Wz0sPBQ8SU33+iFO2UJ/lvPk0Q==","signatures":[{"sig":"MEUCIQDk+sRoQn1C8NRtUVLCIdBaggV5w/8uo0CSS+Bl0vxEAAIgQCGK75fVMwtSfXxO0fDP+Q5hpf43KuNzIbIwxTEup0U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":139924},"main":"build/index.js","types":"build/index.d.ts","gitHead":"f83c3b33819ad6e4a62d301f57253b9c557766c8","scripts":{"build":"webpack"},"_npmUser":{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"},"repository":{"url":"git+https://github.com/basementuniverse/canvas-helpers.git","type":"git"},"_npmVersion":"11.5.1","description":"A collection of helpers for working with HTML5 canvas","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@basementuniverse/vec":"^2.3.3","@basementuniverse/utils":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.3.2","ts-loader":"^8.0.7","typescript":"^5.8.3","@types/node":"^18.11.12","webpack-cli":"^4.1.0","clean-webpack-plugin":"^4.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/canvas-helpers_1.4.0_1757149127048_0.14942333748235082","host":"s3://npm-registry-packages-npm-production"}},"1.4.1":{"name":"@basementuniverse/canvas-helpers","version":"1.4.1","author":{"url":"https://gordonlarrigan.com","name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com"},"license":"MIT","_id":"@basementuniverse/canvas-helpers@1.4.1","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"dist":{"shasum":"c22850e508bf19022fccaf0f51493bedaa8f4780","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.4.1.tgz","fileCount":10,"integrity":"sha512-BRpsrh0fr45f5AUO8W7Zh0oxnpLy2wQCWHoqzDFhA5PU0OXlfuHNKSDzTmmp2cWgGCfzLt/QWKL2KM+eyU1iGQ==","signatures":[{"sig":"MEQCIF3vKdZiCIvb3fkT+z8xJwtcjHGq3o6xSdXIEPI5WxMQAiB62F+juyBApoUudP6DxqXD0rpq9P/SbweTPqy2z+TezQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140864},"main":"build/index.js","types":"build/index.d.ts","gitHead":"3262e7be5e0b8f20ccaaaf397e136042c86c54f1","scripts":{"build":"webpack"},"_npmUser":{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"},"repository":{"url":"git+https://github.com/basementuniverse/canvas-helpers.git","type":"git"},"_npmVersion":"11.5.1","description":"A collection of helpers for working with HTML5 canvas","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@basementuniverse/vec":"^2.3.3","@basementuniverse/utils":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.3.2","ts-loader":"^8.0.7","typescript":"^5.8.3","@types/node":"^18.11.12","webpack-cli":"^4.1.0","clean-webpack-plugin":"^4.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/canvas-helpers_1.4.1_1757591155190_0.25122958244748284","host":"s3://npm-registry-packages-npm-production"}},"1.4.2":{"name":"@basementuniverse/canvas-helpers","version":"1.4.2","author":{"url":"https://gordonlarrigan.com","name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com"},"license":"MIT","_id":"@basementuniverse/canvas-helpers@1.4.2","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"dist":{"shasum":"c32061ea7ff366aa8f1ef1e5d8e7dda59cf6effb","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.4.2.tgz","fileCount":10,"integrity":"sha512-WnOTlz8KieEm94QmYchafobWu4QKBrboAVl6PrCOpcREhk86sLdxaOsgUmm/tgTIXQjJE5NZ5lKTKRzeMby7hg==","signatures":[{"sig":"MEUCIE4cSfLZ2zYHk6SkmjKLSQqp+ztcSahGPqLcgcn0CLh2AiEAjsYCZP8IOS8mzsoFCCFDHkllj572Dkqde7D5j3WYFl0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":143029},"main":"build/index.js","types":"build/index.d.ts","gitHead":"7e35bdc8a75f923485cb79fac2c20796e52a235f","scripts":{"build":"webpack"},"_npmUser":{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"},"repository":{"url":"git+https://github.com/basementuniverse/canvas-helpers.git","type":"git"},"_npmVersion":"11.5.1","description":"A collection of helpers for working with HTML5 canvas","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@basementuniverse/vec":"^2.3.3","@basementuniverse/utils":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.3.2","ts-loader":"^8.0.7","typescript":"^5.8.3","@types/node":"^18.11.12","webpack-cli":"^4.1.0","clean-webpack-plugin":"^4.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/canvas-helpers_1.4.2_1757592631949_0.9429493308795049","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@basementuniverse/canvas-helpers","version":"1.5.0","author":{"url":"https://gordonlarrigan.com","name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com"},"license":"MIT","_id":"@basementuniverse/canvas-helpers@1.5.0","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"dist":{"shasum":"a1b2d1e75b2ad13923387b8401106cd49065e9e8","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.5.0.tgz","fileCount":10,"integrity":"sha512-PEdcMnJe/ryb9lPnTwkuJK6sRREaD+5bRTPSlU7hdbbpD02unc9xr/+T1odVh7V5i/9Z2vyfP398tXiMkl52Aw==","signatures":[{"sig":"MEYCIQDCqPm75ztJC6oeHunpDTUoF3cb1ydGUv2xBCXBuNzdbwIhAM7zGeqh7Wgh8bzHp5aCr2Ww9767HorghKCBLobodtRf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":146808},"main":"build/index.js","types":"build/index.d.ts","gitHead":"38da60d4c9b73ff781ea52b3c4df80461bfb01ca","scripts":{"build":"webpack"},"_npmUser":{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"},"repository":{"url":"git+https://github.com/basementuniverse/canvas-helpers.git","type":"git"},"_npmVersion":"11.5.1","description":"A collection of helpers for working with HTML5 canvas","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@basementuniverse/vec":"^2.3.3","@basementuniverse/utils":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.3.2","ts-loader":"^8.0.7","typescript":"^5.8.3","@types/node":"^18.11.12","webpack-cli":"^4.1.0","clean-webpack-plugin":"^4.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/canvas-helpers_1.5.0_1760131497441_0.9890059200061854","host":"s3://npm-registry-packages-npm-production"}},"1.6.0":{"name":"@basementuniverse/canvas-helpers","version":"1.6.0","author":{"url":"https://gordonlarrigan.com","name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com"},"license":"MIT","_id":"@basementuniverse/canvas-helpers@1.6.0","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"dist":{"shasum":"99f583507068c98212c1c33758b97a573460bdd3","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.6.0.tgz","fileCount":10,"integrity":"sha512-Swis4+WrHSKIEjIo/NQVeWghrjRnY1KgwB2dxid6siaF/iZtzh07b2FYejSi3fRCOjAjbD+2CdzBNaskaRU/zg==","signatures":[{"sig":"MEYCIQDba7HPXYoEpAS7ZkLCfM0pN9SoNUmkX8GUCM6muJ+x+gIhAMkiXJngAUgb6nmWgnsUJvRIyBdqUxemdDlqJLdNr1CN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":152519},"main":"build/index.js","types":"build/index.d.ts","gitHead":"92c0e753e6a8ed51b2259be50583560bf088ed5b","scripts":{"build":"webpack"},"_npmUser":{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"},"repository":{"url":"git+https://github.com/basementuniverse/canvas-helpers.git","type":"git"},"_npmVersion":"11.5.1","description":"A collection of helpers for working with HTML5 canvas","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@basementuniverse/vec":"^2.3.3","@basementuniverse/utils":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.3.2","ts-loader":"^8.0.7","typescript":"^5.8.3","@types/node":"^18.11.12","webpack-cli":"^4.1.0","clean-webpack-plugin":"^4.0.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/canvas-helpers_1.6.0_1761065186079_0.7535768580560207","host":"s3://npm-registry-packages-npm-production"}},"1.7.0":{"name":"@basementuniverse/canvas-helpers","version":"1.7.0","description":"A collection of helpers for working with HTML5 canvas","main":"build/index.js","types":"build/index.d.ts","scripts":{"build":"webpack --mode production","build:dev":"webpack --mode development"},"author":{"name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com","url":"https://gordonlarrigan.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/basementuniverse/canvas-helpers.git"},"dependencies":{"@basementuniverse/color":"^1.6.1","@basementuniverse/utils":"^1.8.1","@basementuniverse/vec":"^2.5.1"},"devDependencies":{"@types/node":"^18.11.12","clean-webpack-plugin":"^4.0.0-alpha.0","ts-loader":"^8.0.7","typescript":"^5.8.3","webpack":"^5.3.2","webpack-cli":"^4.1.0"},"gitHead":"297a54affb42435fb38ef996f16877398ca6bf58","_id":"@basementuniverse/canvas-helpers@1.7.0","bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"homepage":"https://github.com/basementuniverse/canvas-helpers#readme","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-FgPNc3TvB7lZC7F1/U/5FbIYm0pNkzqmWiURonPIjPa7TXxLYRK1+tpmTj6udoN9Pr4KwIKYJfj9mAeZYznZuw==","shasum":"b7d6ef6335849ea4697a561ce06f52cab8ed794c","tarball":"https://registry.npmjs.org/@basementuniverse/canvas-helpers/-/canvas-helpers-1.7.0.tgz","fileCount":16,"unpackedSize":122310,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDY1hVO1hXSGc9hspf0A7tjpMRQ5Px+kPGJQ/zF+BoRDAiEA7bZKjzXeKpLTqo+Vw1tV9Q72Spyze7ZRAaYj2zdcwPs="}]},"_npmUser":{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"},"directories":{},"maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/canvas-helpers_1.7.0_1787512423933_0.5031961270207357"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-11T23:34:22.520Z","modified":"2026-08-23T19:13:44.251Z","1.0.0":"2025-06-11T23:34:22.830Z","1.1.0":"2025-06-12T21:45:17.761Z","1.2.0":"2025-06-27T18:48:43.554Z","1.2.1":"2025-07-11T06:52:14.066Z","1.3.0":"2025-09-06T07:45:15.151Z","1.4.0":"2025-09-06T08:58:47.277Z","1.4.1":"2025-09-11T11:45:55.390Z","1.4.2":"2025-09-11T12:10:32.115Z","1.5.0":"2025-10-10T21:24:57.621Z","1.6.0":"2025-10-21T16:46:26.273Z","1.7.0":"2026-08-23T19:13:44.101Z"},"bugs":{"url":"https://github.com/basementuniverse/canvas-helpers/issues"},"author":{"name":"Gordon Larrigan","email":"gordonlarrigan@gmail.com","url":"https://gordonlarrigan.com"},"license":"MIT","homepage":"https://github.com/basementuniverse/canvas-helpers#readme","repository":{"type":"git","url":"git+https://github.com/basementuniverse/canvas-helpers.git"},"description":"A collection of helpers for working with HTML5 canvas","maintainers":[{"name":"basementuniverse","email":"gordonlarrigan@gmail.com"}],"readme":"# Canvas Helpers\n\nThis is a collection of helper functions for drawing on an HTML5 Canvas.\n\nIt's an unopinionated library that aims to reduce the amount of repetitive boilerplate in your rendering code. It doesn't wrap the entire Canvas API, and mostly everything is optional, so you can always fall back to native Canvas code when necessary.\n\n![Preview](preview.png)\n\n## Installation\n\n```bash\nnpm install @basementuniverse/canvas-helpers\n```\n\nFor direct browser usage, include the UMD build with a script tag:\n\n```html\n<script src=\"build/index.js\"></script>\n<script>\n  const lineCanvasHelper = BasementUniverseCanvasHelpers.line;\n</script>\n```\n\nThe build exposes its exports through the `BasementUniverseCanvasHelpers` browser namespace. It does not add each export directly to `window`.\n\n## Functions\n\n### `withContext`\n\n```ts\n/**\n * Pass in a context and some number of functions that take a context as their\n * first argument, and return an array of functions that don't require the\n * context argument\n *\n * If only one function is passed, this will return a single function\n */\nfunction withContext(\n  context: CanvasRenderingContext2D,\n  ...functions: ((context: CanvasRenderingContext2D, ...args: any[]) => void)[]\n): ((...args: any[]) => void) | ((...args: any[]) => void)[];\n```\n\nExample:\n\n```ts\nimport {\n  withContext,\n  line,\n  rect,\n  circle,\n} from '@basementuniverse/canvas-helpers';\n\nconst canvas = document.createElement('canvas');\nconst context = canvas.getContext('2d');\n\nconst [\n  lineWithContext,\n  rectWithContext,\n] = withContext(context, [line, rect]);\n\nconst circleWithContext = withContext(context, circle);\n\n// These functions can now be called without the context argument...\nlineWithContext([10, 10], [100, 100]);\n```\n\n### `line`\n\n```ts\n/**\n * Draw a straight line segment between two points\n */\nfunction line(\n  context: CanvasRenderingContext2D,\n  start: vec2,\n  end: vec2,\n  style?: Partial<StyleOptions>\n): void;\n```\n\n### `cross`\n\n```ts\n/**\n * Draw a cross at a given position with a specified size\n */\nfunction cross(\n  context: CanvasRenderingContext2D,\n  position: vec2,\n  size: number,\n  style?: Partial<StyleOptions>\n): void;\n```\n\n### `arrow`\n\n```ts\n/**\n * Draw an arrow from a start point to an end point with an optional arrowhead\n * at the end\n *\n * This function does not support batch drawing since it requires\n * beginning a new path for the arrowhead\n */\nfunction arrow(\n  context: CanvasRenderingContext2D,\n  start: vec2,\n  end: vec2,\n  style?: Partial<StyleOptions>\n): void;\n```\n\n### `circle`\n\n```ts\n/**\n * Draw a circle at a specified center point with a given radius\n */\nfunction circle(\n  context: CanvasRenderingContext2D,\n  center: vec2,\n  radius: number,\n  style?: Partial<StyleOptions>\n): void;\n```\n\n### `rectangle`\n\n```ts\n/**\n * Draw a rectangle at a specified position with a given size\n */\nfunction rectangle(\n  context: CanvasRenderingContext2D,\n  position: vec2,\n  size: vec2,\n  style?: Partial<StyleOptions>\n): void;\n```\n\n### `polygon`\n\n```ts\n/**\n * Draw a polygon defined by an array of vertices\n */\nfunction polygon(\n  context: CanvasRenderingContext2D,\n  vertices: vec2[],\n  style?: Partial<StyleOptions>\n): void;\n```\n\n### `path`\n\n```ts\n/**\n * Draw a path defined by an array of vertices\n */\nfunction path(\n  context: CanvasRenderingContext2D,\n  vertices: vec2[],\n  style?: Partial<StyleOptions>\n): void;\n```\n\n### `grid`\n\n```ts\n/**\n * Draw a grid of lines within a specified rectangular area\n */\nfunction grid(\n  context: CanvasRenderingContext2D,\n  position: vec2,\n  size: vec2,\n  style?: Partial<StyleOptions>\n): void;\n```\n\nExample:\n\n```ts\n// Draw a square grid with 20x20 pixel cells\ngrid(context, { x: 10, y: 10 }, { x: 200, y: 150 }, {\n  strokeColor: 'gray',\n  lineWidth: 1,\n  grid: {\n    cellSize: 20\n  }\n});\n\n// Draw a rectangular grid with different cell dimensions\ngrid(context, { x: 250, y: 10 }, { x: 200, y: 150 }, {\n  strokeColor: 'blue',\n  lineStyle: 'dashed',\n  grid: {\n    cellSize: { x: 30, y: 25 }\n  }\n});\n```\n\n### `image`\n\n```ts\n/**\n * Draw an image at a specified position, optionally scaling it to fit within\n * a given rectangle\n */\nexport function image(\n  context: CanvasRenderingContext2D,\n  image: CanvasImageSource,\n  position: vec2,\n  size?: vec2,\n  style?: Partial<StyleOptions>\n): void;\n```\n\n**Performance Note**: When using pattern `repeatMode` options, patterns are automatically cached for better performance. The same pattern will be reused for subsequent calls with the same image and repeat mode, avoiding the overhead of recreating canvas patterns each frame.\n\n### `clearPatternCache`\n\n```ts\n/**\n * Clear the pattern cache for a specific image, or clear the entire cache\n * if no image is specified. Useful for memory management.\n */\nexport function clearPatternCache(image?: CanvasImageSource): void;\n```\n\nUse this function to manually clear cached patterns when images are no longer needed, helping with memory management in long-running applications.\n\n## Types\n\n```ts\ntype Color = {\n  r: number;\n  g: number;\n  b: number;\n  a?: number;\n};\n\ntype StyleOptions = {\n  /**\n   * If set to true, don't begin a new path before drawing\n   *\n   * This allows for batch-drawing multiple shapes with a single path\n   */\n  batch?: boolean;\n\n  /**\n   * Whether to fill shapes with color\n   */\n  fill: boolean;\n\n  /**\n   * The color to use for filling shapes\n   *\n   * If null, don't set the fillStyle (we assume it has been set elsewhere)\n   */\n  fillColor: Color | string | null;\n\n  /**\n   * The gradient to use for filling shapes, if any\n   */\n  gradient: {\n    /**\n     * The type of gradient to create\n     * - 'linear' for a linear gradient\n     * - 'radial' for a radial gradient\n     */\n    type: 'linear' | 'radial';\n\n    /**\n     * The starting point of the gradient, as a vector { x, y }\n     * For radial gradients, this is the center point\n     */\n    start: vec2;\n\n    /**\n     * The ending point of the gradient, as a vector { x, y }\n     */\n    end: vec2;\n\n    /**\n     * An array of color stops defining the gradient\n     */\n    colorStops: {\n      /**\n       * The color at this stop\n       */\n      color: Color | string;\n\n      /**\n       * The position of the color stop, from 0 to 1\n       */\n      position: number;\n    }[];\n  } | null;\n\n  /**\n   * Whether to stroke shapes with lines\n   */\n  stroke: boolean;\n\n  /**\n   * The color to use for drawing lines\n   *\n   * If null, don't set the strokeStyle (we assume it has been set elsewhere)\n   */\n  strokeColor: Color | string | null;\n\n  /**\n   * The width of the lines\n   *\n   * If null, don't set the lineWidth (we assume it has been set elsewhere)\n   */\n  lineWidth: number | null;\n\n  /**\n   * The style of the line (e.g., solid, dashed)\n   */\n  lineStyle: 'solid' | 'dashed' | 'dotted';\n\n  /**\n   * The dash pattern for dashed lines, if applicable\n   * An array of numbers specifying the lengths of dashes and gaps\n   *\n   * If null, don't set the lineDash (we assume it has been set elsewhere)\n   */\n  lineDash: number[] | null;\n\n  /**\n   * The type of cross to draw\n   */\n  crossStyle?: '+' | 'x';\n\n  /**\n   * If true, round the corners of rectangles\n   */\n  rounded?: boolean;\n\n  /**\n   * The radius to use for rounding corners in rectangles\n   *\n   * This is only used if `rounded` is true\n   */\n  borderRadius?: number;\n\n  /**\n   * Options for drawing arrowheads at the end of arrows\n   */\n  arrow?: {\n    /**\n     * The type of arrowhead to draw at the end of the line\n     *\n     * This can be a predefined type, or a function for drawing custom arrowheads\n     */\n    type:\n      | 'caret' // Triangle pointing in the direction of the line\n      | 'chevron' // V-shaped arrowhead\n      | ((context: CanvasRenderingContext2D, ...args: any[]) => void);\n\n    /**\n     * The size of the arrowhead in pixels\n     */\n    size: number;\n  } | null;\n\n  /**\n   * When stroking a path, the type of interpolation to use for curves\n   */\n  pathType?: 'linear' | 'bezier' | 'catmull-rom';\n\n  /**\n   * If using bezier curves, the order of the bezier path\n   *\n   * This determines how many control points are used for the bezier curve\n   *\n   * For example:\n   * - 1: Linear (no control points, same as 'linear' pathType)\n   * - 2: Quadratic bezier (1 control point)\n   * - 3: Cubic bezier (2 control points)\n   * - etc.\n   */\n  bezierOrder?: number;\n\n  /**\n   * If using catmull-rom curves, the tension parameter for the curve\n   * - 0.0: Uniform spline (smoothest)\n   * - 0.5: Centripetal spline (good for avoiding loops)\n   * - 1.0: Chordal spline (more angular)\n   */\n  catmullRomTension?: number;\n\n  /**\n   * When drawing rectangles, which point the position refers to\n   *\n   * Default is 'top-left'\n   */\n  rectangleAnchor?:\n    | 'top-left'\n    | 'top-center'\n    | 'top-right'\n    | 'center-left'\n    | 'center'\n    | 'center-right'\n    | 'bottom-left'\n    | 'bottom-center'\n    | 'bottom-right';\n\n  /**\n   * Options for drawing images\n   */\n  image?: {\n    /**\n     * How to scale the image to fit the specified rectangle\n     *\n     * If a rectangle size is not specified, we draw the image at its natural\n     * size (same as 'center' mode)\n     *\n     * - 'center': Draw the image at its natural size, centered in the rectangle\n     * - 'stretch': Stretch the image to fill the entire rectangle (may distort)\n     * - 'contain': Scale the image to fit entirely within the rectangle,\n     *   preserving aspect ratio\n     * - 'fit-x': Scale the image to fit the width of the rectangle,\n     *   preserving aspect ratio (the image might overflow the rectangle height)\n     * - 'fit-y': Scale the image to fit the height of the rectangle,\n     *   preserving aspect ratio (the image might overflow the rectangle width)\n     */\n    fillMode?: 'center' | 'stretch' | 'contain' | 'fit-x' | 'fit-y';\n\n    /**\n     * If true, and the image is larger than the rectangle, clip the image to\n     * the bounds of the rectangle\n     *\n     * Ignored if a rectangle size is not specified\n     */\n    clip?: boolean;\n\n    /**\n     * How to repeat the image if the rectangle is larger than the image size\n     *\n     * Ignored if a rectangle size is not specified\n     */\n    repeatMode?:\n      | 'pattern'\n      | 'pattern-x'\n      | 'pattern-y'\n      | 'repeat'\n      | 'repeat-x'\n      | 'repeat-y'\n      | 'no-repeat';\n\n    /**\n     * The opacity of the image (0-1)\n     */\n    opacity?: number;\n\n    /**\n     * The scale to draw the image at (calculated after applying the fillMode)\n     *\n     * This can be a single number to scale uniformly, or a vec2 for\n     * non-uniform scaling\n     */\n    scale?: number | vec2;\n\n    /**\n     * Translation offset to apply when drawing the image\n     *\n     * This is calculated after applying the fillMode and scale\n     */\n    offset?: vec2;\n\n    /**\n     * If true, the offset is treated as relative to the rectangle size (e.g.\n     * an offset of { x: 0.5, y: 0.5 } moves the image down and right by half\n     * the rectangle's size)\n     */\n    offsetRelative?: boolean;\n  };\n\n  /**\n   * Options for drawing grids\n   */\n  grid?: {\n    /**\n     * The size of each grid cell\n     *\n     * This can be a single number for square cells, or a vec2 for\n     * rectangular cells\n     */\n    cellSize: number | vec2;\n  };\n};\n```\n","readmeFilename":"README.md"}