CameraHelper.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <!DOCTYPE html>
  2. <html lang="it">
  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. [page:Object3D] &rarr; [page:Line] &rarr; [page:LineSegments] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. Questa classe aiuta a visualizzare ciò che una telecamera contiene nel suo frustum. Visualizza il frustum di una telecamera utilizzando un [page:LineSegments].<br /><br />
  14. [name] must be a child of the scene.
  15. </p>
  16. <h2>Codice di Esempio</h2>
  17. <code>
  18. const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
  19. const helper = new THREE.CameraHelper( camera );
  20. scene.add( helper );
  21. </code>
  22. <h2>Esempi</h2>
  23. <p>
  24. [example:webgl_camera WebGL / camera]<br/>
  25. [example:webgl_geometry_extrude_splines WebGL / extrude / splines]
  26. </p>
  27. <h2>Costruttore</h2>
  28. <h3>[name]( [param:Camera camera] )</h3>
  29. <p>
  30. [page:Camera camera] -- La telecamera da visualizzare.<br /><br />
  31. Crea un nuovo [name] per la telecamera specificata.
  32. </p>
  33. <h2>Proprietà</h2>
  34. <p>Vedi la classe base [page:LineSegments] per le proprietà in comune.</p>
  35. <h3>[property:Camera camera]</h3>
  36. <p>La telecamera visualizzata.</p>
  37. <h3>[property:Object pointMap]</h3>
  38. <p>Contiene i punti utilizzati per visualizzare la telecamera.</p>
  39. <h3>[property:Object matrix]</h3>
  40. <p>Riferimento a [page:Object3D.matrixWorld camera.matrixWorld].</p>
  41. <h3>[property:Object matrixAutoUpdate]</h3>
  42. <p>
  43. Vedi [page:Object3D.matrixAutoUpdate]. In questo caso è impostato su `false`, poiché l'helper sta usando
  44. [page:Object3D.matrixWorld matrixWorld] della telecamera.
  45. </p>
  46. <h2>Metodi</h2>
  47. <p>Vedi la classe base [page:LineSegments] per i metodi comuni.</p>
  48. <h3>[method:undefined dispose]()</h3>
  49. <p>
  50. Elimina il [page:Line.material materiale] e la [page:Line.geometry geometria] utilizzati da questo helper.
  51. </p>
  52. <h3>[method:this setColors]( [param:Color frustum], [param:Color cone], [param:Color up], [param:Color target], [param:Color cross] )</h3>
  53. <p>
  54. Definisce i colori dell'helper.
  55. </p>
  56. <h3>[method:undefined update]()</h3>
  57. <p>Aggiorna l'helper in base alla projectionMatrix della telecamera.</p>
  58. <h2>Source</h2>
  59. <p>
  60. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  61. </p>
  62. </body>
  63. </html>