Light.html 2.1 KB

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