Documentation for three.js controls?

13,725

Solution 1

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

Solution 2

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

Share:
13,725

Related videos on Youtube

foobarbecue
Author by

foobarbecue

I'm an early-career volcano technologist with interests including speleology and astrobiology. I play cello, build flying robots, and enjoy sport climbing. At the moment I am in northern Chile with the Trail by Fire project. I have experience with: Programming languages: Python, Javascript / CSS / HTML5, Matlab, Java, C and C++ and one time I got stuck in Antarctica so I learned brainfuck Web frameworks: Django, Meteor Unmanned aerial vehicles (demo video): Many ardupilot-based systems, recently builds based on Turboace Matrix and FireFLY6. Also lots of stick time on DJI Phantom 3 pro, DJI Matrice 100 Laser scanning: I've operated Optech, Riegl, and Leica systems and am competent in processing data from all of these. In addition to manufacturer's software, I use Blender, Polyworks, Meshlab, and CloudCompare extensively. Multi-view stereophotogrammetry: Made some stuff for NASA JPL and some for a National Geographic expedition. Geophysical hardware: Fiber-optic distributed temperature sensing systems, Onset dataloggers, Campbell dataloggers, Quanterra Q330, ancient Guralp seismometers and digitizers, Trimble GPS things Geophysical software: I'm good with Earthworm. Some of my creations on the web are: AfterFlight: Browser-based UAV log and video analysis climbshare.com: 3D interactive multiplayer climbing guides (early development) Erebus Cave and Fumarole Database: Database of Erebus' fumarolic ice caves including timeseries data gottafix.it: Edit the web Kicksnorter: publicly report success / failure of crowdfund projects (retired since it's against Kickstarter policy) quirktonomicon.com: Alternative interface to quirky.com (retired)

Updated on June 26, 2022

Comments

  • foobarbecue
    foobarbecue almost 2 years

    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?

    • ArtOfWarfare
      ArtOfWarfare over 8 years
      At least the THREE.OrbitControls source code has a few lines of comments explaining how it works/why it exists at the start of the file. That's much better than I can say for THREE.TrackballControls which has a grand total of 21 comments, most of them fewer than 9 characters long and none of which explain why the file exists or how to use it.
    • LarsH
      LarsH over 8 years
      Some helpful information about orbit vs. trackball controls is at stackoverflow.com/a/18581760/423105
  • foobarbecue
    foobarbecue about 10 years
    You seriously think the controls are self-explanatory from the name? "Fly" and "Path" and "PointerLock" and "Oculus" and "Transform"? Each one of these is not obvious and has a host of parameters that are in themselves not obvious. Sadly, I'm afraid you may be right; there's just no documentation. Absurd. I'll leave it a while longer in hopes that someone will be able to point to a useful reference.
  • GuyGood
    GuyGood about 10 years
    Yes i think the controls are self-explanatory. Maybe just ask what you do not understand. As there are examples for all the controls, where is the problem? Fly = Fly-Mode, path-controls let you choose a path to move along and Oculus is of course meant to be used with the Oculus Rift Head Mounted Display. And as there are examples for EVERY controls-type, this is no big deal to choose the correct one for your use case but I guess you do not even know what you want. Also it seems you don't want to google for your answer because for Trackball or Pointerlock you could find the ideas behind them.
  • GuyGood
    GuyGood about 10 years
    anyway, good luck reading through all the code for all controls until you know what they are for O.o
  • Gordon
    Gordon about 5 years
    Looks like only the FirstPersonControls were documented at that time; the rest were just empty boilerplate. Now there is OrbitControls in the documentation, luckily that is the one I was looking for!