RectAreaLight.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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:Light] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. RectAreaLight emette luce uniformemente sulla faccia di un piano rettangolare. Questo tipo di luce
  14. può essere utilizzato per simulare le sorgenti di luce come finestre luminose o strisce luminose.<br /><br />
  15. Note importanti:
  16. <ul>
  17. <li>Non c'è il supporto per le ombre.</li>
  18. <li>Solo [page:MeshStandardMaterial MeshStandardMaterial] e [page:MeshPhysicalMaterial MeshPhysicalMaterial] sono supportati.</li>
  19. <li>Devi includere [link:https://threejs.org/examples/jsm/lights/RectAreaLightUniformsLib.js RectAreaLightUniformsLib] nella tua scena e chiamare `init()`.</li>
  20. </ul>
  21. </p>
  22. <h2>Codice di Esempio</h2>
  23. <code>
  24. const width = 10;
  25. const height = 10;
  26. const intensity = 1;
  27. const rectLight = new THREE.RectAreaLight( 0xffffff, intensity, width, height );
  28. rectLight.position.set( 5, 5, 0 );
  29. rectLight.lookAt( 0, 0, 0 );
  30. scene.add( rectLight )
  31. const rectLightHelper = new RectAreaLightHelper( rectLight );
  32. rectLight.add( rectLightHelper );
  33. </code>
  34. <h2>Esempi</h2>
  35. <p>
  36. [example:webgl_lights_rectarealight WebGL / rectarealight ]
  37. </p>
  38. <h2>Costruttore</h2>
  39. <h3>[name]( [param:Integer color], [param:Float intensity], [param:Float width], [param:Float height] )</h3>
  40. <p>
  41. [page:Integer color] - (opzionale) colore esadecimale della luce. Il valore predefinito è 0xffffff (bianco).<br />
  42. [page:Float intensity] - (opzionale) l'intensità della luce, o luminosità. Il valore predefinito è 1.<br />
  43. [page:Float width] - (opzionale) larghezza della luce. Il valore predefinito è 10.<br />
  44. [page:Float height] - (opzionale) altezza della luce. Il valore predefinito è 10.<br /><br />
  45. Crea una nuova [name].
  46. </p>
  47. <h2>Proprietà</h2>
  48. <p>
  49. Vedi la classe base [page:Light Light] per le proprietà comuni.
  50. </p>
  51. <h3>[property:Float height]</h3>
  52. <p>
  53. L'altezza della luce.
  54. </p>
  55. <h3>[property:Float intensity]</h3>
  56. <p>
  57. L'intensità della luce. Il valore predefinito è `1`.<br />
  58. L'intesità è la luminanza (luminosità) della luce misurata in nits (cd/m^2).<br /><br />
  59. Modificando l'intensità si modificherà anche la potenza della luce.
  60. </p>
  61. <h3>[property:Boolean isRectAreaLight]</h3>
  62. <p>
  63. Flag di sola lettura per verificare se l'oggetto dato è del tipo [name].
  64. </p>
  65. <h3>[property:Float power]</h3>
  66. <p>
  67. La potenza della luce.<br />
  68. La potenza è la potenza della luminosità della luce misurata in lumen (lm).<br /><br />
  69. Modificando la potenza si modificherà anche l'intensità della luce.
  70. </p>
  71. <h3>[property:Float width]</h3>
  72. <p>
  73. La larghezza della luce.
  74. </p>
  75. <h2>Metodi</h2>
  76. <p>
  77. Vedi la classe base [page:Light Light] per i metodi comuni.
  78. </p>
  79. <h3>[method:this copy]( [param:RectAreaLight source] )</h3>
  80. <p>
  81. Copia il valore di tutte le proprietà dalla [page:RectAreaLight sorgente] a questa
  82. RectAreaLight.
  83. </p>
  84. <p>
  85. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  86. </p>
  87. </body>
  88. </html>