three.js r72 released
change log: https://github.com/mrdoob/three.js/releases/tag/r72
After 6 months and 1678 commits later we're finally done.
When I started building the library I quickly found myself having to decide between features or control. I opted for features as WebGL had landed and we would benefit a lot from supporting as many features as possible, even if I didn't understood the code being added.
For a while that approach went well until two years ago, when the WebGLRenderer
maintainer moved on as all the features had been added. Since then we've tried to move wires inside a piece of code that was out of our control but the wires were getting more and more entangled.
Last April I decided to hold features and releases for a bit and rework the renderer.https://twitter.com/mrdoob/status/584113627080347648
The main issue was that the renderer had two code paths, one for Geometry
and another for BufferGeometry
. Many features had to be implemented twice. Not only that, but the renderer was converting Geometry
to its own internal geometry structure which was a bit like BufferGeometry
The first step was removing all the Geometry
code path. Now WebGLRenderer
converts all the Geometry
using the fromGeometry()
method in BufferGeometry
. Then we proceeded by re-implementing everything step by step... MorphTargets
, ... and well, seems like it took a while 😅
All this work should be pretty transparent for the user but, if someone now wants to implement a feature in WebGLRenderer
, the code is now much more clean! Instead of a single file of thousands of lines we now have 13 different files of few hundred lines each. However, we're not done refactoring. We still have to move the textures and render targets code out, but we'll get there...
Features did not stop coming though! The phong shading code has been optimised, the editor can now store textures and has a great glsl editor, we have a MD2Loader
, a SEA3DLoader
, intersected uv, better WebVR support, ... Yet, the minified gzipped library still fits in 100kb! 😁
Now that all the refactor has been done, I'm hoping to be back to 1 month release cycles. I say that every release though...
As always, this wouldn't be possible without all the kind people that are helping out. So many many thanks to all the contributors!
PS: Change logs for r71 and r70 are also available now:https://github.com/mrdoob/three.js/releases/tag/r71https://github.com/mrdoob/three.js/releases/tag/r70