HemisphereLightHelper.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>HemisphereLightHelper - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → </p>
  13. <h1 translate="no">HemisphereLightHelper</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Creates a visual aid consisting of a spherical mesh for a
  17. given <a href="HemisphereLight.html">HemisphereLight</a>.</p></div>
  18. <h2>Code Example</h2>
  19. <div translate="no"><pre><code class="language-js">const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 );
  20. const helper = new THREE.HemisphereLightHelper( light, 5 );
  21. scene.add( helper );
  22. </code></pre></div>
  23. </header>
  24. <article>
  25. <div class="container-overview">
  26. <h2>Constructor</h2>
  27. <h3 class="name name-method" id="HemisphereLightHelper" translate="no">new <a href="#HemisphereLightHelper">HemisphereLightHelper</a><span class="signature">( light : <span class="param-type"><a href="HemisphereLight.html">HemisphereLight</a></span>, size : <span class="param-type">number</span>, color : <span class="param-type">number | <a href="Color.html">Color</a> | string</span> )</span> </h3>
  28. <div class="method">
  29. <div class="description">
  30. <p>Constructs a new hemisphere light helper.</p>
  31. </div>
  32. <table class="params">
  33. <tbody>
  34. <tr>
  35. <td class="name">
  36. <strong>light</strong>
  37. </td>
  38. <td class="description last">
  39. <p>The light to be visualized.</p>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td class="name">
  44. <strong>size</strong>
  45. </td>
  46. <td class="description last">
  47. <p>The size of the mesh used to visualize the light.</p>
  48. <p>Default is <code>1</code>.</p>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td class="name">
  53. <strong>color</strong>
  54. </td>
  55. <td class="description last">
  56. <p>The helper's color. If not set, the helper will take
  57. the color of the light.</p>
  58. </td>
  59. </tr>
  60. </tbody>
  61. </table>
  62. </div>
  63. </div>
  64. <h2 class="subsection-title">Properties</h2>
  65. <div class="member">
  66. <h3 class="name" id="color" translate="no">.<a href="#color">color</a><span class="type-signature"> : number | <a href="Color.html">Color</a> | string</span> </h3>
  67. <div class="description">
  68. <p>The color parameter passed in the constructor.
  69. If not set, the helper will take the color of the light.</p>
  70. </div>
  71. </div>
  72. <div class="member">
  73. <h3 class="name" id="light" translate="no">.<a href="#light">light</a><span class="type-signature"> : <a href="HemisphereLight.html">HemisphereLight</a></span> </h3>
  74. <div class="description">
  75. <p>The light being visualized.</p>
  76. </div>
  77. </div>
  78. <h2 class="subsection-title">Methods</h2>
  79. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  80. <div class="method">
  81. <div class="description">
  82. <p>Frees the GPU-related resources allocated by this instance. Call this
  83. method whenever this instance is no longer used in your app.</p>
  84. </div>
  85. </div>
  86. <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">()</span> </h3>
  87. <div class="method">
  88. <div class="description">
  89. <p>Updates the helper to match the position and direction of the
  90. light being visualized.</p>
  91. </div>
  92. </div>
  93. <h2 class="subsection-title">Source</h2>
  94. <p>
  95. <a href="https://github.com/mrdoob/three.js/blob/master/src/helpers/HemisphereLightHelper.js" translate="no" target="_blank" rel="noopener">src/helpers/HemisphereLightHelper.js</a>
  96. </p>
  97. </article>
  98. </section>
  99. <script src="../scripts/linenumber.js"></script>
  100. <script src="../scripts/page.js"></script>
  101. </body>
  102. </html>
粤ICP备19079148号