1
0

Storage3DTexture.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Storage3DTexture - 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">Storage3DTexture</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This special type of texture is intended for compute shaders.
  17. It can be used to compute the data of a texture with a compute shader.</p>
  18. <p>Note: This type of texture can only be used with <code>WebGPURenderer</code>
  19. and a WebGPU backend.</p></div>
  20. </header>
  21. <article>
  22. <div class="container-overview">
  23. <h2>Constructor</h2>
  24. <h3 class="name name-method" id="Storage3DTexture" translate="no">new <a href="#Storage3DTexture">Storage3DTexture</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, depth : <span class="param-type">number</span> )</span> </h3>
  25. <div class="method">
  26. <div class="description">
  27. <p>Constructs a new storage texture.</p>
  28. </div>
  29. <table class="params">
  30. <tbody>
  31. <tr>
  32. <td class="name">
  33. <strong>width</strong>
  34. </td>
  35. <td class="description last">
  36. <p>The storage texture's width.</p>
  37. <p>Default is <code>1</code>.</p>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td class="name">
  42. <strong>height</strong>
  43. </td>
  44. <td class="description last">
  45. <p>The storage texture's height.</p>
  46. <p>Default is <code>1</code>.</p>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td class="name">
  51. <strong>depth</strong>
  52. </td>
  53. <td class="description last">
  54. <p>The storage texture's depth.</p>
  55. <p>Default is <code>1</code>.</p>
  56. </td>
  57. </tr>
  58. </tbody>
  59. </table>
  60. </div>
  61. </div>
  62. <h2 class="subsection-title">Properties</h2>
  63. <div class="member">
  64. <h3 class="name" id="image" translate="no">.<a href="#image">image</a><span class="type-signature"> : Object</span> </h3>
  65. <div class="description">
  66. <p>The image object which just represents the texture's dimension.</p>
  67. </div>
  68. <dl class="details">
  69. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#image">Texture#image</a></dt>
  70. </dl>
  71. </div>
  72. <div class="member">
  73. <h3 class="name" id="is3DTexture" translate="no">.<a href="#is3DTexture">is3DTexture</a><span class="type-signature"> : boolean</span> </h3>
  74. <div class="description">
  75. <p>Indicates whether this texture is a 3D texture.</p>
  76. </div>
  77. </div>
  78. <div class="member">
  79. <h3 class="name" id="isStorageTexture" translate="no">.<a href="#isStorageTexture">isStorageTexture</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  80. <div class="description">
  81. <p>This flag can be used for type testing.</p>
  82. <p>Default is <code>true</code>.</p>
  83. </div>
  84. </div>
  85. <div class="member">
  86. <h3 class="name" id="magFilter" translate="no">.<a href="#magFilter">magFilter</a><span class="type-signature"> : number</span> </h3>
  87. <div class="description">
  88. <p>The default <code>magFilter</code> for storage textures is <code>THREE.LinearFilter</code>.</p>
  89. </div>
  90. <dl class="details">
  91. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#magFilter">Texture#magFilter</a></dt>
  92. </dl>
  93. </div>
  94. <div class="member">
  95. <h3 class="name" id="minFilter" translate="no">.<a href="#minFilter">minFilter</a><span class="type-signature"> : number</span> </h3>
  96. <div class="description">
  97. <p>The default <code>minFilter</code> for storage textures is <code>THREE.LinearFilter</code>.</p>
  98. </div>
  99. <dl class="details">
  100. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#minFilter">Texture#minFilter</a></dt>
  101. </dl>
  102. </div>
  103. <div class="member">
  104. <h3 class="name" id="wrapR" translate="no">.<a href="#wrapR">wrapR</a><span class="type-signature"> : number</span> </h3>
  105. <div class="description">
  106. <p>This defines how the texture is wrapped in the depth direction and corresponds to
  107. <em>W</em> in UVW mapping.</p>
  108. </div>
  109. </div>
  110. <h2 class="subsection-title">Methods</h2>
  111. <h3 class="name name-method" id="setSize" translate="no">.<a href="#setSize">setSize</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, depth : <span class="param-type">number</span> )</span> </h3>
  112. <div class="method">
  113. <div class="description">
  114. <p>Sets the size of the storage 3d texture.</p>
  115. </div>
  116. <table class="params">
  117. <tbody>
  118. <tr>
  119. <td class="name">
  120. <strong>width</strong>
  121. </td>
  122. <td class="description last">
  123. <p>The new width of the storage texture.</p>
  124. </td>
  125. </tr>
  126. <tr>
  127. <td class="name">
  128. <strong>height</strong>
  129. </td>
  130. <td class="description last">
  131. <p>The new height of the storage texture.</p>
  132. </td>
  133. </tr>
  134. <tr>
  135. <td class="name">
  136. <strong>depth</strong>
  137. </td>
  138. <td class="description last">
  139. <p>The new depth of the storage texture.</p>
  140. </td>
  141. </tr>
  142. </tbody>
  143. </table>
  144. </div>
  145. <h2 class="subsection-title">Source</h2>
  146. <p>
  147. <a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/common/Storage3DTexture.js" translate="no" target="_blank" rel="noopener">src/renderers/common/Storage3DTexture.js</a>
  148. </p>
  149. </article>
  150. </section>
  151. <script src="../scripts/linenumber.js"></script>
  152. <script src="../scripts/page.js"></script>
  153. </body>
  154. </html>
粤ICP备19079148号