Light.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. 光源的基类 - 所有其他的光类型都继承了该类描述的属性和方法。
  15. </p>
  16. <h2>构造器(Constructor)</h2>
  17. <h3>[name]( [param:Integer color], [param:float intensity] )</h3>
  18. <p>
  19. [page:Integer color] - (可选参数) 16进制表示光的颜色。 缺省值 0xffffff (白色)。<br />
  20. [page:Float intensity] - (可选参数) 光照强度。 缺省值 1。<br /><br />
  21. 创造一个新的光源。注意,这并不是直接调用的(而是使用派生类之一)。
  22. </p>
  23. <h2>属性(Properties)</h2>
  24. <p>
  25. 公共属性请查看基类[page:Object3D Object3D]。
  26. </p>
  27. <h3>[property:Color color]</h3>
  28. <p>
  29. 光源的颜色。如果构造的时候没有传递,默认会创建一个新的 [page:Color] 并设置为白色。
  30. </p>
  31. <h3>[property:Float intensity]</h3>
  32. <p>
  33. 光照的强度,或者说能量。
  34. 在 [page:WebGLRenderer.physicallyCorrectLights physically correct] 模式下, [page:.color color] 和强度
  35. 的乘积被解析为以坎德拉(candela)为单位的发光强度。
  36. 默认值 - *1.0*
  37. <br />
  38. </p>
  39. <h3>[property:Boolean isLight]</h3>
  40. <p>
  41. 用来校验这个类或者派生类是不是平行光。默认是 *true*。<br /><br />
  42. 不应该去改变这个变量,因为内部使用这个变量做了些优化的工作。
  43. </p>
  44. <h2>Methods</h2>
  45. <p>
  46. 公共方法请查看基类 [page:Object3D Object3D]。
  47. </p>
  48. <h3>[method:Light copy]( [param:Light source] )</h3>
  49. <p>
  50. 从[page:Light source]复制 [page:.color color], [page:.intensity intensity]
  51. 的值到当前光源对象中。
  52. </p>
  53. <h3>[method:JSON toJSON]( [param:String meta] )</h3>
  54. <p>
  55. 以JSON格式返回光数据。
  56. </p>
  57. <h2>源码</h2>
  58. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  59. </body>
  60. </html>