CompressedTexture.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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">
  31. <strong>mipmaps</strong>
  32. </td>
  33. <td class="description last">
  34. <p>This array holds for all mipmaps (including the bases mip)
  35. the data and dimensions.</p>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td class="name">
  40. <strong>width</strong>
  41. </td>
  42. <td class="description last">
  43. <p>The width of the texture.</p>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class="name">
  48. <strong>height</strong>
  49. </td>
  50. <td class="description last">
  51. <p>The height of the texture.</p>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td class="name">
  56. <strong>format</strong>
  57. </td>
  58. <td class="description last">
  59. <p>The texture format.</p>
  60. <p>Default is <code>RGBAFormat</code>.</p>
  61. </td>
  62. </tr>
  63. <tr>
  64. <td class="name">
  65. <strong>type</strong>
  66. </td>
  67. <td class="description last">
  68. <p>The texture type.</p>
  69. <p>Default is <code>UnsignedByteType</code>.</p>
  70. </td>
  71. </tr>
  72. <tr>
  73. <td class="name">
  74. <strong>mapping</strong>
  75. </td>
  76. <td class="description last">
  77. <p>The texture mapping.</p>
  78. <p>Default is <code>Texture.DEFAULT_MAPPING</code>.</p>
  79. </td>
  80. </tr>
  81. <tr>
  82. <td class="name">
  83. <strong>wrapS</strong>
  84. </td>
  85. <td class="description last">
  86. <p>The wrapS value.</p>
  87. <p>Default is <code>ClampToEdgeWrapping</code>.</p>
  88. </td>
  89. </tr>
  90. <tr>
  91. <td class="name">
  92. <strong>wrapT</strong>
  93. </td>
  94. <td class="description last">
  95. <p>The wrapT value.</p>
  96. <p>Default is <code>ClampToEdgeWrapping</code>.</p>
  97. </td>
  98. </tr>
  99. <tr>
  100. <td class="name">
  101. <strong>magFilter</strong>
  102. </td>
  103. <td class="description last">
  104. <p>The mag filter value.</p>
  105. <p>Default is <code>LinearFilter</code>.</p>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td class="name">
  110. <strong>minFilter</strong>
  111. </td>
  112. <td class="description last">
  113. <p>The min filter value.</p>
  114. <p>Default is <code>LinearMipmapLinearFilter</code>.</p>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td class="name">
  119. <strong>anisotropy</strong>
  120. </td>
  121. <td class="description last">
  122. <p>The anisotropy value.</p>
  123. <p>Default is <code>Texture.DEFAULT_ANISOTROPY</code>.</p>
  124. </td>
  125. </tr>
  126. <tr>
  127. <td class="name">
  128. <strong>colorSpace</strong>
  129. </td>
  130. <td class="description last">
  131. <p>The color space.</p>
  132. <p>Default is <code>NoColorSpace</code>.</p>
  133. </td>
  134. </tr>
  135. </tbody>
  136. </table>
  137. </div>
  138. </div>
  139. <h2 class="subsection-title">Properties</h2>
  140. <div class="member">
  141. <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>
  142. <div class="description">
  143. <p>If set to <code>true</code>, the texture is flipped along the vertical axis when
  144. uploaded to the GPU.</p>
  145. <p>Overwritten and set to <code>false</code> by default since it is not possible to
  146. flip compressed textures.</p>
  147. <p>Default is <code>false</code>.</p>
  148. </div>
  149. <dl class="details">
  150. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#flipY">Texture#flipY</a></dt>
  151. </dl>
  152. </div>
  153. <div class="member">
  154. <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>
  155. <div class="description">
  156. <p>Whether to generate mipmaps (if possible) for a texture.</p>
  157. <p>Overwritten and set to <code>false</code> by default since it is not
  158. possible to generate mipmaps for compressed data. Mipmaps
  159. must be embedded in the compressed texture file.</p>
  160. <p>Default is <code>false</code>.</p>
  161. </div>
  162. <dl class="details">
  163. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#generateMipmaps">Texture#generateMipmaps</a></dt>
  164. </dl>
  165. </div>
  166. <div class="member">
  167. <h3 class="name" id="image" translate="no">.<a href="#image">image</a><span class="type-signature"> : Object</span> </h3>
  168. <div class="description">
  169. <p>The image property of a compressed texture just defines its dimensions.</p>
  170. </div>
  171. <dl class="details">
  172. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#image">Texture#image</a></dt>
  173. </dl>
  174. </div>
  175. <div class="member">
  176. <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>
  177. <div class="description">
  178. <p>This flag can be used for type testing.</p>
  179. <p>Default is <code>true</code>.</p>
  180. </div>
  181. </div>
  182. <div class="member">
  183. <h3 class="name" id="mipmaps" translate="no">.<a href="#mipmaps">mipmaps</a><span class="type-signature"> : Array.&lt;Object></span> </h3>
  184. <div class="description">
  185. <p>This array holds for all mipmaps (including the bases mip) the data and dimensions.</p>
  186. </div>
  187. <dl class="details">
  188. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#mipmaps">Texture#mipmaps</a></dt>
  189. </dl>
  190. </div>
  191. <h2 class="subsection-title">Source</h2>
  192. <p>
  193. <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/CompressedTexture.js" translate="no" target="_blank" rel="noopener">src/textures/CompressedTexture.js</a>
  194. </p>
  195. </article>
  196. </section>
  197. <script src="../scripts/linenumber.js"></script>
  198. <script src="../scripts/page.js"></script>
  199. </body>
  200. </html>
粤ICP备19079148号