1
0

RectAreaLightHelper.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. 创建一个表示 [page:RectAreaLight] 的辅助对象.
  14. </p>
  15. <h2>导入</h2>
  16. <p>
  17. [name] 是一个附加组件,必须显式导入。
  18. See [link:#manual/introduction/Installation Installation / Addons].
  19. </p>
  20. <code>
  21. import { RectAreaLightHelper } from 'three/addons/helpers/RectAreaLightHelper.js';
  22. </code>
  23. <h2>代码示例</h2>
  24. <code>
  25. const light = new THREE.RectAreaLight( 0xffffbb, 1.0, 5, 5 );
  26. const helper = new RectAreaLightHelper( light );
  27. scene.add( helper );
  28. </code>
  29. <h2>构造函数</h2>
  30. <h3>[name]( [param:RectAreaLight light], [param:Hex color] )</h3>
  31. <p>
  32. [page:RectAreaLight light] -- 被模拟的光源.<br /><br />
  33. [page:Hex color] -- (可选) 如果没有赋值辅助对象将使用光源的颜色.
  34. </p>
  35. <h2>属性</h2>
  36. <p>请到基类 [page:Object3D] 页面查看公共属性.</p>
  37. <h3>[property:RectAreaLight light]</h3>
  38. <p>被模拟的区域光源.</p>
  39. <h3>[property:hex color]</h3>
  40. <p>
  41. 构造函数中传入的颜色值. 默认为 *undefined*. 如果改变该值,
  42. 辅助对象的颜色将在下一次 [page:.update update] 被调用时更新.
  43. </p>
  44. <h2>方法</h2>
  45. <p>请到基类 [page:Object3D] 页面查看公共方法.</p>
  46. <h3>[method:undefined dispose]()</h3>
  47. <p>销毁该区域光源辅助对象.</p>
  48. <h2>源代码</h2>
  49. <p>
  50. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/helpers/RectAreaLightHelper.js examples/jsm/helpers/RectAreaLightHelper.js]
  51. </p>
  52. </body>
  53. </html>