LensFlare.html 2.1 KB

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