2
0

HemisphereLight.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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. 光源直接放置于场景之上,光照颜色从天空光线颜色渐变到地面光线颜色。
  14. <br /><br />
  15. 半球光不能投射阴影。
  16. </p>
  17. <h2>代码示例</h2>
  18. <code>
  19. const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 );
  20. scene.add( light );
  21. </code>
  22. <h2>例子</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] - (可选参数) 天空中发出光线的颜色。 缺省值 0xffffff。<br />
  34. [page:Integer groundColor] - (可选参数) 地面发出光线的颜色。 缺省值 0xffffff。<br />
  35. [page:Float intensity] - (可选参数) 光照强度。 缺省值 1。<br /><br />
  36. 创建一个半球光。
  37. </p>
  38. <h2>属性(Properties)</h2>
  39. <p>
  40. 公共属性请查看基类[page:Light Light]。
  41. </p>
  42. <h3>[property:Boolean castShadow]</h3>
  43. <p>
  44. 该参数在构造时被设置为 *undefined* 因为半球光不能投射阴影。
  45. </p>
  46. <h3>[property:Float color]</h3>
  47. <p>
  48. 在构造时传递的天空发出光线的颜色。
  49. 默认会创建 [page:Color] 并设置为白色(0xffffff)。
  50. </p>
  51. <h3>[property:Float groundColor]</h3>
  52. <p>
  53. 在构造时传递的地面发出光线的颜色。
  54. 默认会创建 [page:Color] 并设置为白色(0xffffff)。
  55. </p>
  56. <h3>[property:Boolean isHemisphereLight]</h3>
  57. <p>
  58. Read-only flag to check if a given object is of type [name].
  59. </p>
  60. <h3>[property:Vector3 position]</h3>
  61. <p>
  62. 假如这个值设置等于 [page:Object3D.DEFAULT_UP] (0, 1, 0),那么光线将会从上往下照射。
  63. </p>
  64. <h2>方法(Methods)</h2>
  65. <p>公共方法请查看基类 [page:Light Light]。</p>
  66. <h3>[method:this copy]( [param:HemisphereLight source] )</h3>
  67. <p>
  68. 从[page:Light source]复制 [page:.color color], [page:.intensity intensity] 和
  69. [page:.groundColor groundColor] 的值到当前半球光对象中。
  70. </p>
  71. <h2>源码</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>