Data3DTexture.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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"><code>data</code></td>
  31. <td class="description last"><p>The buffer data.<br/>Default is <code>null</code>.</p></td>
  32. </tr>
  33. <tr>
  34. <td class="name"><code>width</code></td>
  35. <td class="description last"><p>The width of the texture.<br/>Default is <code>1</code>.</p></td>
  36. </tr>
  37. <tr>
  38. <td class="name"><code>height</code></td>
  39. <td class="description last"><p>The height of the texture.<br/>Default is <code>1</code>.</p></td>
  40. </tr>
  41. <tr>
  42. <td class="name"><code>depth</code></td>
  43. <td class="description last"><p>The depth of the texture.<br/>Default is <code>1</code>.</p></td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. </div>
  48. </div>
  49. <h2 class="subsection-title">Properties</h2>
  50. <div class="member">
  51. <h3 class="name" id="flipY" translate="no">.<a href="#flipY">flipY</a><span class="type-signature"> : boolean</span> </h3>
  52. <div class="description">
  53. <p>If set to <code>true</code>, the texture is flipped along the vertical axis when
  54. uploaded to the GPU.</p>
  55. <p>Overwritten and set to <code>false</code> by default.<br/>Default is <code>false</code>.</p>
  56. </div>
  57. <dl class="details">
  58. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#flipY">Texture#flipY</a></dt>
  59. </dl>
  60. </div>
  61. <div class="member">
  62. <h3 class="name" id="generateMipmaps" translate="no">.<a href="#generateMipmaps">generateMipmaps</a><span class="type-signature"> : boolean</span> </h3>
  63. <div class="description">
  64. <p>Whether to generate mipmaps (if possible) for a texture.</p>
  65. <p>Overwritten and set to <code>false</code> by default.<br/>Default is <code>false</code>.</p>
  66. </div>
  67. <dl class="details">
  68. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#generateMipmaps">Texture#generateMipmaps</a></dt>
  69. </dl>
  70. </div>
  71. <div class="member">
  72. <h3 class="name" id="image" translate="no">.<a href="#image">image</a><span class="type-signature"> : Object</span> </h3>
  73. <div class="description">
  74. <p>The image definition of a data texture.</p>
  75. </div>
  76. <dl class="details">
  77. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#image">Texture#image</a></dt>
  78. </dl>
  79. </div>
  80. <div class="member">
  81. <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>
  82. <div class="description">
  83. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  84. </div>
  85. </div>
  86. <div class="member">
  87. <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>
  88. <div class="description">
  89. <p>How the texture is sampled when a texel covers more than one pixel.</p>
  90. <p>Overwritten and set to <code>NearestFilter</code> by default.<br/>Default is <code>NearestFilter</code>.</p>
  91. </div>
  92. <dl class="details">
  93. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#magFilter">Texture#magFilter</a></dt>
  94. </dl>
  95. </div>
  96. <div class="member">
  97. <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>
  98. <div class="description">
  99. <p>How the texture is sampled when a texel covers less than one pixel.</p>
  100. <p>Overwritten and set to <code>NearestFilter</code> by default.<br/>Default is <code>NearestFilter</code>.</p>
  101. </div>
  102. <dl class="details">
  103. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#minFilter">Texture#minFilter</a></dt>
  104. </dl>
  105. </div>
  106. <div class="member">
  107. <h3 class="name" id="unpackAlignment" translate="no">.<a href="#unpackAlignment">unpackAlignment</a><span class="type-signature"> : boolean</span> </h3>
  108. <div class="description">
  109. <p>Specifies the alignment requirements for the start of each pixel row in memory.</p>
  110. <p>Overwritten and set to <code>1</code> by default.<br/>Default is <code>1</code>.</p>
  111. </div>
  112. <dl class="details">
  113. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Texture.html#unpackAlignment">Texture#unpackAlignment</a></dt>
  114. </dl>
  115. </div>
  116. <div class="member">
  117. <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>
  118. <div class="description">
  119. <p>This defines how the texture is wrapped in the depth and corresponds to
  120. <em>W</em> in UVW mapping.<br/>Default is <code>ClampToEdgeWrapping</code>.</p>
  121. </div>
  122. </div>
  123. <h2 class="subsection-title">Source</h2>
  124. <p>
  125. <a href="https://github.com/mrdoob/three.js/blob/master/src/textures/Data3DTexture.js" target="_blank" rel="noopener" translate="no">src/textures/Data3DTexture.js</a>
  126. </p>
  127. </article>
  128. </section>
  129. <script src="../scripts/linenumber.js"></script>
  130. <script src="../scripts/page.js"></script>
  131. </body>
  132. </html>
粤ICP备19079148号