DirectionalLightHelper.html 2.0 KB

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