Light.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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. <h2>Methods</h2>
  40. <p>
  41. 公共方法请查看基类 [page:Object3D Object3D]。
  42. </p>
  43. <h3>[method:Light copy]( [param:Light source] )</h3>
  44. <p>
  45. 从[page:Light source]复制 [page:.color color], [page:.intensity intensity]
  46. 的值到当前光源对象中。
  47. </p>
  48. <h3>[method:Object toJSON]( [param:object meta] )</h3>
  49. <p>
  50. 以JSON格式返回光数据。
  51. </p>
  52. <p>
  53. meta -- 包含有元数据的对象,例如该对象的材质、纹理或图片。
  54. 将该light对象转换为 three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format](three.js JSON 物体/场景格式)。
  55. </p>
  56. <h2>源码</h2>
  57. <p>
  58. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  59. </p>
  60. </body>
  61. </html>