mrdoob/three.js — pull request #5140 by jabooth (2014-07-29 09:49:12+00:00)
Title: tidier computeVertexNormals on BufferGeometry 

This is a suggestion for a slightly tidier version of `BufferGeometry.computeVertexNormals()`. Main points:

1. Remove 140 line `if` statement with a short check for `position` attribute at the start of the method
2. Adds missing `normal` attribute using `addAttribute()` with a true `THREE.BufferAttribute` in lieu of a manual attribute addition.
3. Checks for attributes using `getAttribute()` rather than manually checking the attributes property.

I haven't altered the actual computation at all, purely a cosmetic change - unfortunately the diff looks awful due to the if statement shift :(