2
0

DeviceOrientationControls.html 1.9 KB

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