LensflareElement.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LensflareElement - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <h1 translate="no">LensflareElement</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>Represents a single flare that can be added to a <a href="Lensflare.html">Lensflare</a> container.</p></div>
  16. </header>
  17. <article>
  18. <h2 class="subsection-title">Import</h2>
  19. <p><span translate="no">LensflareElement</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
  20. <pre><code class="language-js">import { LensflareElement } from 'three/addons/objects/Lensflare.js';</code></pre>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="LensflareElement" translate="no">new <a href="#LensflareElement">LensflareElement</a><span class="signature">( texture : <span class="param-type"><a href="Texture.html">Texture</a></span>, size : <span class="param-type">number</span>, distance : <span class="param-type">number</span>, color : <span class="param-type"><a href="Color.html">Color</a></span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new lensflare element.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name">
  32. <strong>texture</strong>
  33. </td>
  34. <td class="description last">
  35. <p>The flare's texture.</p>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td class="name">
  40. <strong>size</strong>
  41. </td>
  42. <td class="description last">
  43. <p>The size in pixels.</p>
  44. <p>Default is <code>1</code>.</p>
  45. </td>
  46. </tr>
  47. <tr>
  48. <td class="name">
  49. <strong>distance</strong>
  50. </td>
  51. <td class="description last">
  52. <p>The normalized distance (<code>[0,1]</code>) from the light source.
  53. A value of <code>0</code> means the flare is located at light source.</p>
  54. <p>Default is <code>0</code>.</p>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td class="name">
  59. <strong>color</strong>
  60. </td>
  61. <td class="description last">
  62. <p>The flare's color</p>
  63. </td>
  64. </tr>
  65. </tbody>
  66. </table>
  67. </div>
  68. </div>
  69. <h2 class="subsection-title">Properties</h2>
  70. <div class="member">
  71. <h3 class="name" id="color" translate="no">.<a href="#color">color</a><span class="type-signature"> : <a href="Color.html">Color</a></span> </h3>
  72. <div class="description">
  73. <p>The flare's color</p>
  74. <p>Default is <code>(1,1,1)</code>.</p>
  75. </div>
  76. </div>
  77. <div class="member">
  78. <h3 class="name" id="distance" translate="no">.<a href="#distance">distance</a><span class="type-signature"> : number</span> </h3>
  79. <div class="description">
  80. <p>The normalized distance (<code>[0,1]</code>) from the light source.
  81. A value of <code>0</code> means the flare is located at light source.</p>
  82. <p>Default is <code>0</code>.</p>
  83. </div>
  84. </div>
  85. <div class="member">
  86. <h3 class="name" id="size" translate="no">.<a href="#size">size</a><span class="type-signature"> : number</span> </h3>
  87. <div class="description">
  88. <p>The size in pixels.</p>
  89. <p>Default is <code>1</code>.</p>
  90. </div>
  91. </div>
  92. <div class="member">
  93. <h3 class="name" id="texture" translate="no">.<a href="#texture">texture</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  94. <div class="description">
  95. <p>The flare's texture.</p>
  96. </div>
  97. </div>
  98. <h2 class="subsection-title">Source</h2>
  99. <p>
  100. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Lensflare.js" translate="no" target="_blank" rel="noopener">examples/jsm/objects/Lensflare.js</a>
  101. </p>
  102. </article>
  103. </section>
  104. <script src="../scripts/linenumber.js"></script>
  105. <script src="../scripts/page.js"></script>
  106. </body>
  107. </html>
粤ICP备19079148号