mrdoob/three.js — pull request #4615 by jbaicoianu (2014-03-27 08:37:50+00:00)
Title: Continued Geometry replacement experiments

Continuing the work discussed in #4386 and #4588 - this approach completely replaces ```Geometry``` with a ```BufferGeometry```-based compatibility layer. This is a drop-in replacement, and most of the existing examples still work fine with no modifications.

Changes since the previous pull request:
* added skinning support
* new ```TypedVector4``` class, used to support skinning
* new ```MultiColor``` and ```MultiVector3``` classes to handle the ```face.color``` -> ```face.vertexColors[0..2]```/```face.normal``` -> ```face.vertexNormals[0..2]``` mapping
* started stripping out special-case ```Geometry``` code from ```WebGLRenderer
* new ```Geometry``` event ```allocate``` which fires when ```WebGLRenderer``` adds new ```Geometry``` to the scene
* removed ```Geometry99``` experiment

Things that still need work:
* FlatShading needs work, as @mrdoob says in #4588 maybe it makes sense to have a new ```FlatShadedGeometry``` class to abstract out the creation of the extra vertex info that's needed
* morphTargets not yet implemented - I can't find a ```BufferGeometry``` example which uses them, anyone know of one I can use for reference?
* per-face materials not implemented yet (all faces use first material)
* uvs have some minor issues, I can't tell if this is inherent to using an indexed ```BufferGeometry``` or if I just screwed up my offsets...
* colors don't work with ```Line```
* customAttributes not implemented
* ```MeshNormalMaterial``` gives slightly different colors for the same scene (might be related to FlatShading problem above)
* Wireframe materials don't render (I think these were removed for ```BufferGeometry``` intentionally?)

Most of the examples work the same as before, the following are the ones which are noticeably broken after this change:

* http://baicoianu.com/~bai/three.js/examples/#webgl_camera (missing camera debug lines)
* http://baicoianu.com/~bai/three.js/examples/#webgl_custom_attributes (custom attributes not implemented)
* http://baicoianu.com/~bai/three.js/examples/#webgl_geometry_cube (uv problems on top and bottom of cube)
* http://baicoianu.com/~bai/three.js/examples/#webgl_geometry_hierarchy2 (bad normals)
* http://baicoianu.com/~bai/three.js/examples/#webgl_geometry_normals (bad normals)
* http://baicoianu.com/~bai/three.js/examples/#webgl_geometry_nurbs (missing squiggle)
* http://baicoianu.com/~bai/three.js/examples/#webgl_geometry_shapes (only renders from the back)
* http://baicoianu.com/~bai/three.js/examples/#webgl_loader_collada_skinning (skinning not working)
* http://baicoianu.com/~bai/three.js/examples/#webgl_materials_cars (no colors)