2
0

SpotLightHelper.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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">This displays a cone shaped helper object for a [page:SpotLight].</p>
  14. <h2>Code Example</h2>
  15. <code>
  16. var spotLight = new THREE.SpotLight( 0xffffff );
  17. spotLight.position.set( 10, 10, 10 );
  18. scene.add( spotLight );
  19. var spotLightHelper = new THREE.SpotLightHelper( spotLight );
  20. scene.add( spotLightHelper );
  21. </code>
  22. <h2>Examples</h2>
  23. <p>
  24. [example:webgl_lights_spotlights WebGL/ lights / spotlights ]
  25. </p>
  26. <h2>Constructor</h2>
  27. <h3>[name]( [param:SpotLight light], [param:Hex color] )</h3>
  28. <p>
  29. [page:SpotLight light] -- The [page:SpotLight] to be visualized. <br /><br/>
  30. [page:Hex color] -- (optional) if this is not the set the helper will take the color of the light.
  31. </p>
  32. <h2>Properties</h2>
  33. <p>See the base [page:Object3D] class for common properties.</p>
  34. <h3>[property:LineSegments cone]</h3>
  35. <p>[page:LineSegments] used to visualize the light.</p>
  36. <h3>[property:SpotLight light]</h3>
  37. <p>Reference to the [page:SpotLight] being visualized.</p>
  38. <h3>[property:object matrix]</h3>
  39. <p>Reference to the spotLight's [page:Object3D.matrixWorld matrixWorld].</p>
  40. <h3>[property:object matrixAutoUpdate]</h3>
  41. <p>
  42. See [page:Object3D.matrixAutoUpdate]. Set to *false* here as the helper is using the
  43. spotLight's [page:Object3D.matrixWorld matrixWorld].
  44. </p>
  45. <h3>[property:hex color]</h3>
  46. <p>
  47. The color parameter passed in the constructor. Default is *undefined*. If this is changed, the helper's color will update
  48. the next time [page:.update update] is called.
  49. </p>
  50. <h2>Methods</h2>
  51. <p>See the base [page:Object3D] class for common methods.</p>
  52. <h3>[method:null dispose]()</h3>
  53. <p>Disposes of the light helper.</p>
  54. <h3>[method:null update]()</h3>
  55. <p>Updates the light helper.</p>
  56. <h2>Source</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>