module-WebGPUTextureUtils.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>WebGPUTextureUtils - 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. <h1 translate="no">WebGPUTextureUtils</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <h2 class="subsection-title">Import</h2>
  18. <p><span translate="no">WebGPUTextureUtils</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  19. <pre><code class="language-js">import * as WebGPUTextureUtils from 'three/addons/utils/WebGPUTextureUtils.js';</code></pre>
  20. <div class="container-overview">
  21. </div>
  22. <h2 class="subsection-title">Static Methods</h2>
  23. <h3 class="name name-method" id=".decompress" translate="no">.<a href="#.decompress">decompress</a><span class="signature">( blitTexture : <span class="param-type">CompressedTexture</span>, maxTextureSize : <span class="param-type">number</span>, renderer : <span class="param-type">WebGPURenderer</span> )</span><span class="type-signature"> : Promise.&lt;<a href="CanvasTexture.html">CanvasTexture</a>></span> <span class="type-signature">(async) </span></h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Returns an uncompressed version of the given compressed texture.</p>
  27. <p>This module can only be used with <a href="WebGPURenderer.html">WebGPURenderer</a>. When using <a href="WebGLRenderer.html">WebGLRenderer</a>,
  28. import the function from <a href="WebGLTextureUtils.html">WebGLTextureUtils</a>.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name"><code>blitTexture</code></td>
  34. <td class="description last"><p>The compressed texture.</p></td>
  35. </tr>
  36. <tr>
  37. <td class="name"><code>maxTextureSize</code></td>
  38. <td class="description last"><p>The maximum size of the uncompressed texture.<br/>Default is <code>Infinity</code>.</p></td>
  39. </tr>
  40. <tr>
  41. <td class="name"><code>renderer</code></td>
  42. <td class="description last"><p>A reference to a renderer.<br/>Default is <code>null</code>.</p></td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. <dl class="details">
  47. <dt class="tag-returns"><strong>Returns:</strong> A Promise that resolved with the uncompressed texture.</dt>
  48. </dl>
  49. </div>
  50. <h2 class="subsection-title">Source</h2>
  51. <p>
  52. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/WebGPUTextureUtils.js" target="_blank" rel="noopener" translate="no">examples/jsm/utils/WebGPUTextureUtils.js</a>
  53. </p>
  54. </article>
  55. </section>
  56. <script src="../scripts/linenumber.js"></script>
  57. <script src="../scripts/page.js"></script>
  58. </body>
  59. </html>
粤ICP备19079148号