DepthTexture.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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"><code>width</code></td>
  31. <td class="description last"><p>The width of the texture.</p></td>
  32. </tr>
  33. <tr>
  34. <td class="name"><code>height</code></td>
  35. <td class="description last"><p>The height of the texture.</p></td>
  36. </tr>
  37. <tr>
  38. <td class="name"><code>type</code></td>
  39. <td class="description last"><p>The texture type.<br/>Default is <code>UnsignedIntType</code>.</p></td>
  40. </tr>
  41. <tr>
  42. <td class="name"><code>mapping</code></td>
  43. <td class="description last"><p>The texture mapping.<br/>Default is <code>Texture.DEFAULT_MAPPING</code>.</p></td>
  44. </tr>
  45. <tr>
  46. <td class="name"><code>wrapS</code></td>
  47. <td class="description last"><p>The wrapS value.<br/>Default is <code>ClampToEdgeWrapping</code>.</p></td>
  48. </tr>
  49. <tr>
  50. <td class="name"><code>wrapT</code></td>
  51. <td class="description last"><p>The wrapT value.<br/>Default is <code>ClampToEdgeWrapping</code>.</p></td>
  52. </tr>
  53. <tr>
  54. <td class="name"><code>magFilter</code></td>
  55. <td class="description last"><p>The mag filter value.<br/>Default is <code>LinearFilter</code>.</p></td>
  56. </tr>
  57. <tr>
  58. <td class="name"><code>minFilter</code></td>
  59. <td class="description last"><p>The min filter value.<br/>Default is <code>LinearFilter</code>.</p></td>
  60. </tr>
  61. <tr>
  62. <td class="name"><code>anisotropy</code></td>
  63. <td class="description last"><p>The anisotropy value.<br/>Default is <code>Texture.DEFAULT_ANISOTROPY</code>.</p></td>
  64. </tr>
  65. <tr>
  66. <td class="name"><code>format</code></td>
  67. <td class="description last"><p>The texture format.<br/>Default is <code>DepthFormat</code>.</p></td>
  68. </tr>
  69. <tr>
  70. <td class="name"><code>depth</code></td>
  71. <td class="description last"><p>The depth of the texture.<br/>Default is <code>1</code>.</p></td>
  72. </tr>
  73. </tbody>
  74. </table>
  75. </div>
  76. </div>
  77. <h2 class="subsection-title">Properties</h2>
  78. <div class="member">
  79. <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>
  80. <div class="description">
  81. <p>Code corresponding to the depth compare function.<br/>Default is <code>null</code>.</p>
  82. </div>
  83. </div>
  84. <div class="member">
  85. <h3 class="name" id="flipY" translate="no">.<a href="#flipY">flipY</a><span class="type-signature"> : boolean</span> </h3>
  86. <div class="description">
  87. <p>If set to <code>true</code>, the texture is flipped along the vertical axis when
  88. uploaded to the GPU.</p>
  89. <p>Overwritten and set to <code>false</code> by default.<br/>Default is <code>false</code>.</p>
  90. </div>
  91. <dl class="details">
  92. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#flipY">Texture#flipY</a></dt>
  93. </dl>
  94. </div>
  95. <div class="member">
  96. <h3 class="name" id="generateMipmaps" translate="no">.<a href="#generateMipmaps">generateMipmaps</a><span class="type-signature"> : boolean</span> </h3>
  97. <div class="description">
  98. <p>Whether to generate mipmaps (if possible) for a texture.</p>
  99. <p>Overwritten and set to <code>false</code> by default.<br/>Default is <code>false</code>.</p>
  100. </div>
  101. <dl class="details">
  102. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#generateMipmaps">Texture#generateMipmaps</a></dt>
  103. </dl>
  104. </div>
  105. <div class="member">
  106. <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>
  107. <div class="description">
  108. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  109. </div>
  110. </div>
  111. <h2 class="subsection-title">Source</h2>
  112. <p>
  113. <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/DepthTexture.js" target="_blank" rel="noopener" translate="no">src/textures/DepthTexture.js</a>
  114. </p>
  115. </article>
  116. </section>
  117. <script src="../scripts/linenumber.js"></script>
  118. <script src="../scripts/page.js"></script>
  119. </body>
  120. </html>
粤ICP备19079148号