HemisphereLight.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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
  14. the 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_animation_skinning_blending animation / skinning / blending ]<br />
  25. [example:webgl_lights_hemisphere lights / hemisphere ]<br />
  26. [example:misc_controls_pointerlock controls / pointerlock ]<br />
  27. [example:webgl_loader_collada_kinematics loader / collada / kinematics ]<br />
  28. [example:webgl_loader_stl loader / stl ]
  29. </p>
  30. <h2>Constructor</h2>
  31. <h3>
  32. [name]( [param:Integer skyColor], [param:Integer groundColor],
  33. [param:Float intensity] )
  34. </h3>
  35. <p>
  36. [page:Integer skyColor] - (optional) hexadecimal color of the sky. Default
  37. is 0xffffff.<br />
  38. [page:Integer groundColor] - (optional) hexadecimal color of the ground.
  39. Default is 0xffffff.<br />
  40. [page:Float intensity] - (optional) numeric value of the light's
  41. strength/intensity. Default is `1`.<br /><br />
  42. Creates a new [name].
  43. </p>
  44. <h2>Properties</h2>
  45. <p>See the base [page:Light Light] class for common properties.</p>
  46. <h3>[property:Float color]</h3>
  47. <p>
  48. The light's sky color, as passed in the constructor. Default is a new
  49. [page:Color] set to white (0xffffff).
  50. </p>
  51. <h3>[property:Float groundColor]</h3>
  52. <p>
  53. The light's ground color, as passed in the constructor. Default is a new
  54. [page:Color] set to white (0xffffff).
  55. </p>
  56. <h3>[property:Boolean isHemisphereLight]</h3>
  57. <p>Read-only flag to check if a given object is of type [name].</p>
  58. <h3>[property:Vector3 position]</h3>
  59. <p>
  60. This is set equal to [page:Object3D.DEFAULT_UP] (0, 1, 0), so that the
  61. light shines from the top down.
  62. </p>
  63. <h2>Methods</h2>
  64. <p>See the base [page:Light Light] class for common methods.</p>
  65. <h3>[method:this copy]( [param:HemisphereLight source] )</h3>
  66. <p>
  67. Copies the value of [page:.color color], [page:.intensity intensity] and
  68. [page:.groundColor groundColor] from the [page:Light source] light into
  69. this one.
  70. </p>
  71. <h2>Source</h2>
  72. <p>
  73. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  74. </p>
  75. </body>
  76. </html>