HemisphereLight.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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; [page:Light] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. A light source positioned directly above the scene, with color fading from the
  14. sky color to the ground color. <br /><br />
  15. This light cannot be used to cast shadows.
  16. </p>
  17. <h2>Code Example</h2>
  18. <code>
  19. const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 );
  20. scene.add( light );
  21. </code>
  22. <h2>Examples</h2>
  23. <p>
  24. [example:webgl_lights_hemisphere lights / hemisphere ]<br />
  25. [example:misc_controls_pointerlock controls / pointerlock ]<br />
  26. [example:webgl_decals decals ]<br />
  27. [example:webgl_loader_collada_kinematics loader / collada / kinematics ]<br />
  28. [example:webgl_materials_lightmap materials / lightmap ]<br />
  29. [example:webgl_shaders_ocean shaders / ocean ]
  30. </p>
  31. <h2>Constructor</h2>
  32. <h3>[name]( [param:Integer skyColor], [param:Integer groundColor], [param:Float intensity] )</h3>
  33. <p>
  34. [page:Integer skyColor] - (optional) hexadecimal color of the sky. Default is 0xffffff.<br />
  35. [page:Integer groundColor] - (optional) hexadecimal color of the ground. Default is 0xffffff.<br />
  36. [page:Float intensity] - (optional) numeric value of the light's strength/intensity. Default is 1.<br /><br />
  37. Creates a new [name].
  38. </p>
  39. <h2>Properties</h2>
  40. <p>
  41. See the base [page:Light Light] class for common properties.
  42. </p>
  43. <h3>[property:Float color]</h3>
  44. <p>
  45. The light's sky color, as passed in the constructor.
  46. Default is a new [page:Color] set to white (0xffffff).
  47. </p>
  48. <h3>[property:Float groundColor]</h3>
  49. <p>
  50. The light's ground color, as passed in the constructor.
  51. Default is a new [page:Color] set to white (0xffffff).
  52. </p>
  53. <h3>[property:Vector3 position]</h3>
  54. <p>
  55. This is set equal to [page:Object3D.DefaultUp] (0, 1, 0), so that the light shines from the top down.
  56. </p>
  57. <h2>Methods</h2>
  58. <p>See the base [page:Light Light] class for common methods.</p>
  59. <h3>[method:HemisphereLight copy]( [param:HemisphereLight source] )</h3>
  60. <p>
  61. Copies the value of [page:.color color], [page:.intensity intensity] and
  62. [page:.groundColor groundColor] from the [page:Light source] light into this one.
  63. </p>
  64. <h2>Source</h2>
  65. <p>
  66. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  67. </p>
  68. </body>
  69. </html>