LensFlare.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. <div>See the base [page:Object3D] class for common properties.</div>
  31. <h3>[property:array lensFlares]</h3>
  32. <div>
  33. The array of flares as set by [page:LensFlare.add]
  34. </div>
  35. <h3>[property:Vector3 positionScreen]</h3>
  36. <div>
  37. The position of the lens flare on the screen.
  38. </div>
  39. <h3>[property:Function customUpdateCallback]</h3>
  40. <div>
  41. A custom update callback
  42. </div>
  43. <h2>Methods</h2>
  44. <div>See the base [page:Object3D] class for common methods.</div>
  45. <h3>[method:null add]( [page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color] )</h3>
  46. <div>
  47. Adds a lens flare. See the constructor for details on the parameters.
  48. </div>
  49. <h3>[method:null updateLensFlares]()</h3>
  50. <div>
  51. Updates the lens flare based on the [page:LensFlare.positionScreen positionScreen] property.
  52. </div>
  53. <h3>[method:Lens Flare clone]()</h3>
  54. <div>
  55. Returns a clone of this LensFlare object and its descendants.
  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>
粤ICP备19079148号