CompressedArrayTexture.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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"><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>depth</code></td>
  44. <td class="description last"><p>The depth of the texture.</p></td>
  45. </tr>
  46. <tr>
  47. <td class="name"><code>format</code></td>
  48. <td class="description last"><p>The min filter value.<br/>Default is <code>RGBAFormat</code>.</p></td>
  49. </tr>
  50. <tr>
  51. <td class="name"><code>type</code></td>
  52. <td class="description last"><p>The min filter value.<br/>Default is <code>UnsignedByteType</code>.</p></td>
  53. </tr>
  54. </tbody>
  55. </table>
  56. </div>
  57. </div>
  58. <h2 class="subsection-title">Properties</h2>
  59. <div class="member">
  60. <h3 class="name" id="image" translate="no">.<a href="#image">image</a><span class="type-signature"> : Object</span> </h3>
  61. <div class="description">
  62. <p>The image property of a compressed texture just defines its dimensions.</p>
  63. </div>
  64. <dl class="details">
  65. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="CompressedTexture.html#image">CompressedTexture#image</a></dt>
  66. </dl>
  67. </div>
  68. <div class="member">
  69. <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>
  70. <div class="description">
  71. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  72. </div>
  73. </div>
  74. <div class="member">
  75. <h3 class="name" id="layerUpdates" translate="no">.<a href="#layerUpdates">layerUpdates</a><span class="type-signature"> : Set.&lt;number></span> </h3>
  76. <div class="description">
  77. <p>A set of all layers which need to be updated in the texture.</p>
  78. </div>
  79. </div>
  80. <div class="member">
  81. <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>
  82. <div class="description">
  83. <p>This defines how the texture is wrapped in the depth and corresponds to
  84. <em>W</em> in UVW mapping.<br/>Default is <code>ClampToEdgeWrapping</code>.</p>
  85. </div>
  86. </div>
  87. <h2 class="subsection-title">Methods</h2>
  88. <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>
  89. <div class="method">
  90. <div class="description">
  91. <p>Describes that a specific layer of the texture needs to be updated.
  92. Normally when <a href="Texture.html#needsUpdate">Texture#needsUpdate</a> is set to <code>true</code>, the
  93. entire compressed texture array is sent to the GPU. Marking specific
  94. layers will only transmit subsets of all mipmaps associated with a
  95. specific depth in the array which is often much more performant.</p>
  96. </div>
  97. <table class="params">
  98. <tbody>
  99. <tr>
  100. <td class="name"><code>layerIndex</code></td>
  101. <td class="description last"><p>The layer index that should be updated.</p></td>
  102. </tr>
  103. </tbody>
  104. </table>
  105. </div>
  106. <h3 class="name name-method" id="clearLayerUpdates" translate="no">.<a href="#clearLayerUpdates">clearLayerUpdates</a><span class="signature">()</span> </h3>
  107. <div class="method">
  108. <div class="description">
  109. <p>Resets the layer updates registry.</p>
  110. </div>
  111. </div>
  112. <h2 class="subsection-title">Source</h2>
  113. <p>
  114. <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/CompressedArrayTexture.js" target="_blank" rel="noopener" translate="no">src/textures/CompressedArrayTexture.js</a>
  115. </p>
  116. </article>
  117. </section>
  118. <script src="../scripts/linenumber.js"></script>
  119. <script src="../scripts/page.js"></script>
  120. </body>
  121. </html>
粤ICP备19079148号