HemisphereLight.html 2.7 KB

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