<p dir="auto">In case of lightmaps, the engine assumes a secondary uv set was defined. In many cases, such as online configurators where users change only the color of the material, the lightmaps do share the same primary uv set. The engine should assume that if a lightmap is set, and if no secondary set is provided that it should use the primary buffer instead. Or internally duplicate the primary buffer to the secondary.<br>
This would prevent the necessity to provide twice the same data if exported from third party editors or code the above.</p>
<p dir="auto">I've noticed some duplication in renderer source (WebGLRenderer) as well as the fact that the whole thing is sparsely annotated and is several thousands lines long. Maybe pull it apart somewhat? Extract abstract classes or routines out of it perhaps? Extra documentation in code wouldn't go amiss either. I think for many people including myself, that chunk of code is fairly difficult to decipher. I know there is a handful of bugs in cascading shadow maps implementation for instance, but it doesn't look like it would be easy for someone unfamiliar with the whole 6.5k lines to identify the problem. If there was a distinct set of files dedicated to shadows - it would be a lower entry barrier. I think this is necessary for project's overall health.</p>