FlyControls.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. [name] enables a navigation similar to fly modes in DCC tools like Blender. You can arbitrarily transform the camera in
  14. 3D space without any limitations (e.g. focus on a specific target).
  15. </p>
  16. <h2>Example</h2>
  17. <p>[example:misc_controls_fly misc / controls / fly ]</p>
  18. <h2>Constructor</h2>
  19. <h3>[name]( [param:Camera object], [param:HTMLDOMElement domElement] )</h3>
  20. <p>
  21. <p>
  22. [page:Camera object]: The camera to be controlled.
  23. </p>
  24. <p>
  25. [page:HTMLDOMElement domElement]: (optional) The HTML element used for event listeners. By default this is the whole document,
  26. however if you only want the controls to work over a specific element (e.g. the canvas) you can specify that here.
  27. </p>
  28. <p>
  29. Creates a new instance of [name].
  30. </p>
  31. </p>
  32. <h2>Properties</h2>
  33. <h3>[property:Boolean autoForward]</h3>
  34. <p>
  35. If set to *true*, the camera automatically moves forward (and does not stop) when initially translated. Default is *false*.
  36. </p>
  37. <h3>[property:HTMLDOMElement domElement]</h3>
  38. <p>
  39. The HTMLDOMElement used to listen for mouse / touch events. This must be passed in the constructor; changing it here will
  40. not set up new event listeners. Default is the whole document.
  41. </p>
  42. <h3>[property:Boolean dragToLook]</h3>
  43. <p>
  44. If set to *true*, you can only look around by performing a drag interaction. Default is *false*.
  45. </p>
  46. <h3>[property:Number movementSpeed]</h3>
  47. <p>
  48. The movement speed. Default is *1*.
  49. </p>
  50. <h3>[property:Camera object]</h3>
  51. <p>
  52. The camera to be controlled.
  53. </p>
  54. <h3>[property:Number rollSpeed]</h3>
  55. <p>
  56. The rotation speed. Default is *0.005*.
  57. </p>
  58. <h2>Methods</h2>
  59. <h3>[method:null dispose] ()</h3>
  60. <p>
  61. Should be called if the controls is no longer required.
  62. </p>
  63. <h3>[method:null update] ( [param:Number delta] )</h3>
  64. <p>
  65. <p>
  66. [page:Number delta]: Time delta value.
  67. </p>
  68. <p>
  69. Updates the controls. Usually called in the animation loop.
  70. </p>
  71. </p>
  72. <h2>Source</h2>
  73. <p>
  74. [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/FlyControls.js examples/js/controls/FlyControls.js]
  75. </p>
  76. </body>
  77. </html>