1
0

CompressedArrayTexture.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CompressedArrayTexture - 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> → <a href="CompressedTexture.html">CompressedTexture</a> → </p>
  13. <h1 translate="no">CompressedArrayTexture</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Creates a texture 2D array 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="CompressedArrayTexture" translate="no">new <a href="#CompressedArrayTexture">CompressedArrayTexture</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>, depth : <span class="param-type">number</span>, format : <span class="param-type">number</span>, type : <span class="param-type">number</span> )</span> </h3>
  23. <div class="method">
  24. <div class="description">
  25. <p>Constructs a new compressed array 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>depth</strong>
  57. </td>
  58. <td class="description last">
  59. <p>The depth of the texture.</p>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class="name">
  64. <strong>format</strong>
  65. </td>
  66. <td class="description last">
  67. <p>The min filter value.</p>
  68. <p>Default is <code>RGBAFormat</code>.</p>
  69. </td>
  70. </tr>
  71. <tr>
  72. <td class="name">
  73. <strong>type</strong>
  74. </td>
  75. <td class="description last">
  76. <p>The min filter value.</p>
  77. <p>Default is <code>UnsignedByteType</code>.</p>
  78. </td>
  79. </tr>
  80. </tbody>
  81. </table>
  82. </div>
  83. </div>
  84. <h2 class="subsection-title">Properties</h2>
  85. <div class="member">
  86. <h3 class="name" id="image" translate="no">.<a href="#image">image</a><span class="type-signature"> : Object</span> </h3>
  87. <div class="description">
  88. <p>The image property of a compressed texture just defines its dimensions.</p>
  89. </div>
  90. <dl class="details">
  91. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="CompressedTexture.html#image">CompressedTexture#image</a></dt>
  92. </dl>
  93. </div>
  94. <div class="member">
  95. <h3 class="name" id="isCompressedArrayTexture" translate="no">.<a href="#isCompressedArrayTexture">isCompressedArrayTexture</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  96. <div class="description">
  97. <p>This flag can be used for type testing.</p>
  98. <p>Default is <code>true</code>.</p>
  99. </div>
  100. </div>
  101. <div class="member">
  102. <h3 class="name" id="layerUpdates" translate="no">.<a href="#layerUpdates">layerUpdates</a><span class="type-signature"> : Set.&lt;number></span> </h3>
  103. <div class="description">
  104. <p>A set of all layers which need to be updated in the texture.</p>
  105. </div>
  106. </div>
  107. <div class="member">
  108. <h3 class="name" id="wrapR" translate="no">.<a href="#wrapR">wrapR</a><span class="type-signature"> : <a href="global.html#RepeatWrapping">RepeatWrapping</a> | <a href="global.html#ClampToEdgeWrapping">ClampToEdgeWrapping</a> | <a href="global.html#MirroredRepeatWrapping">MirroredRepeatWrapping</a></span> </h3>
  109. <div class="description">
  110. <p>This defines how the texture is wrapped in the depth and corresponds to
  111. <em>W</em> in UVW mapping.</p>
  112. <p>Default is <code>ClampToEdgeWrapping</code>.</p>
  113. </div>
  114. </div>
  115. <h2 class="subsection-title">Methods</h2>
  116. <h3 class="name name-method" id="addLayerUpdate" translate="no">.<a href="#addLayerUpdate">addLayerUpdate</a><span class="signature">( layerIndex : <span class="param-type">number</span> )</span> </h3>
  117. <div class="method">
  118. <div class="description">
  119. <p>Describes that a specific layer of the texture needs to be updated.
  120. Normally when <a href="Texture.html#needsUpdate">Texture#needsUpdate</a> is set to <code>true</code>, the
  121. entire compressed texture array is sent to the GPU. Marking specific
  122. layers will only transmit subsets of all mipmaps associated with a
  123. specific depth in the array which is often much more performant.</p>
  124. </div>
  125. <table class="params">
  126. <tbody>
  127. <tr>
  128. <td class="name">
  129. <strong>layerIndex</strong>
  130. </td>
  131. <td class="description last">
  132. <p>The layer index that should be updated.</p>
  133. </td>
  134. </tr>
  135. </tbody>
  136. </table>
  137. </div>
  138. <h3 class="name name-method" id="clearLayerUpdates" translate="no">.<a href="#clearLayerUpdates">clearLayerUpdates</a><span class="signature">()</span> </h3>
  139. <div class="method">
  140. <div class="description">
  141. <p>Resets the layer updates registry.</p>
  142. </div>
  143. </div>
  144. <h2 class="subsection-title">Source</h2>
  145. <p>
  146. <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/CompressedArrayTexture.js" translate="no" target="_blank" rel="noopener">src/textures/CompressedArrayTexture.js</a>
  147. </p>
  148. </article>
  149. </section>
  150. <script src="../scripts/linenumber.js"></script>
  151. <script src="../scripts/page.js"></script>
  152. </body>
  153. </html>
粤ICP备19079148号