CompressedTexture.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CompressedTexture - 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">CompressedTexture</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Creates a texture based on data in compressed form.</p>
  17. <p>These texture are usually loaded with <a href="CompressedTextureLoader.html">CompressedTextureLoader</a>.</p></div>
  18. </header>
  19. <article>
  20. <div class="container-overview">
  21. <h2>Constructor</h2>
  22. <h3 class="name name-method" id="CompressedTexture" translate="no">new <a href="#CompressedTexture">CompressedTexture</a><span class="signature">( mipmaps : <span class="param-type">Array.&lt;Object></span>, width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, format : <span class="param-type">number</span>, type : <span class="param-type">number</span>, mapping : <span class="param-type">number</span>, wrapS : <span class="param-type">number</span>, wrapT : <span class="param-type">number</span>, magFilter : <span class="param-type">number</span>, minFilter : <span class="param-type">number</span>, anisotropy : <span class="param-type">number</span>, colorSpace : <span class="param-type">string</span> )</span> </h3>
  23. <div class="method">
  24. <div class="description">
  25. <p>Constructs a new compressed texture.</p>
  26. </div>
  27. <table class="params">
  28. <tbody>
  29. <tr>
  30. <td class="name"><code>mipmaps</code></td>
  31. <td class="description last"><p>This array holds for all mipmaps (including the bases mip)
  32. the data and dimensions.</p></td>
  33. </tr>
  34. <tr>
  35. <td class="name"><code>width</code></td>
  36. <td class="description last"><p>The width of the texture.</p></td>
  37. </tr>
  38. <tr>
  39. <td class="name"><code>height</code></td>
  40. <td class="description last"><p>The height of the texture.</p></td>
  41. </tr>
  42. <tr>
  43. <td class="name"><code>format</code></td>
  44. <td class="description last"><p>The texture format.<br/>Default is <code>RGBAFormat</code>.</p></td>
  45. </tr>
  46. <tr>
  47. <td class="name"><code>type</code></td>
  48. <td class="description last"><p>The texture type.<br/>Default is <code>UnsignedByteType</code>.</p></td>
  49. </tr>
  50. <tr>
  51. <td class="name"><code>mapping</code></td>
  52. <td class="description last"><p>The texture mapping.<br/>Default is <code>Texture.DEFAULT_MAPPING</code>.</p></td>
  53. </tr>
  54. <tr>
  55. <td class="name"><code>wrapS</code></td>
  56. <td class="description last"><p>The wrapS value.<br/>Default is <code>ClampToEdgeWrapping</code>.</p></td>
  57. </tr>
  58. <tr>
  59. <td class="name"><code>wrapT</code></td>
  60. <td class="description last"><p>The wrapT value.<br/>Default is <code>ClampToEdgeWrapping</code>.</p></td>
  61. </tr>
  62. <tr>
  63. <td class="name"><code>magFilter</code></td>
  64. <td class="description last"><p>The mag filter value.<br/>Default is <code>LinearFilter</code>.</p></td>
  65. </tr>
  66. <tr>
  67. <td class="name"><code>minFilter</code></td>
  68. <td class="description last"><p>The min filter value.<br/>Default is <code>LinearMipmapLinearFilter</code>.</p></td>
  69. </tr>
  70. <tr>
  71. <td class="name"><code>anisotropy</code></td>
  72. <td class="description last"><p>The anisotropy value.<br/>Default is <code>Texture.DEFAULT_ANISOTROPY</code>.</p></td>
  73. </tr>
  74. <tr>
  75. <td class="name"><code>colorSpace</code></td>
  76. <td class="description last"><p>The color space.<br/>Default is <code>NoColorSpace</code>.</p></td>
  77. </tr>
  78. </tbody>
  79. </table>
  80. </div>
  81. </div>
  82. <h2 class="subsection-title">Properties</h2>
  83. <div class="member">
  84. <h3 class="name" id="flipY" translate="no">.<a href="#flipY">flipY</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  85. <div class="description">
  86. <p>If set to <code>true</code>, the texture is flipped along the vertical axis when
  87. uploaded to the GPU.</p>
  88. <p>Overwritten and set to <code>false</code> by default since it is not possible to
  89. flip compressed textures.<br/>Default is <code>false</code>.</p>
  90. </div>
  91. <dl class="details">
  92. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#flipY">Texture#flipY</a></dt>
  93. </dl>
  94. </div>
  95. <div class="member">
  96. <h3 class="name" id="generateMipmaps" translate="no">.<a href="#generateMipmaps">generateMipmaps</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  97. <div class="description">
  98. <p>Whether to generate mipmaps (if possible) for a texture.</p>
  99. <p>Overwritten and set to <code>false</code> by default since it is not
  100. possible to generate mipmaps for compressed data. Mipmaps
  101. must be embedded in the compressed texture file.<br/>Default is <code>false</code>.</p>
  102. </div>
  103. <dl class="details">
  104. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#generateMipmaps">Texture#generateMipmaps</a></dt>
  105. </dl>
  106. </div>
  107. <div class="member">
  108. <h3 class="name" id="image" translate="no">.<a href="#image">image</a><span class="type-signature"> : Object</span> </h3>
  109. <div class="description">
  110. <p>The image property of a compressed texture just defines its dimensions.</p>
  111. </div>
  112. <dl class="details">
  113. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#image">Texture#image</a></dt>
  114. </dl>
  115. </div>
  116. <div class="member">
  117. <h3 class="name" id="isCompressedTexture" translate="no">.<a href="#isCompressedTexture">isCompressedTexture</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  118. <div class="description">
  119. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  120. </div>
  121. </div>
  122. <div class="member">
  123. <h3 class="name" id="mipmaps" translate="no">.<a href="#mipmaps">mipmaps</a><span class="type-signature"> : Array.&lt;Object></span> </h3>
  124. <div class="description">
  125. <p>This array holds for all mipmaps (including the bases mip) the data and dimensions.</p>
  126. </div>
  127. <dl class="details">
  128. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#mipmaps">Texture#mipmaps</a></dt>
  129. </dl>
  130. </div>
  131. <h2 class="subsection-title">Source</h2>
  132. <p>
  133. <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/CompressedTexture.js" target="_blank" rel="noopener" translate="no">src/textures/CompressedTexture.js</a>
  134. </p>
  135. </article>
  136. </section>
  137. <script src="../scripts/linenumber.js"></script>
  138. <script src="../scripts/page.js"></script>
  139. </body>
  140. </html>
粤ICP备19079148号