FlyControls.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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]: The HTML element used for event listeners.
  26. </p>
  27. <p>
  28. Creates a new instance of [name].
  29. </p>
  30. </p>
  31. <h2>Properties</h2>
  32. <h3>[property:Boolean autoForward]</h3>
  33. <p>
  34. If set to *true*, the camera automatically moves forward (and does not stop) when initially translated. Default is *false*.
  35. </p>
  36. <h3>[property:HTMLDOMElement domElement]</h3>
  37. <p>
  38. The HTMLDOMElement used to listen for mouse / touch events. This must be passed in the constructor; changing it here will
  39. not set up new event listeners.
  40. </p>
  41. <h3>[property:Boolean dragToLook]</h3>
  42. <p>
  43. If set to *true*, you can only look around by performing a drag interaction. Default is *false*.
  44. </p>
  45. <h3>[property:Number movementSpeed]</h3>
  46. <p>
  47. The movement speed. Default is *1*.
  48. </p>
  49. <h3>[property:Camera object]</h3>
  50. <p>
  51. The camera to be controlled.
  52. </p>
  53. <h3>[property:Number rollSpeed]</h3>
  54. <p>
  55. The rotation speed. Default is *0.005*.
  56. </p>
  57. <h2>Methods</h2>
  58. <h3>[method:null dispose] ()</h3>
  59. <p>
  60. Should be called if the controls is no longer required.
  61. </p>
  62. <h3>[method:null update] ( [param:Number delta] )</h3>
  63. <p>
  64. <p>
  65. [page:Number delta]: Time delta value.
  66. </p>
  67. <p>
  68. Updates the controls. Usually called in the animation loop.
  69. </p>
  70. </p>
  71. <h2>Source</h2>
  72. <p>
  73. [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/FlyControls.js examples/js/controls/FlyControls.js]
  74. </p>
  75. </body>
  76. </html>