Tree Shaking Three.js

it’s part of webglrenderer, deeply wired in, like pretty much everything else: https://github.com/mrdoob/three.js/blob/59861dee1614ae5d49913a098d068638941b5d23/src/renderers/WebGLRenderer.js tree-shaking won’t be a reality until this file is made from scratch it seems, apart from the other things like prototypes to classes etc. the shaders are referenced in it as well.

for projects that absolutely cannot afford the extra weight i go into this file and rip out the things that i dont need.

3 Likes