| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>WebGPUTextureUtils - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <h1 translate="no">WebGPUTextureUtils</h1>
- <section>
- <header>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <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>
- <pre><code class="language-js">import * as WebGPUTextureUtils from 'three/addons/utils/WebGPUTextureUtils.js';</code></pre>
- <div class="container-overview">
- </div>
- <h2 class="subsection-title">Static Methods</h2>
- <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.<<a href="CanvasTexture.html">CanvasTexture</a>></span> <span class="type-signature">(async) </span></h3>
- <div class="method">
- <div class="description">
- <p>Returns an uncompressed version of the given compressed texture.</p>
- <p>This module can only be used with <a href="WebGPURenderer.html">WebGPURenderer</a>. When using <a href="WebGLRenderer.html">WebGLRenderer</a>,
- import the function from <a href="WebGLTextureUtils.html">WebGLTextureUtils</a>.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>blitTexture</code></td>
- <td class="description last"><p>The compressed texture.</p></td>
- </tr>
- <tr>
- <td class="name"><code>maxTextureSize</code></td>
- <td class="description last"><p>The maximum size of the uncompressed texture.<br/>Default is <code>Infinity</code>.</p></td>
- </tr>
- <tr>
- <td class="name"><code>renderer</code></td>
- <td class="description last"><p>A reference to a renderer.<br/>Default is <code>null</code>.</p></td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> A Promise that resolved with the uncompressed texture.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <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>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|