CameraHelper.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. [page:LineSegments] &rarr;
  12. <h1>摄像机辅助工具([name])</h1>
  13. <p class="desc">
  14. 它将会显示摄像机,包括摄像机的视锥体。<br />
  15. 它使用[page:LineSegments](线段)来显示摄像机视锥体。
  16. </p>
  17. <h2>示例</h2>
  18. <div>[example:webgl_camera WebGL / camera]</div>
  19. <div>[example:webgl_geometry_extrude_splines WebGL / extrude / splines]</div>
  20. <code>
  21. var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
  22. var helper = new THREE.CameraHelper( camera );
  23. scene.add( helper );
  24. </code>
  25. <h2>构造器</h2>
  26. <h3>[name]( [param:Camera camera] )</h3>
  27. <p>
  28. [page:Camera camera] -- 将会被CameraHelper可视化的相机。<br /><br />
  29. 为特定的摄像机创建一个新的 [Name]。
  30. </p>
  31. <h2>属性</h2>
  32. <p>请参阅其基类[page:LineSegments]来查看共有属性。</p>
  33. <h3>[property:Camera camera]</h3>
  34. <p>将会被可视化的摄像机。</p>
  35. <h3>[property:object pointMap]</h3>
  36. <p>它包括了用于可视化相机的点。
  37. This contains the points used to visualize the camera.</p>
  38. <h3>[property:object matrix]</h3>
  39. <p>对[page:Object3D.matrixWorld camera.matrixWorld]的引用。</p>
  40. <h3>[property:object matrixAutoUpdate]</h3>
  41. <p>
  42. 请参阅[page:Object3D.matrixAutoUpdate]。在这里将其设置为*false*,因为辅助工具使用的是
  43. 相机的[page:Object3D.matrixWorld matrixWorld]。
  44. </p>
  45. <h2>方法</h2>
  46. <p>请参阅其基类[page:LineSegments]来查看共有方法。</p>
  47. <h3>[method:null update]()</h3>
  48. <p>基于摄像机的projectionMatrix(投影矩阵)来更新辅助工具。</p>
  49. <h2>源代码</h2>
  50. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  51. </body>
  52. </html>