ReflectorForSSRPass.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ReflectorForSSRPass - 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. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="Mesh.html">Mesh</a> → </p>
  13. <h1 translate="no">ReflectorForSSRPass</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A special version of <a href="Reflector.html">Reflector</a> for usage with <a href="SSRPass.html">SSRPass</a>.</p></div>
  17. </header>
  18. <article>
  19. <h2 class="subsection-title">Import</h2>
  20. <p><span translate="no">ReflectorForSSRPass</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  21. <pre><code class="language-js">import { ReflectorForSSRPass } from 'three/addons/objects/ReflectorForSSRPass.js';</code></pre>
  22. <div class="container-overview">
  23. <h2>Constructor</h2>
  24. <h3 class="name name-method" id="ReflectorForSSRPass" translate="no">new <a href="#ReflectorForSSRPass">ReflectorForSSRPass</a><span class="signature">( geometry : <span class="param-type">BufferGeometry</span>, options : <span class="param-type">ReflectorForSSRPass~Options</span> )</span> </h3>
  25. <div class="method">
  26. <div class="description">
  27. <p>Constructs a new reflector.</p>
  28. </div>
  29. <table class="params">
  30. <tbody>
  31. <tr>
  32. <td class="name"><code>geometry</code></td>
  33. <td class="description last"><p>The reflector's geometry.</p></td>
  34. </tr>
  35. <tr>
  36. <td class="name"><code>options</code></td>
  37. <td class="description last"><p>The configuration options.</p></td>
  38. </tr>
  39. </tbody>
  40. </table>
  41. </div>
  42. </div>
  43. <h2 class="subsection-title">Methods</h2>
  44. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  45. <div class="method">
  46. <div class="description">
  47. <p>Frees the GPU-related resources allocated by this instance. Call this
  48. method whenever this instance is no longer used in your app.</p>
  49. </div>
  50. </div>
  51. <h3 class="name name-method" id="getRenderTarget" translate="no">.<a href="#getRenderTarget">getRenderTarget</a><span class="signature">()</span><span class="type-signature"> : <a href="WebGLRenderTarget.html">WebGLRenderTarget</a></span> </h3>
  52. <div class="method">
  53. <div class="description">
  54. <p>Returns the reflector's internal render target.</p>
  55. </div>
  56. <dl class="details">
  57. <dt class="tag-returns"><strong>Returns:</strong> The internal render target</dt>
  58. </dl>
  59. </div>
  60. <h2 class="subsection-title">Type Definitions</h2>
  61. <div class="member">
  62. <h3 class="name" id="~Options" translate="no">.<a href="#~Options">Options</a> </h3>
  63. <div class="description">
  64. <p>Constructor options of <code>ReflectorForSSRPass</code>.</p>
  65. </div>
  66. <h5 class="subsection-title">Properties:</h5>
  67. <table class="props">
  68. <thead>
  69. <tr>
  70. <th>Name</th>
  71. <th>Type</th>
  72. <th>Attributes</th>
  73. <th>Default</th>
  74. <th class="last">Description</th>
  75. </tr>
  76. </thead>
  77. <tbody>
  78. <tr>
  79. <td class="name"><code>color</code></td>
  80. <td class="type">
  81. <span class="param-type">number</span>
  82. |
  83. <span class="param-type"><a href="Color.html">Color</a></span>
  84. |
  85. <span class="param-type">string</span>
  86. </td>
  87. <td class="attributes">
  88. &lt;optional><br>
  89. </td>
  90. <td class="default">
  91. 0x7F7F7F
  92. </td>
  93. <td class="description last"><p>The reflector's color.</p></td>
  94. </tr>
  95. <tr>
  96. <td class="name"><code>textureWidth</code></td>
  97. <td class="type">
  98. <span class="param-type">number</span>
  99. </td>
  100. <td class="attributes">
  101. &lt;optional><br>
  102. </td>
  103. <td class="default">
  104. 512
  105. </td>
  106. <td class="description last"><p>The texture width. A higher value results in more clear reflections but is also more expensive.</p></td>
  107. </tr>
  108. <tr>
  109. <td class="name"><code>textureHeight</code></td>
  110. <td class="type">
  111. <span class="param-type">number</span>
  112. </td>
  113. <td class="attributes">
  114. &lt;optional><br>
  115. </td>
  116. <td class="default">
  117. 512
  118. </td>
  119. <td class="description last"><p>The texture height. A higher value results in more clear reflections but is also more expensive.</p></td>
  120. </tr>
  121. <tr>
  122. <td class="name"><code>clipBias</code></td>
  123. <td class="type">
  124. <span class="param-type">number</span>
  125. </td>
  126. <td class="attributes">
  127. &lt;optional><br>
  128. </td>
  129. <td class="default">
  130. 0
  131. </td>
  132. <td class="description last"><p>The clip bias.</p></td>
  133. </tr>
  134. <tr>
  135. <td class="name"><code>shader</code></td>
  136. <td class="type">
  137. <span class="param-type">Object</span>
  138. </td>
  139. <td class="attributes">
  140. &lt;optional><br>
  141. </td>
  142. <td class="default">
  143. </td>
  144. <td class="description last"><p>Can be used to pass in a custom shader that defines how the reflective view is projected onto the reflector's geometry.</p></td>
  145. </tr>
  146. <tr>
  147. <td class="name"><code>useDepthTexture</code></td>
  148. <td class="type">
  149. <span class="param-type">boolean</span>
  150. </td>
  151. <td class="attributes">
  152. &lt;optional><br>
  153. </td>
  154. <td class="default">
  155. true
  156. </td>
  157. <td class="description last"><p>Whether to store depth values in a texture or not.</p></td>
  158. </tr>
  159. <tr>
  160. <td class="name"><code>resolution</code></td>
  161. <td class="type">
  162. <span class="param-type"><a href="Vector2.html">Vector2</a></span>
  163. </td>
  164. <td class="attributes">
  165. &lt;optional><br>
  166. </td>
  167. <td class="default">
  168. </td>
  169. <td class="description last"><p>Resolution for the Reflector Pass.</p></td>
  170. </tr>
  171. </tbody>
  172. </table>
  173. </div>
  174. <h2 class="subsection-title">Source</h2>
  175. <p>
  176. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/ReflectorForSSRPass.js" target="_blank" rel="noopener" translate="no">examples/jsm/objects/ReflectorForSSRPass.js</a>
  177. </p>
  178. </article>
  179. </section>
  180. <script src="../scripts/linenumber.js"></script>
  181. <script src="../scripts/page.js"></script>
  182. </body>
  183. </html>
粤ICP备19079148号