CameraHelper.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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>Code Example</h2>
  18. <code>
  19. var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
  20. var helper = new THREE.CameraHelper( camera );
  21. scene.add( helper );
  22. </code>
  23. <h2>Examples</h2>
  24. <p>
  25. [example:webgl_camera WebGL / camera]<br/>
  26. [example:webgl_geometry_extrude_splines WebGL / extrude / splines]
  27. </p>
  28. <h2>Constructor</h2>
  29. <h3>[name]( [param:Camera camera] )</h3>
  30. <p>
  31. [page:Camera camera] -- The camera to visualize.<br /><br />
  32. This create a new [Name] for the specified camera.
  33. </p>
  34. <h2>Properties</h2>
  35. <p>See the base [page:LineSegments] class for common properties.</p>
  36. <h3>[property:Camera camera]</h3>
  37. <p>The camera being visualized.</p>
  38. <h3>[property:object pointMap]</h3>
  39. <p>This contains the points used to visualize the camera.</p>
  40. <h3>[property:object matrix]</h3>
  41. <p>Reference to the [page:Object3D.matrixWorld camera.matrixWorld].</p>
  42. <h3>[property:object matrixAutoUpdate]</h3>
  43. <p>
  44. See [page:Object3D.matrixAutoUpdate]. Set to *false* here as the helper is using the
  45. camera's [page:Object3D.matrixWorld matrixWorld].
  46. </p>
  47. <h2>Methods</h2>
  48. <p>See the base [page:LineSegments] class for common methods.</p>
  49. <h3>[method:null update]()</h3>
  50. <p>Updates the helper based on the projectionMatrix of the camera.</p>
  51. <h2>Source</h2>
  52. <p>
  53. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  54. </p>
  55. </body>
  56. </html>