2
0

PointLightHelper.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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:Mesh] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. Questo mostra un oggetto helper costituito da una [page:Mesh] sferica per la visualizzazione di
  14. un [page:PointLight].
  15. </p>
  16. <h2>Codice di Esempio</h2>
  17. <code>
  18. const pointLight = new THREE.PointLight( 0xff0000, 1, 100 );
  19. pointLight.position.set( 10, 10, 10 );
  20. scene.add( pointLight );
  21. const sphereSize = 1;
  22. const pointLightHelper = new THREE.PointLightHelper( pointLight, sphereSize );
  23. scene.add( pointLightHelper );
  24. </code>
  25. <h2>Esempi</h2>
  26. <p>
  27. [example:webgl_helpers WebGL / helpers]
  28. </p>
  29. <h2>Costruttore</h2>
  30. <h3>[name]( [param:PointLight light], [param:Float sphereSize], [param:Hex color] )</h3>
  31. <p>
  32. [page:PointLight light] -- La luce da visualizzare. <br /><br />
  33. [page:Float sphereSize] -- (opzionale) La dimensione della sfera. Il valore predefinito è `1`.<br /><br />
  34. [page:Hex color] -- (opzionale) Se non è impostato l'helper prenderà il colore della luce.
  35. </p>
  36. <h2>Proprietà</h2>
  37. <p>Vedi la classe base [page:Mesh] per le proprietà in comune.</p>
  38. <h3>[property:PointLight light]</h3>
  39. <p>La [page:PointLight] che viene visualizzata.</p>
  40. <h3>[property:Object matrix]</h3>
  41. <p>Riferimento alla [page:Object3D.matrixWorld matrixWorld] del pointLight.</p>
  42. <h3>[property:Object matrixAutoUpdate]</h3>
  43. <p>
  44. Vedi [page:Object3D.matrixAutoUpdate]. In questo caso è impostato su `false`, poiché l'helper sta usando
  45. [page:Object3D.matrixWorld matrixWorld] della telecamera.
  46. </p>
  47. <h3>[property:hex color]</h3>
  48. <p>
  49. Il parametro colore passato nel costruttore. Il valore predefinito è `undefined`. Se viene modificato,
  50. il colore dell'helper sarà aggiornato la prossima volta che il metodo [page:.update update] venga chiamato.
  51. </p>
  52. <h2>Metodi</h2>
  53. <p>Vedi la classe base [page:Mesh] per i metodi comuni.</p>
  54. <h3>[method:undefined dispose]()</h3>
  55. <p>Elimina il pointLightHelper.</p>
  56. <h3>[method:undefined update]()</h3>
  57. <p>Aggiorna l'helper in modo che corrisponda alla posizione della [page:.light luce].</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>