3 ms·
One thing I'd love to see is whether bundlers can "statically compile" the TSL nodes via constant propagation into a single template literal.
by 10000truths 2y ago
One thing I'd love to see is whether bundlers can "statically compile" the TSL nodes via constant propagation into a single template literal.
- esperent 2y agoThis is the kind of thing the three.js team spend a lot of time discussing and working towards (far too much time in my opinion, I'd much rather the effort was spent on improving the ecosystem, although thankfully the poimandres collective jumped into to fill the gap, for React at least) so I'd say it's reasonably likely.
- chii 2y agoI wonder if it's possible to have a typescript library for making these shaders at the type level, such that at compile time, each variation of the shader can be generated as a static constant string with at most a finite number of concatenations etc.