1
0

FlyControls.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. [page:Controls] &rarr;
  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>Import</h2>
  17. <p>
  18. [name] is an add-on, and must be imported explicitly.
  19. See [link:#manual/introduction/Installation Installation / Addons].
  20. </p>
  21. <code>
  22. import { FlyControls } from 'three/addons/controls/FlyControls.js';
  23. </code>
  24. <h2>Examples</h2>
  25. <p>[example:misc_controls_fly misc / controls / fly ]</p>
  26. <h2>Constructor</h2>
  27. <h3>[name]( [param:Camera object], [param:HTMLDOMElement domElement] )</h3>
  28. <p>
  29. [page:Camera object]: The camera to be controlled.
  30. </p>
  31. <p>
  32. [page:HTMLDOMElement domElement]: The HTML element used for event listeners. (optional)
  33. </p>
  34. <p>
  35. Creates a new instance of [name].
  36. </p>
  37. <h2>Events</h2>
  38. <h3>change</h3>
  39. <p>
  40. Fires when the camera has been transformed by the controls.
  41. </p>
  42. <h2>Properties</h2>
  43. <p>See the base [page:Controls] class for common properties.</p>
  44. <h3>[property:Boolean autoForward]</h3>
  45. <p>
  46. If set to `true`, the camera automatically moves forward (and does not stop) when initially translated. Default is `false`.
  47. </p>
  48. <h3>[property:Boolean dragToLook]</h3>
  49. <p>
  50. If set to `true`, you can only look around by performing a drag interaction. Default is `false`.
  51. </p>
  52. <h3>[property:Number movementSpeed]</h3>
  53. <p>
  54. The movement speed. Default is `1`.
  55. </p>
  56. <h3>[property:Number rollSpeed]</h3>
  57. <p>
  58. The rotation speed. Default is `0.005`.
  59. </p>
  60. <h2>Methods</h2>
  61. <p>See the base [page:Controls] class for common methods.</p>
  62. <h2>Source</h2>
  63. <p>
  64. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/FlyControls.js examples/jsm/controls/FlyControls.js]
  65. </p>
  66. </body>
  67. </html>