SpotLightHelper.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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])</h3>
  29. <div>light -- The [page:SpotLight] to be visualized.</div>
  30. <h2>Properties</h2>
  31. <div>See the base [page:Object3D] class for common properties.</div>
  32. <h3>[property:LineSegments cone]</h3>
  33. <div>[page:LineSegments] used to visualize the light.</div>
  34. <h3>[property:SpotLight light]</h3>
  35. <div>Reference to the [page:SpotLight] being visualized.</div>
  36. <h3>[property:object matrix]</h3>
  37. <div>Reference to the spotLight's [page:Object3D.matrixWorld matrixWorld].</div>
  38. <h3>[property:object matrixAutoUpdate]</h3>
  39. <div>
  40. See [page:Object3D.matrixAutoUpdate]. Set to *false* here as the helper is using the
  41. spotLight's [page:Object3D.matrixWorld matrixWorld].
  42. </div>
  43. <h2>Methods</h2>
  44. <div>See the base [page:Object3D] class for common methods.</div>
  45. <h3>[method:null update]()</h3>
  46. <div>Disposes of the light helper.</div>
  47. <h3>[method:null update]()</h3>
  48. <div>Updates the light helper.</div>
  49. <h2>Source</h2>
  50. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  51. </body>
  52. </html>