SpotLightHelper.html 2.5 KB

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