HemisphereLightHelper.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html lang="en">
  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;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. Creates a visual aid consisting of a spherical [page:Mesh] for a [page:HemisphereLight HemisphereLight].
  14. </p>
  15. <h2>Code Example</h2>
  16. <code>
  17. const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 );
  18. const helper = new THREE.HemisphereLightHelper( light, 5 );
  19. scene.add( helper );
  20. </code>
  21. <h2>Constructor</h2>
  22. <h3>[name]( [param:HemisphereLight light], [param:Number sphereSize], [param:Hex color] )</h3>
  23. <p>
  24. [page:HemisphereLight light] -- The light being visualized. <br /><br />
  25. [page:Number size] -- The size of the mesh used to visualize the light.<br /><br />
  26. [page:Hex color] -- (optional) if this is not the set the helper will take the color of the light.
  27. </p>
  28. <h2>Properties</h2>
  29. <p>See the base [page:Object3D] class for common properties.</p>
  30. <h3>[property:HemisphereLight light]</h3>
  31. <p>Reference to the HemisphereLight being visualized.</p>
  32. <h3>[property:Object matrix]</h3>
  33. <p>Reference to the hemisphereLight's [page:Object3D.matrixWorld matrixWorld].</p>
  34. <h3>[property:Object matrixAutoUpdate]</h3>
  35. <p>
  36. See [page:Object3D.matrixAutoUpdate]. Set to `false` here as the helper is using the
  37. hemisphereLight's [page:Object3D.matrixWorld matrixWorld].
  38. </p>
  39. <h3>[property:hex color]</h3>
  40. <p>
  41. The color parameter passed in the constructor. Default is `undefined`. If this is changed, the helper's color will update
  42. the next time [page:.update update] is called.
  43. </p>
  44. <h2>Methods</h2>
  45. <p>See the base [page:Object3D] class for common methods.</p>
  46. <h3>[method:undefined dispose]()</h3>
  47. <p>
  48. Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
  49. </p>
  50. <h3>[method:undefined update]()</h3>
  51. <p>Updates the helper to match the position and direction of the [page:.light].</p>
  52. <h2>Source</h2>
  53. <p>
  54. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  55. </p>
  56. </body>
  57. </html>