DirectionalLightHelper.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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;
  12. <h1>[name]</h1>
  13. <div class="desc">Helper object to assist with visualizing a [page:DirectionalLight]'s effect on the scene.</div>
  14. <h2>Example</h2>
  15. <code>
  16. var light = new THREE.DirectionalLight( 0xFFFFFF );
  17. var helper = new THREE.DirectionalLightHelper( light );
  18. scene.add( helper );
  19. </code>
  20. <h2>Constructor</h2>
  21. <h3>[name]( [page:DirectionalLight light], [page:Number size] )</h3>
  22. <div>
  23. [page:DirectionalLight light]-- Light to visualize. <br />
  24. [page:Number size] -- (optional) dimensions of the plane. Default is *1*.<br /><br />
  25. Creates a line and plane to visualize the light's position and direction.
  26. </div>
  27. <h2>Properties</h2>
  28. <div>See the base [page:Object3D] class for common properties.</div>
  29. <h3>[property:Line lightPlane]</h3>
  30. <div>Contains the line mesh showing the location of the directional light.</div>
  31. <h3>[property:DirectionalLight light]</h3>
  32. <div>Contains the directionalLight.</div>
  33. <h3>[property:object matrix]</h3>
  34. <div>Reference to the [page:Object3D.matrixWorld light.matrixWorld].</div>
  35. <h3>[property:object matrixAutoUpdate]</h3>
  36. <div>
  37. See [page:Object3D.matrixAutoUpdate]. Set to *false* here as the helper is using the
  38. light's [page:Object3D.matrixWorld matrixWorld].
  39. </div>
  40. <h2>Methods</h2>
  41. <div>See the base [page:Object3D] class for common properties.</div>
  42. <h3>.[method:null dispose]()</h3>
  43. <div>Dispose of the directionalLightHelper.</div>
  44. <h3>.[method:null update]()</h3>
  45. <div>Updates the helper to match the position and direction of the [page:.light].</div>
  46. <h2>Source</h2>
  47. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  48. </body>
  49. </html>