mrdoob/three.js — pull request #3300 by arodic (2013-04-11 00:03:20+00:00)
Title: Added transform controls

So far it only support translation and I think it will not work well in hierarchies but for flat scenes it will work fine. So the list of features that need to be added are:

- [ ] support for object space transformations
- [ ] rotation
- [ ] scale

Feel free to prettify the code but keep in mind that I plan to work on this more.

One problem I could not fix in the editor is the fact that editorControlls and TransformControlls use the same mouse events and cannot signal each other. I think we shouldnt use signals in them since they are designed to be used with any three.js app.

Basically I want to disable editorControls when transformControls.active. Im trying to prevent it here

https://github.com/arodic/three.js/blob/67c441285d35144a0cca5da4738ff57b83863e78/editor/js/ui/Viewport.js#L99

but sometimes this mouseDown event happens after transformControls becomes active (triggered by the mouseDown event in transformControls.js)

If that is the case I tried to disable editorControls in mouseMove function here:
https://github.com/arodic/three.js/blob/67c441285d35144a0cca5da4738ff57b83863e78/editor/js/ui/Viewport.js#L110

This works but sometimes the camera moves just one tick before it gets disabled. Let me know if you have any ideas how to handle this better.