Found out that CrosseyedWebGLRenderer probably wouldn't work for target-less cameras.
Something weird going on with `webgl_scene_test.html` and `webgl_scene_test_blender.html`. For some reason cubes dissapear.
Should not refresh anything if material doesn't change for several objects in a row (in a single frame).
Hope this didn't break something, I remember this being tricky. Went through examples and they seem to work ok, gained some fps in performance test.
Also disabled sorting in depth-of-field example for some more fps gain.
Still didn't figure out the original reason for recent fps drop in performance / dof examples :/
- for shader reuse materials from the standard library are now identified just by shader name (MeshShaderMaterials still use full code)
- unique shader id strings are constructed via array.join instead of string plus
- uniform and attribute locations are now cached in buildProgram (biggest one)
Also some smaller optimizations and cleanups in DOF example.
It doesn't have effect there anyway as scene is rendered to FBO without multisampling.
Turning antialiasing off here didn't have much effect on performance though (unlike for particles).
Clearing API for rendering to RenderTarget is now flipped: before forced clearing of render target was default, now no clearing is default.
New way of doing things saves one extra duplicitous clear call when switching render targets (like when doing postprocessing).
(doing documentation is indeed turning out to be useful)
Went through all examples, all should work.
JSON files exported from Blender / converted from OBJ files still use underscored property names internally. I don't know, should these also be changed?
That was much tougher than expected. No wonder other WebGL video demos around the web are broken.
Firefox OpenGL / ANGLE and Chrome OpenGL were ok, getting it to work in Chrome ANGLE was rather tricky.
Please report if something got broken. I tried to go through all textured examples but I may have missed something.
If you want to refresh texture on WebGL side, you just set "texture.needsUpdate" flag (if you use Loader or ImageUtils.loadTexture / loadTextureCube everything is taken care of).
Flag has to be set also for canvas-based textures, sorry no escaping this :(. I tried and it lead to ugly problems (e.g. AO minecraft demo mixes several asynchronously loaded and generated images into one texture, with autodetect always something was broken).
"needsUpdate" should work also on cube textures, though it's not tested yet (also there I didn't put hack for Chrome ANGLE).
build/Three.js - Includes all renderers + extras
build/custom/ThreeCanvas.js - Canvas renderer only
build/custom/ThreeDOM.js - DOM renderer only
build/custom/ThreeSVG.js - SVG renderer only
build/custom/ThreeWebGL.js - WebGL renderer only
build/custom/ThreeExtras.js - Extras only
Moved `THREE.Detector.js` to `examples/js/Detector.js`.
Updated examples to reflect these changes.