LensFlare.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  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. <div class="desc">Creates a simulated lens flare that tracks a light</div>
  13. <h2>Example</h2>
  14. <div>[example:webgl_lensflares lensflares]</div>
  15. <h2>Constructor</h2>
  16. <h3>[name]([page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color])</h3>
  17. <div>
  18. texture -- THREE.Texture (optional) <br />
  19. size -- size in pixels (-1 = use texture.width) <br />
  20. distance -- (0-1) from light source (0 = at light source) <br />
  21. blending -- [page:Materials Blending Mode] - Defaults to THREE.NormalBlending <br />
  22. color -- The color of the lens flare
  23. </div>
  24. <div>
  25. Automatically adds a lens flare to the lensFlares array if a texture is set.
  26. </div>
  27. <h2>Properties</h2>
  28. <h3>[property:array lensFlares]</h3>
  29. <div>
  30. The array of flares as set by [page:LensFlare.add]
  31. </div>
  32. <h3>[property:Vector3 positionScreen]</h3>
  33. <div>
  34. The position of the lens flare on the screen.
  35. </div>
  36. <h3>[property:Function customUpdateCallback]</h3>
  37. <div>
  38. A custom update callback
  39. </div>
  40. <h2>Methods</h2>
  41. <h3>[method:null add]([page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color])</h3>
  42. <div>
  43. Adds a lens flare. See the constructor for details on the parameters.
  44. </div>
  45. <h3>[method:null updateLensFlares]()</h3>
  46. <div>
  47. Updates the lens flare based on the [page:LensFlare.positionScreen positionScreen] property.
  48. </div>
  49. <h3>[method:Object3D clone]([page:Object3D object])</h3>
  50. <div>
  51. object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned LensFlare Object.
  52. </div>
  53. <div>
  54. Clone a LensFlare Object.
  55. </div>
  56. <h2>Source</h2>
  57. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  58. </body>
  59. </html>