Data3DTexture.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Data3DTexture - 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">Data3DTexture</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Creates a three-dimensional texture from raw data, with parameters to
  17. divide it into width, height, and depth.</p></div>
  18. </header>
  19. <article>
  20. <div class="container-overview">
  21. <h2>Constructor</h2>
  22. <h3 class="name name-method" id="Data3DTexture" translate="no">new <a href="#Data3DTexture">Data3DTexture</a><span class="signature">( data : <span class="param-type">TypedArray</span>, width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, depth : <span class="param-type">number</span> )</span> </h3>
  23. <div class="method">
  24. <div class="description">
  25. <p>Constructs a new data array texture.</p>
  26. </div>
  27. <table class="params">
  28. <tbody>
  29. <tr>
  30. <td class="name">
  31. <strong>data</strong>
  32. </td>
  33. <td class="description last">
  34. <p>The buffer data.</p>
  35. <p>Default is <code>null</code>.</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. <p>Default is <code>1</code>.</p>
  45. </td>
  46. </tr>
  47. <tr>
  48. <td class="name">
  49. <strong>height</strong>
  50. </td>
  51. <td class="description last">
  52. <p>The height of the texture.</p>
  53. <p>Default is <code>1</code>.</p>
  54. </td>
  55. </tr>
  56. <tr>
  57. <td class="name">
  58. <strong>depth</strong>
  59. </td>
  60. <td class="description last">
  61. <p>The depth of the texture.</p>
  62. <p>Default is <code>1</code>.</p>
  63. </td>
  64. </tr>
  65. </tbody>
  66. </table>
  67. </div>
  68. </div>
  69. <h2 class="subsection-title">Properties</h2>
  70. <div class="member">
  71. <h3 class="name" id="flipY" translate="no">.<a href="#flipY">flipY</a><span class="type-signature"> : boolean</span> </h3>
  72. <div class="description">
  73. <p>If set to <code>true</code>, the texture is flipped along the vertical axis when
  74. uploaded to the GPU.</p>
  75. <p>Overwritten and set to <code>false</code> by default.</p>
  76. <p>Default is <code>false</code>.</p>
  77. </div>
  78. <dl class="details">
  79. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#flipY">Texture#flipY</a></dt>
  80. </dl>
  81. </div>
  82. <div class="member">
  83. <h3 class="name" id="generateMipmaps" translate="no">.<a href="#generateMipmaps">generateMipmaps</a><span class="type-signature"> : boolean</span> </h3>
  84. <div class="description">
  85. <p>Whether to generate mipmaps (if possible) for a texture.</p>
  86. <p>Overwritten and set to <code>false</code> by default.</p>
  87. <p>Default is <code>false</code>.</p>
  88. </div>
  89. <dl class="details">
  90. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#generateMipmaps">Texture#generateMipmaps</a></dt>
  91. </dl>
  92. </div>
  93. <div class="member">
  94. <h3 class="name" id="image" translate="no">.<a href="#image">image</a><span class="type-signature"> : Object</span> </h3>
  95. <div class="description">
  96. <p>The image definition of a data texture.</p>
  97. </div>
  98. <dl class="details">
  99. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#image">Texture#image</a></dt>
  100. </dl>
  101. </div>
  102. <div class="member">
  103. <h3 class="name" id="isData3DTexture" translate="no">.<a href="#isData3DTexture">isData3DTexture</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  104. <div class="description">
  105. <p>This flag can be used for type testing.</p>
  106. <p>Default is <code>true</code>.</p>
  107. </div>
  108. </div>
  109. <div class="member">
  110. <h3 class="name" id="magFilter" translate="no">.<a href="#magFilter">magFilter</a><span class="type-signature"> : <a href="global.html#NearestFilter">NearestFilter</a> | <a href="global.html#NearestMipmapNearestFilter">NearestMipmapNearestFilter</a> | <a href="global.html#NearestMipmapLinearFilter">NearestMipmapLinearFilter</a> | <a href="global.html#LinearFilter">LinearFilter</a> | <a href="global.html#LinearMipmapNearestFilter">LinearMipmapNearestFilter</a> | <a href="global.html#LinearMipmapLinearFilter">LinearMipmapLinearFilter</a></span> </h3>
  111. <div class="description">
  112. <p>How the texture is sampled when a texel covers more than one pixel.</p>
  113. <p>Overwritten and set to <code>NearestFilter</code> by default.</p>
  114. <p>Default is <code>NearestFilter</code>.</p>
  115. </div>
  116. <dl class="details">
  117. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#magFilter">Texture#magFilter</a></dt>
  118. </dl>
  119. </div>
  120. <div class="member">
  121. <h3 class="name" id="minFilter" translate="no">.<a href="#minFilter">minFilter</a><span class="type-signature"> : <a href="global.html#NearestFilter">NearestFilter</a> | <a href="global.html#NearestMipmapNearestFilter">NearestMipmapNearestFilter</a> | <a href="global.html#NearestMipmapLinearFilter">NearestMipmapLinearFilter</a> | <a href="global.html#LinearFilter">LinearFilter</a> | <a href="global.html#LinearMipmapNearestFilter">LinearMipmapNearestFilter</a> | <a href="global.html#LinearMipmapLinearFilter">LinearMipmapLinearFilter</a></span> </h3>
  122. <div class="description">
  123. <p>How the texture is sampled when a texel covers less than one pixel.</p>
  124. <p>Overwritten and set to <code>NearestFilter</code> by default.</p>
  125. <p>Default is <code>NearestFilter</code>.</p>
  126. </div>
  127. <dl class="details">
  128. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#minFilter">Texture#minFilter</a></dt>
  129. </dl>
  130. </div>
  131. <div class="member">
  132. <h3 class="name" id="unpackAlignment" translate="no">.<a href="#unpackAlignment">unpackAlignment</a><span class="type-signature"> : boolean</span> </h3>
  133. <div class="description">
  134. <p>Specifies the alignment requirements for the start of each pixel row in memory.</p>
  135. <p>Overwritten and set to <code>1</code> by default.</p>
  136. <p>Default is <code>1</code>.</p>
  137. </div>
  138. <dl class="details">
  139. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#unpackAlignment">Texture#unpackAlignment</a></dt>
  140. </dl>
  141. </div>
  142. <div class="member">
  143. <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>
  144. <div class="description">
  145. <p>This defines how the texture is wrapped in the depth and corresponds to
  146. <em>W</em> in UVW mapping.</p>
  147. <p>Default is <code>ClampToEdgeWrapping</code>.</p>
  148. </div>
  149. </div>
  150. <h2 class="subsection-title">Source</h2>
  151. <p>
  152. <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/Data3DTexture.js" translate="no" target="_blank" rel="noopener">src/textures/Data3DTexture.js</a>
  153. </p>
  154. </article>
  155. </section>
  156. <script src="../scripts/linenumber.js"></script>
  157. <script src="../scripts/page.js"></script>
  158. </body>
  159. </html>
粤ICP备19079148号