* Added `scene.ambientColor` and `Scene` now ignores `AmbientLights` (transferring hex for temporal backwards compatibility)
* CanvasRenderer and SVGRenderer using `scene.ambientColor`. Tried to update `WebGLRenderer` too, but the method in question doesn't seem to have access to the scene :S
* Removed `scene.origin` and updated examples that used it.
* Improved subdivision example
* Camera is now a base object. PerspectiveCamera should be used instead. Figured out a way to show a warning when misused.
* OrthoCamera is now OrthographicCamera.
* Removed `target` from Camera.
Misc
* Renamed Trident to Axes.
* Camera.useTarget is now false by default. Updated some of the examples. I tried to remove target altogether (and use lookAt every frame), but I found that WebGLRenderer's ShadowMaps uses a camera with target. Will try again at some point.
* Object3D.lookAt now checks if it's a Camera and does the inverted view.
* Quaternion glitch reported at #595
* Added .name to Material
* WebGLRenderer .clear() to .clear( color, depth, stencil ). All of them true by default.
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 :/
Similarly like for geometry groups, iterating over object properties turned out to be bottleneck for some use cases: gained 5-10 fps in depth-of-field example (which btw for some reason got slower recently).
Hopefully this fixes several problems:
- ambient component not modulated by scene ambient light
- specular component not getting light colors
- unnecessary opacity use in lighting calculations
- unnecessary vertex shader light computation for Phong
- unnecessary use of one varying in Phong
Problem was that objects could be added to WebGLRenderer's internal render list only once (because of `webglInit` flag).
Now there are two separate internal states (`webglInit` and `webglActive`) so that object can be initialized just once (expensive operation) but added / removed from the scene many times (cheap operation).