2
0

DeviceOrientationControls.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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. 通过使用设备朝向来确定摄像机的朝向。
  14. </p>
  15. <h2>例子</h2>
  16. <p>[example:misc_controls_deviceorientation misc / controls / deviceorientation ]</p>
  17. <h2>构造函数</h2>
  18. <h3>[name]( [param:Camera object] )</h3>
  19. <p>
  20. <p>
  21. [page:Camera object]: 被控制的摄像机。
  22. </p>
  23. <p>
  24. 创建一个新的 [name] 实例。
  25. </p>
  26. </p>
  27. <h2>Events</h2>
  28. <h3>change</h3>
  29. <p>
  30. Fires when the camera has been transformed by the controls.
  31. </p>
  32. <h2>属性</h2>
  33. <h3>[property:Number alphaOffset]</h3>
  34. <p>
  35. alpha角偏移量,以弧度表示,默认为*0*。
  36. </p>
  37. <h3>[property:Object deviceOrientation]</h3>
  38. <p>
  39. 当前 *deviceorientation* 事件的对象。
  40. </p>
  41. <h3>[property:Boolean enabled]</h3>
  42. <p>
  43. 是否启用控制器。
  44. </p>
  45. <h3>[property:Camera object]</h3>
  46. <p>
  47. 被控制的摄像机。
  48. </p>
  49. <h3>[property:Number screenOrientation]</h3>
  50. <p>
  51. 相对于设备自然朝向的视口朝向,以角度表示(增量为90)。默认为*0*。
  52. </p>
  53. <h2>方法</h2>
  54. <h3>[method:null connect] ()</h3>
  55. <p>
  56. 增加控制器的事件监听,并启用控制器。
  57. </p>
  58. <h3>[method:null disconnect] ()</h3>
  59. <p>
  60. 移除控制器的事件监听,并禁用控制器。
  61. </p>
  62. <h3>[method:null dispose] ()</h3>
  63. <p>
  64. 若不再需要该控制器,则应当调用此函数。
  65. </p>
  66. <h3>[method:null update] ()</h3>
  67. <p>
  68. 更新控制器,常被用在动画循环中。
  69. </p>
  70. <h2>源代码</h2>
  71. <p>
  72. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/DeviceOrientationControls.js examples/jsm/controls/DeviceOrientationControls.js]
  73. </p>
  74. </body>
  75. </html>