1
0

SpotLightHelper.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html lang="en">
  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">
  13. This displays a cone shaped helper object for a [page:SpotLight].
  14. </p>
  15. <h2>Code Example</h2>
  16. <code>
  17. const spotLight = new THREE.SpotLight( 0xffffff );
  18. spotLight.position.set( 10, 10, 10 );
  19. scene.add( spotLight );
  20. const spotLightHelper = new THREE.SpotLightHelper( spotLight );
  21. scene.add( spotLightHelper );
  22. </code>
  23. <h2>Examples</h2>
  24. <p>[example:webgl_lights_spotlights WebGL/ lights / spotlights ]</p>
  25. <h2>Constructor</h2>
  26. <h3>[name]( [param:SpotLight light], [param:Hex color] )</h3>
  27. <p>
  28. [page:SpotLight light] -- The [page:SpotLight] to be visualized.
  29. <br /><br />
  30. [page:Hex color] -- (optional) if this is not the set the helper will take
  31. the color of the light.
  32. </p>
  33. <h2>Properties</h2>
  34. <p>See the base [page:Object3D] class for common properties.</p>
  35. <h3>[property:LineSegments cone]</h3>
  36. <p>[page:LineSegments] used to visualize the light.</p>
  37. <h3>[property:SpotLight light]</h3>
  38. <p>Reference to the [page:SpotLight] being visualized.</p>
  39. <h3>[property:Object matrix]</h3>
  40. <p>Reference to the spotLight's [page:Object3D.matrixWorld matrixWorld].</p>
  41. <h3>[property:Object matrixAutoUpdate]</h3>
  42. <p>
  43. See [page:Object3D.matrixAutoUpdate]. Set to `false` here as the helper is
  44. using the spotLight's [page:Object3D.matrixWorld matrixWorld].
  45. </p>
  46. <h3>[property:hex color]</h3>
  47. <p>
  48. The color parameter passed in the constructor. Default is `undefined`. If
  49. this is changed, the helper's color will update the next time
  50. [page:.update update] is called.
  51. </p>
  52. <h2>Methods</h2>
  53. <p>See the base [page:Object3D] class for common methods.</p>
  54. <h3>[method:undefined dispose]()</h3>
  55. <p>
  56. Frees the GPU-related resources allocated by this instance. Call this
  57. method whenever this instance is no longer used in your app.
  58. </p>
  59. <h3>[method:undefined update]()</h3>
  60. <p>Updates the light helper.</p>
  61. <h2>Source</h2>
  62. <p>
  63. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  64. </p>
  65. </body>
  66. </html>