FlyControls.html 2.3 KB

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