HemisphereLight.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>HemisphereLight - 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> → <a href="Light.html">Light</a> → </p>
  13. <h1 translate="no">HemisphereLight</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A light source positioned directly above the scene, with color fading from
  17. the sky color to the ground color.</p>
  18. <p>This light cannot be used to cast shadows.</p></div>
  19. <h2>Code Example</h2>
  20. <div translate="no"><pre><code class="language-js">const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 );
  21. scene.add( light );
  22. </code></pre></div>
  23. </header>
  24. <article>
  25. <div class="container-overview">
  26. <h2>Constructor</h2>
  27. <h3 class="name name-method" id="HemisphereLight" translate="no">new <a href="#HemisphereLight">HemisphereLight</a><span class="signature">( skyColor : <span class="param-type">number | <a href="Color.html">Color</a> | string</span>, groundColor : <span class="param-type">number | <a href="Color.html">Color</a> | string</span>, intensity : <span class="param-type">number</span> )</span> </h3>
  28. <div class="method">
  29. <div class="description">
  30. <p>Constructs a new hemisphere light.</p>
  31. </div>
  32. <table class="params">
  33. <tbody>
  34. <tr>
  35. <td class="name">
  36. <strong>skyColor</strong>
  37. </td>
  38. <td class="description last">
  39. <p>The light's sky color.</p>
  40. <p>Default is <code>0xffffff</code>.</p>
  41. </td>
  42. </tr>
  43. <tr>
  44. <td class="name">
  45. <strong>groundColor</strong>
  46. </td>
  47. <td class="description last">
  48. <p>The light's ground color.</p>
  49. <p>Default is <code>0xffffff</code>.</p>
  50. </td>
  51. </tr>
  52. <tr>
  53. <td class="name">
  54. <strong>intensity</strong>
  55. </td>
  56. <td class="description last">
  57. <p>The light's strength/intensity.</p>
  58. <p>Default is <code>1</code>.</p>
  59. </td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. </div>
  64. </div>
  65. <h2 class="subsection-title">Properties</h2>
  66. <div class="member">
  67. <h3 class="name" id="groundColor" translate="no">.<a href="#groundColor">groundColor</a><span class="type-signature"> : <a href="Color.html">Color</a></span> </h3>
  68. <div class="description">
  69. <p>The light's ground color.</p>
  70. </div>
  71. </div>
  72. <div class="member">
  73. <h3 class="name" id="isHemisphereLight" translate="no">.<a href="#isHemisphereLight">isHemisphereLight</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  74. <div class="description">
  75. <p>This flag can be used for type testing.</p>
  76. <p>Default is <code>true</code>.</p>
  77. </div>
  78. </div>
  79. <h2 class="subsection-title">Source</h2>
  80. <p>
  81. <a href="https://github.com/mrdoob/three.js/blob/master/src/lights/HemisphereLight.js" translate="no" target="_blank" rel="noopener">src/lights/HemisphereLight.js</a>
  82. </p>
  83. </article>
  84. </section>
  85. <script src="../scripts/linenumber.js"></script>
  86. <script src="../scripts/page.js"></script>
  87. </body>
  88. </html>
粤ICP备19079148号