HemisphereLight.html 2.9 KB

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