Storage3DTexture.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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"><code>width</code></td>
  33. <td class="description last"><p>The storage texture's width.<br/>Default is <code>1</code>.</p></td>
  34. </tr>
  35. <tr>
  36. <td class="name"><code>height</code></td>
  37. <td class="description last"><p>The storage texture's height.<br/>Default is <code>1</code>.</p></td>
  38. </tr>
  39. <tr>
  40. <td class="name"><code>depth</code></td>
  41. <td class="description last"><p>The storage texture's depth.<br/>Default is <code>1</code>.</p></td>
  42. </tr>
  43. </tbody>
  44. </table>
  45. </div>
  46. </div>
  47. <h2 class="subsection-title">Properties</h2>
  48. <div class="member">
  49. <h3 class="name" id="image" translate="no">.<a href="#image">image</a><span class="type-signature"> : Object</span> </h3>
  50. <div class="description">
  51. <p>The image object which just represents the texture's dimension.</p>
  52. </div>
  53. <dl class="details">
  54. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#image">Texture#image</a></dt>
  55. </dl>
  56. </div>
  57. <div class="member">
  58. <h3 class="name" id="is3DTexture" translate="no">.<a href="#is3DTexture">is3DTexture</a><span class="type-signature"> : boolean</span> </h3>
  59. <div class="description">
  60. <p>Indicates whether this texture is a 3D texture.</p>
  61. </div>
  62. </div>
  63. <div class="member">
  64. <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>
  65. <div class="description">
  66. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  67. </div>
  68. </div>
  69. <div class="member">
  70. <h3 class="name" id="magFilter" translate="no">.<a href="#magFilter">magFilter</a><span class="type-signature"> : number</span> </h3>
  71. <div class="description">
  72. <p>The default <code>magFilter</code> for storage textures is <code>THREE.LinearFilter</code>.</p>
  73. </div>
  74. <dl class="details">
  75. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#magFilter">Texture#magFilter</a></dt>
  76. </dl>
  77. </div>
  78. <div class="member">
  79. <h3 class="name" id="minFilter" translate="no">.<a href="#minFilter">minFilter</a><span class="type-signature"> : number</span> </h3>
  80. <div class="description">
  81. <p>The default <code>minFilter</code> for storage textures is <code>THREE.LinearFilter</code>.</p>
  82. </div>
  83. <dl class="details">
  84. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#minFilter">Texture#minFilter</a></dt>
  85. </dl>
  86. </div>
  87. <div class="member">
  88. <h3 class="name" id="wrapR" translate="no">.<a href="#wrapR">wrapR</a><span class="type-signature"> : number</span> </h3>
  89. <div class="description">
  90. <p>This defines how the texture is wrapped in the depth direction and corresponds to
  91. <em>W</em> in UVW mapping.</p>
  92. </div>
  93. </div>
  94. <h2 class="subsection-title">Methods</h2>
  95. <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>
  96. <div class="method">
  97. <div class="description">
  98. <p>Sets the size of the storage 3d texture.</p>
  99. </div>
  100. <table class="params">
  101. <tbody>
  102. <tr>
  103. <td class="name"><code>width</code></td>
  104. <td class="description last"><p>The new width of the storage texture.</p></td>
  105. </tr>
  106. <tr>
  107. <td class="name"><code>height</code></td>
  108. <td class="description last"><p>The new height of the storage texture.</p></td>
  109. </tr>
  110. <tr>
  111. <td class="name"><code>depth</code></td>
  112. <td class="description last"><p>The new depth of the storage texture.</p></td>
  113. </tr>
  114. </tbody>
  115. </table>
  116. </div>
  117. <h2 class="subsection-title">Source</h2>
  118. <p>
  119. <a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/common/Storage3DTexture.js" target="_blank" rel="noopener" translate="no">src/renderers/common/Storage3DTexture.js</a>
  120. </p>
  121. </article>
  122. </section>
  123. <script src="../scripts/linenumber.js"></script>
  124. <script src="../scripts/page.js"></script>
  125. </body>
  126. </html>
粤ICP备19079148号