PointLightHelper.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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:Mesh] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">
  14. This displays a helper object consisting of a spherical [page:Mesh] for visualizing
  15. a [page:PointLight].
  16. </div>
  17. <h2>Example</h2>
  18. [example:webgl_helpers WebGL / helpers]
  19. <code>
  20. var pointLight = new THREE.PointLight( 0xff0000, 1, 100 );
  21. pointLight.position.set( 10, 10, 10 );
  22. scene.add( pointLight );
  23. var sphereSize = 1;
  24. var pointLightHelper = new THREE.PointLightHelper( pointLight, sphereSize );
  25. scene.add( pointLightHelper );
  26. </code>
  27. <h2>Constructor</h2>
  28. <h3>[name]( [page:PointLight light], [page:Float sphereSize] )</h3>
  29. <div>
  30. [page:PointLight light] -- The light to be visualized. <br />
  31. [page:Float sphereSize] -- (optional) The size of the sphere helper. Default is *1*.
  32. </div>
  33. <h2>Properties</h2>
  34. <div>See the base [page:Mesh] class for common properties.</div>
  35. <h3>[property:PointLight light]</h3>
  36. <div>The [page:PointLight] that is being visualized.</div>
  37. <h3>[property:object matrix]</h3>
  38. <div>Reference to the pointLight's [page:Object3D.matrixWorld matrixWorld].</div>
  39. <h3>[property:object matrixAutoUpdate]</h3>
  40. <div>
  41. See [page:Object3D.matrixAutoUpdate]. Set to *false* here as the helper is using the
  42. pointLight's [page:Object3D.matrixWorld matrixWorld].
  43. </div>
  44. <h2>Methods</h2>
  45. <div>See the base [page:Mesh] class for common methods.</div>
  46. <h3>[method:null dispose]()</h3>
  47. <div>Dispose of the pointLightHelper.</div>
  48. <h3>[method:null update]()</h3>
  49. <div>Updates the helper to match the position of the [page:.light].</div>
  50. <h2>Source</h2>
  51. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  52. </body>
  53. </html>