Karsten Schmidt<p>Just a quick <a href="https://mastodon.thi.ng/tags/ThingUmbrella" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ThingUmbrella</span></a> update to say that I've already replaced the <a href="https://thi.ng/vectors" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/vectors</span><span class="invisible"></span></a> package on the develop branch and after LOTS of deep experimentation have decided NOT to split up the package. There will be a few (minor) breaking changes, mainly because of enforcing more consistent naming and more granularity in some source files (therefore possibly changed imports, though only if you use direct ones for individual functions...). All in all, I've managed to keep the impact on users to a bare minimum (likely unnoticeable for most), even though it's pretty much a complete rewrite of the entire package (with all its ~900 functions)... This package is now almost 10 years old and I'm very happy how this refactor turned out!</p><p>In terms of file size impact: The FULL minified pkg bundle is now 56.4KB vs previously 48.5KB, however the code density has improved and the brotli-compressed pkg size is only 15.1KB (only 1KB larger than before), which I found absolutely incredible! 🎉 I also have to state once more that this package (and most others in <a href="https://mastodon.thi.ng/tags/ThingUmbrella" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ThingUmbrella</span></a>) are _designed for tree shaking_ and bundling. Hardly any project would ever use the full set of functions provided here all at once, most will only use a small/tiny subset...</p><p>Also — more importantly — many of the 185 example projects in the repo are now showing between 2-25% smaller final bundle sizes. Some also have become slightly larger, but so far I found the most by only ~2%...</p><p>Related to this change: I've also updated the <a href="https://thi.ng/color" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/color</span><span class="invisible"></span></a> & <a href="https://thi.ng/matrices" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/matrices</span><span class="invisible"></span></a> packages to be free from dynamic code generation now! The only packages still using `new Function(...)` are the following, but for those it's unavoidable and dynamic code generation is a core feature:</p><p>- <a href="https://thi.ng/pixel" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/pixel</span><span class="invisible"></span></a> (custom pixel format definition/compilation)<br>- <a href="https://thi.ng/pixel-convolve" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/pixel-convolve</span><span class="invisible"></span></a> (custom image convolution kernel compilation)<br>- <a href="https://thi.ng/shader-ast-js" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/shader-ast-js</span><span class="invisible"></span></a> (Shader AST to JavaScript compilation)</p><p>I will do more testing over the coming days, then release new version(s) ASAP...</p><p><a href="https://mastodon.thi.ng/tags/TypeScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TypeScript</span></a> <a href="https://mastodon.thi.ng/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.thi.ng/tags/CodeGeneration" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CodeGeneration</span></a> <a href="https://mastodon.thi.ng/tags/Vectors" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Vectors</span></a> <a href="https://mastodon.thi.ng/tags/OpenSource" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OpenSource</span></a></p>