CameraHelper.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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:Object3D] &rarr; [page:Line] &rarr; [page:LineSegments] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. This helps with visualizing what a camera contains in its frustum.<br />
  15. It visualizes the frustum of a camera using a [page:LineSegments].
  16. </p>
  17. <h2>Example</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>Constructor</h2>
  26. <h3>[name]( [param:Camera camera] )</h3>
  27. <p>
  28. [page:Camera camera] -- The camera to visualize.<br /><br />
  29. This create a new [Name] for the specified camera.
  30. </p>
  31. <h2>Properties</h2>
  32. <p>See the base [page:LineSegments] class for common properties.</p>
  33. <h3>[property:Camera camera]</h3>
  34. <p>The camera being visualized.</p>
  35. <h3>[property:object pointMap]</h3>
  36. <p>This contains the points used to visualize the camera.</p>
  37. <h3>[property:object matrix]</h3>
  38. <p>Reference to the [page:Object3D.matrixWorld camera.matrixWorld].</p>
  39. <h3>[property:object matrixAutoUpdate]</h3>
  40. <p>
  41. See [page:Object3D.matrixAutoUpdate]. Set to *false* here as the helper is using the
  42. camera's [page:Object3D.matrixWorld matrixWorld].
  43. </p>
  44. <h2>Methods</h2>
  45. <p>See the base [page:LineSegments] class for common methods.</p>
  46. <h3>[method:null update]()</h3>
  47. <p>Updates the helper based on the projectionMatrix of the camera.</p>
  48. <h2>Source</h2>
  49. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  50. </body>
  51. </html>