foobarbecue
foobarbecue

Reputation: 7060

Documentation for three.js controls?

three.js comes with many useful controls, which cause camera movement in response to keyboard and mouse input.

They are all at https://github.com/mrdoob/three.js/blob/master/examples/js/controls and accessed in the code as e.g.THREE.OrbitControls .

However, I can't find any documentation or comments that says what situation to use what control for or what they are intended to do.

Can anyone point me to this information, or do I have to analyze the code to figure out if, for example, I prefer FlyControls to FirstPersonControls?

Upvotes: 18

Views: 13906

Answers (3)

Mak
Mak

Reputation: 924

The source code for most of the controls contains pretty decent comments. I know this isnt as good as proper documentation but it really helps to get a handle on how to set up the controls

Upvotes: 1

foobarbecue
foobarbecue

Reputation: 7060

The documentation for the controls does exist, but it was deleted from the repository here. Seems like a bizarre thing to do, but there is an explanation of sorts here. I guess the docs were very incomplete anyway and it was easier to delete them than to finish them. :-p

Upvotes: 17

GuyGood
GuyGood

Reputation: 1377

The Controls are named by their purpose or the idea they implement. OrbitControls allow you to orbit around some kind of object. Same for Trackball-Controls although the trackball-scheme implies that the camera will rotate around without the up-Axis staying as it was like in orbit-controls. Fly and FPS-Controls are self-explanatory. Just try the examples and you will see what the difference is. No need to analyse code. Just depends on what you want to achieve.

Upvotes: -10

Related Questions