mrdoob/three.js — pull request #5159 by erich666 (2014-07-31 17:50:29+00:00)
Title: trackball -> orbit fixes

(I hope I'm doing this correctly - it's a bit of a nightmare dealing with Github and knowing what it really wants, if you don't do this every week.)

From comments on pull request 5156,
https://github.com/mrdoob/three.js/pull/5156, a few changes are worth
doing.

> TrackballControls has properties that OrbitControls does not, so those
need to be changed in this PR, too.

Good point, I forgot to check. webgl_terrain_dynamic.html and
webgl_loader_vrml.html indeed have these, the others do not. I've fixed
and will make a separate PR.

> Also, for static scenes, OrbitControls does not require an animation
loop. (You just have to make sure render() is called after a texture is
loaded.)

I'm not entirely following (events are a weak spot for me), but noticed
controls.update() and controls.handleResize(); calls that appears to not
be necessary in webgl_loader_vrml.html and webgl_morphtargets_md2.html
render() loops but could simply be moved to after creation of the
controls.

The webgl_morphtargets_md2_control.html example needs to have an
additional line of code, otherwise arrow keys affect movement and the
camera position:

cameraControls.noKeys = true;