SpotLightHelper.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 overrideColor] )</h3>
  29. <div>
  30. [page:SpotLight light] -- The [page:SpotLight] to be visualized. <br /><br/>
  31. [page:Hex overrideColor] -- (optional) by default the helper will take the color of the light.
  32. In cases where this makes the helper difficult to see
  33. (for example a white light against a white background) you can directly set the color here.
  34. </div>
  35. <h2>Properties</h2>
  36. <div>See the base [page:Object3D] class for common properties.</div>
  37. <h3>[property:LineSegments cone]</h3>
  38. <div>[page:LineSegments] used to visualize the light.</div>
  39. <h3>[property:SpotLight light]</h3>
  40. <div>Reference to the [page:SpotLight] being visualized.</div>
  41. <h3>[property:object matrix]</h3>
  42. <div>Reference to the spotLight's [page:Object3D.matrixWorld matrixWorld].</div>
  43. <h3>[property:object matrixAutoUpdate]</h3>
  44. <div>
  45. See [page:Object3D.matrixAutoUpdate]. Set to *false* here as the helper is using the
  46. spotLight's [page:Object3D.matrixWorld matrixWorld].
  47. </div>
  48. <h3>[property:hex overrideColor]</h3>
  49. <div>
  50. A color that overrides the default color of the helper. If this was not passed in the constructor
  51. but is set later, the helper's color will update the next time [page:.update update] is called.
  52. </div>
  53. <h2>Methods</h2>
  54. <div>See the base [page:Object3D] class for common methods.</div>
  55. <h3>[method:null dispose]()</h3>
  56. <div>Disposes of the light helper.</div>
  57. <h3>[method:null update]()</h3>
  58. <div>Updates the light helper.</div>
  59. <h2>Source</h2>
  60. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  61. </body>
  62. </html>