mrdoob/three.js — pull request #5163 by morris (2014-08-03 20:28:37+00:00)
Title: Vertex Editing

Hi,
I just added simple vertex editing to the three.js editor, and I thought I might share it with you. This could be a starting point for more geometry functionality.

Demo: https://rawgit.com/morris/three.js/geometryEditor/editor/index.html

![preview](https://cloud.githubusercontent.com/assets/32837/3791650/45d5716e-1b4a-11e4-961b-2d7a6f8c416a.jpg)

Features a new Geometry menu with a few new options:
- toggle vertex edit on the selected object
- calculate face normals or vertex normals
- convert any geometry to a raw Geometry instance

Problems/Todo:
- currently only works with raw Geometry, not with BufferGeometry or BoxGeometry etc.
- if you modify a BoxGeometry or similar, you have to convert to Geometry manually, or otherwise the editor won't save the new vertex data
- the sidebar for the vertices is the same as for any Object3D; would probably be nicer to have a decicated sidebar for that

There's only a few tweaks I had to insert apart from the new Menubar.Geometry.js:
- made the menu have variable width so "Geometry" fits
- prevent adding the new picker objects into the scene graph when working with the sidebar
- exposed camera from the viewport as an editor property
- priority selection of pickers

This is my first attempt at a pull request, so any tips how i can do better would be great :)