1
0

DepthTexture.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>DepthTexture - 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="Texture.html">Texture</a> → </p>
  13. <h1 translate="no">DepthTexture</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This class can be used to automatically save the depth information of a
  17. rendering into a texture.</p></div>
  18. </header>
  19. <article>
  20. <div class="container-overview">
  21. <h2>Constructor</h2>
  22. <h3 class="name name-method" id="DepthTexture" translate="no">new <a href="#DepthTexture">DepthTexture</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, type : <span class="param-type">number</span>, mapping : <span class="param-type">number</span>, wrapS : <span class="param-type">number</span>, wrapT : <span class="param-type">number</span>, magFilter : <span class="param-type">number</span>, minFilter : <span class="param-type">number</span>, anisotropy : <span class="param-type">number</span>, format : <span class="param-type">number</span>, depth : <span class="param-type">number</span> )</span> </h3>
  23. <div class="method">
  24. <div class="description">
  25. <p>Constructs a new depth texture.</p>
  26. </div>
  27. <table class="params">
  28. <tbody>
  29. <tr>
  30. <td class="name">
  31. <strong>width</strong>
  32. </td>
  33. <td class="description last">
  34. <p>The width of the texture.</p>
  35. </td>
  36. </tr>
  37. <tr>
  38. <td class="name">
  39. <strong>height</strong>
  40. </td>
  41. <td class="description last">
  42. <p>The height of the texture.</p>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class="name">
  47. <strong>type</strong>
  48. </td>
  49. <td class="description last">
  50. <p>The texture type.</p>
  51. <p>Default is <code>UnsignedIntType</code>.</p>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td class="name">
  56. <strong>mapping</strong>
  57. </td>
  58. <td class="description last">
  59. <p>The texture mapping.</p>
  60. <p>Default is <code>Texture.DEFAULT_MAPPING</code>.</p>
  61. </td>
  62. </tr>
  63. <tr>
  64. <td class="name">
  65. <strong>wrapS</strong>
  66. </td>
  67. <td class="description last">
  68. <p>The wrapS value.</p>
  69. <p>Default is <code>ClampToEdgeWrapping</code>.</p>
  70. </td>
  71. </tr>
  72. <tr>
  73. <td class="name">
  74. <strong>wrapT</strong>
  75. </td>
  76. <td class="description last">
  77. <p>The wrapT value.</p>
  78. <p>Default is <code>ClampToEdgeWrapping</code>.</p>
  79. </td>
  80. </tr>
  81. <tr>
  82. <td class="name">
  83. <strong>magFilter</strong>
  84. </td>
  85. <td class="description last">
  86. <p>The mag filter value.</p>
  87. <p>Default is <code>LinearFilter</code>.</p>
  88. </td>
  89. </tr>
  90. <tr>
  91. <td class="name">
  92. <strong>minFilter</strong>
  93. </td>
  94. <td class="description last">
  95. <p>The min filter value.</p>
  96. <p>Default is <code>LinearFilter</code>.</p>
  97. </td>
  98. </tr>
  99. <tr>
  100. <td class="name">
  101. <strong>anisotropy</strong>
  102. </td>
  103. <td class="description last">
  104. <p>The anisotropy value.</p>
  105. <p>Default is <code>Texture.DEFAULT_ANISOTROPY</code>.</p>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td class="name">
  110. <strong>format</strong>
  111. </td>
  112. <td class="description last">
  113. <p>The texture format.</p>
  114. <p>Default is <code>DepthFormat</code>.</p>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td class="name">
  119. <strong>depth</strong>
  120. </td>
  121. <td class="description last">
  122. <p>The depth of the texture.</p>
  123. <p>Default is <code>1</code>.</p>
  124. </td>
  125. </tr>
  126. </tbody>
  127. </table>
  128. </div>
  129. </div>
  130. <h2 class="subsection-title">Properties</h2>
  131. <div class="member">
  132. <h3 class="name" id="compareFunction" translate="no">.<a href="#compareFunction">compareFunction</a><span class="type-signature"> : <a href="global.html#NeverCompare">NeverCompare</a> | <a href="global.html#LessCompare">LessCompare</a> | <a href="global.html#EqualCompare">EqualCompare</a> | <a href="global.html#LessEqualCompare">LessEqualCompare</a> | <a href="global.html#GreaterCompare">GreaterCompare</a> | <a href="global.html#NotEqualCompare">NotEqualCompare</a> | <a href="global.html#GreaterEqualCompare">GreaterEqualCompare</a> | <a href="global.html#AlwaysCompare">AlwaysCompare</a></span> </h3>
  133. <div class="description">
  134. <p>Code corresponding to the depth compare function.</p>
  135. <p>Default is <code>null</code>.</p>
  136. </div>
  137. </div>
  138. <div class="member">
  139. <h3 class="name" id="flipY" translate="no">.<a href="#flipY">flipY</a><span class="type-signature"> : boolean</span> </h3>
  140. <div class="description">
  141. <p>If set to <code>true</code>, the texture is flipped along the vertical axis when
  142. uploaded to the GPU.</p>
  143. <p>Overwritten and set to <code>false</code> by default.</p>
  144. <p>Default is <code>false</code>.</p>
  145. </div>
  146. <dl class="details">
  147. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#flipY">Texture#flipY</a></dt>
  148. </dl>
  149. </div>
  150. <div class="member">
  151. <h3 class="name" id="generateMipmaps" translate="no">.<a href="#generateMipmaps">generateMipmaps</a><span class="type-signature"> : boolean</span> </h3>
  152. <div class="description">
  153. <p>Whether to generate mipmaps (if possible) for a texture.</p>
  154. <p>Overwritten and set to <code>false</code> by default.</p>
  155. <p>Default is <code>false</code>.</p>
  156. </div>
  157. <dl class="details">
  158. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#generateMipmaps">Texture#generateMipmaps</a></dt>
  159. </dl>
  160. </div>
  161. <div class="member">
  162. <h3 class="name" id="isDepthTexture" translate="no">.<a href="#isDepthTexture">isDepthTexture</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  163. <div class="description">
  164. <p>This flag can be used for type testing.</p>
  165. <p>Default is <code>true</code>.</p>
  166. </div>
  167. </div>
  168. <h2 class="subsection-title">Source</h2>
  169. <p>
  170. <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/DepthTexture.js" translate="no" target="_blank" rel="noopener">src/textures/DepthTexture.js</a>
  171. </p>
  172. </article>
  173. </section>
  174. <script src="../scripts/linenumber.js"></script>
  175. <script src="../scripts/page.js"></script>
  176. </body>
  177. </html>
粤ICP备19079148号