SpotLightHelper.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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">用于模拟聚光灯 [page:SpotLight] 的锥形辅助对象.</p>
  13. <h2>代码示例</h2>
  14. <code>
  15. const spotLight = new THREE.SpotLight( 0xffffff );
  16. spotLight.position.set( 10, 10, 10 );
  17. scene.add( spotLight );
  18. const spotLightHelper = new THREE.SpotLightHelper( spotLight );
  19. scene.add( spotLightHelper );
  20. </code>
  21. <h2>例子</h2>
  22. <p>[example:webgl_lights_spotlights WebGL / lights / spotlights ]</p>
  23. <h2>构造函数</h2>
  24. <h3>[name]( [param:SpotLight light], [param:Hex color] )</h3>
  25. <p>
  26. [page:SpotLight light] -- 被模拟的聚光灯 [page:SpotLight] . <br /><br/>
  27. [page:Hex color] -- (可选的) 如果没有赋值辅助对象将使用光源的颜色.
  28. </p>
  29. <h2>属性</h2>
  30. <p>请到基类 [page:Object3D] 页面查看公共属性.</p>
  31. <h3>[property:LineSegments cone]</h3>
  32. <p>用于模拟光源的 [page:LineSegments] 类型对象.</p>
  33. <h3>[property:SpotLight light]</h3>
  34. <p>被模拟的聚光灯 [page:SpotLight] .</p>
  35. <h3>[property:Object matrix]</h3>
  36. <p>请参考聚光灯的世界矩阵 [page:Object3D.matrixWorld matrixWorld].</p>
  37. <h3>[property:Object matrixAutoUpdate]</h3>
  38. <p>
  39. 请查看 [page:Object3D.matrixAutoUpdate]. 这里设置为 *false* 表示辅助对象
  40. 使用聚光灯的 [page:Object3D.matrixWorld matrixWorld].
  41. </p>
  42. <h3>[property:hex color]</h3>
  43. <p>
  44. 构造函数中传入的颜色值. 默认为 *undefined*. 如果改变该值,
  45. 辅助对象的颜色将在下一次 [page:.update update] 被调用时更新.
  46. </p>
  47. <h2>方法</h2>
  48. <p>请到基类 [page:Object3D] 页面查看公共属性.</p>
  49. <h3>[method:undefined dispose]()</h3>
  50. <p>销毁该聚光灯辅助对象.</p>
  51. <h3>[method:undefined update]()</h3>
  52. <p>更新聚光灯辅助对象.</p>
  53. <h2>源码</h2>
  54. <p>
  55. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  56. </p>
  57. </body>
  58. </html>