LensFlare.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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">Creates a simulated lens flare that tracks a light.<br /><br />
  14. Note: [page:WebGLRenderer] must have *alpha* set to *true* for LensFlare to work.</div>
  15. <h2>Example</h2>
  16. <div>[example:webgl_lensflares lensflares]</div>
  17. <h2>Constructor</h2>
  18. <h3>[name]( [page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color] )</h3>
  19. <div>
  20. texture -- THREE.Texture (optional) <br />
  21. size -- size in pixels (-1 = use texture.width) <br />
  22. distance -- (0-1) from light source (0 = at light source) <br />
  23. blending -- [page:Materials Blending Mode] - Defaults to THREE.NormalBlending <br />
  24. color -- The color of the lens flare
  25. </div>
  26. <div>
  27. Automatically adds a lens flare to the lensFlares array if a texture is set.
  28. </div>
  29. <h2>Properties</h2>
  30. <h3>[property:array lensFlares]</h3>
  31. <div>
  32. The array of flares as set by [page:LensFlare.add]
  33. </div>
  34. <h3>[property:Vector3 positionScreen]</h3>
  35. <div>
  36. The position of the lens flare on the screen.
  37. </div>
  38. <h3>[property:Function customUpdateCallback]</h3>
  39. <div>
  40. A custom update callback
  41. </div>
  42. <h2>Methods</h2>
  43. <h3>[method:null add]( [page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color] )</h3>
  44. <div>
  45. Adds a lens flare. See the constructor for details on the parameters.
  46. </div>
  47. <h3>[method:null updateLensFlares]()</h3>
  48. <div>
  49. Updates the lens flare based on the [page:LensFlare.positionScreen positionScreen] property.
  50. </div>
  51. <h3>[method:Lens Flare clone]()</h3>
  52. <div>
  53. Returns a clone of this LensFlare object and its descendants.
  54. </div>
  55. <h2>Source</h2>
  56. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  57. </body>
  58. </html>