Terrain now regenerates correctly.
Restructured a bunch more stuff. Got rid of shape-helper.js
Removed extraneous references to terrain-renderer3d.js and shape-helper.js in index.html.