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 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_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>[name]( [param:Integer skyColor], [param:Integer groundColor], [param:Float intensity] )</h3>
  32. <p>
  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. </p>
  38. <h2>Properties</h2>
  39. <p>
  40. See the base [page:Light Light] class for common properties.
  41. </p>
  42. <h3>[property:Float color]</h3>
  43. <p>
  44. The light's sky color, as passed in the constructor.
  45. Default is a new [page:Color] set to white (0xffffff).
  46. </p>
  47. <h3>[property:Float groundColor]</h3>
  48. <p>
  49. The light's ground color, as passed in the constructor.
  50. Default is a new [page:Color] set to white (0xffffff).
  51. </p>
  52. <h3>[property:Boolean isHemisphereLight]</h3>
  53. <p>
  54. Read-only flag to check if a given object is of type [name].
  55. </p>
  56. <h3>[property:Vector3 position]</h3>
  57. <p>
  58. This is set equal to [page:Object3D.DefaultUp] (0, 1, 0), so that the light shines from the top down.
  59. </p>
  60. <h2>Methods</h2>
  61. <p>See the base [page:Light Light] class for common methods.</p>
  62. <h3>[method:this copy]( [param:HemisphereLight source] )</h3>
  63. <p>
  64. Copies the value of [page:.color color], [page:.intensity intensity] and
  65. [page:.groundColor groundColor] from the [page:Light source] light into this one.
  66. </p>
  67. <h2>Source</h2>
  68. <p>
  69. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  70. </p>
  71. </body>
  72. </html>