1
0

module-WebGLTextureUtils.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>WebGLTextureUtils - 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">WebGLTextureUtils</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <h2 class="subsection-title">Import</h2>
  18. <p><span translate="no">WebGLTextureUtils</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
  19. <pre><code class="language-js">import * as WebGLTextureUtils from 'three/addons/utils/WebGLTextureUtils.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">( texture : <span class="param-type"><a href="CompressedTexture.html">CompressedTexture</a></span>, maxTextureSize : <span class="param-type">number</span>, renderer : <span class="param-type"><a href="WebGLRenderer.html">WebGLRenderer</a></span> )</span><span class="type-signature"> : <a href="CanvasTexture.html">CanvasTexture</a></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="WebGLRenderer.html">WebGLRenderer</a>. When using <a href="WebGPURenderer.html">WebGPURenderer</a>,
  28. import the function from <a href="WebGPUTextureUtils.html">WebGPUTextureUtils</a>.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name">
  34. <strong>texture</strong>
  35. </td>
  36. <td class="description last">
  37. <p>The compressed texture.</p>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td class="name">
  42. <strong>maxTextureSize</strong>
  43. </td>
  44. <td class="description last">
  45. <p>The maximum size of the uncompressed texture.</p>
  46. <p>Default is <code>Infinity</code>.</p>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td class="name">
  51. <strong>renderer</strong>
  52. </td>
  53. <td class="description last">
  54. <p>A reference to a renderer.</p>
  55. <p>Default is <code>null</code>.</p>
  56. </td>
  57. </tr>
  58. </tbody>
  59. </table>
  60. <dl class="details">
  61. <dt class="tag-returns"><strong>Returns:</strong> The uncompressed texture.</dt>
  62. </dl>
  63. </div>
  64. <h2 class="subsection-title">Source</h2>
  65. <p>
  66. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/WebGLTextureUtils.js" translate="no" target="_blank" rel="noopener">examples/jsm/utils/WebGLTextureUtils.js</a>
  67. </p>
  68. </article>
  69. </section>
  70. <script src="../scripts/linenumber.js"></script>
  71. <script src="../scripts/page.js"></script>
  72. </body>
  73. </html>
粤ICP备19079148号