Texture3DNode.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Texture3DNode - 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="Node.html">Node</a> → <a href="InputNode.html">InputNode</a> → <a href="UniformNode.html">UniformNode</a> → <a href="TextureNode.html">TextureNode</a> → </p>
  13. <h1 translate="no">Texture3DNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This type of uniform node represents a 3D texture.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="Texture3DNode" translate="no">new <a href="#Texture3DNode">Texture3DNode</a><span class="signature">( value : <span class="param-type"><a href="Data3DTexture.html">Data3DTexture</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3)></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new 3D texture node.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name">
  30. <strong translate="no">value</strong>
  31. </td>
  32. <td class="description last">
  33. <p>The 3D texture.</p>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td class="name">
  38. <strong translate="no">uvNode</strong>
  39. </td>
  40. <td class="description last">
  41. <p>The uv node.</p>
  42. <p>Default is <code>null</code>.</p>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class="name">
  47. <strong translate="no">levelNode</strong>
  48. </td>
  49. <td class="description last">
  50. <p>The level node.</p>
  51. <p>Default is <code>null</code>.</p>
  52. </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="isTexture3DNode" translate="no">.<a href="#isTexture3DNode">isTexture3DNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  61. <div class="description">
  62. <p>This flag can be used for type testing.</p>
  63. <p>Default is <code>true</code>.</p>
  64. </div>
  65. </div>
  66. <h2 class="subsection-title">Methods</h2>
  67. <h3 class="name name-method" id="generateOffset" translate="no">.<a href="#generateOffset">generateOffset</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span>, offsetNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : string</span> </h3>
  68. <div class="method">
  69. <div class="description">
  70. <p>Generates the offset code snippet.</p>
  71. </div>
  72. <table class="params">
  73. <tbody>
  74. <tr>
  75. <td class="name">
  76. <strong translate="no">builder</strong>
  77. </td>
  78. <td class="description last">
  79. <p>The current node builder.</p>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td class="name">
  84. <strong translate="no">offsetNode</strong>
  85. </td>
  86. <td class="description last">
  87. <p>The offset node to generate code for.</p>
  88. </td>
  89. </tr>
  90. </tbody>
  91. </table>
  92. <dl class="details">
  93. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#generateOffset">TextureNode#generateOffset</a></dt>
  94. </dl>
  95. <dl class="details">
  96. <dt class="tag-returns"><strong>Returns:</strong> The generated code snippet.</dt>
  97. </dl>
  98. </div>
  99. <h3 class="name name-method" id="generateUV" translate="no">.<a href="#generateUV">generateUV</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : string</span> </h3>
  100. <div class="method">
  101. <div class="description">
  102. <p>Generates the uv code snippet.</p>
  103. </div>
  104. <table class="params">
  105. <tbody>
  106. <tr>
  107. <td class="name">
  108. <strong translate="no">builder</strong>
  109. </td>
  110. <td class="description last">
  111. <p>The current node builder.</p>
  112. </td>
  113. </tr>
  114. <tr>
  115. <td class="name">
  116. <strong translate="no">uvNode</strong>
  117. </td>
  118. <td class="description last">
  119. <p>The uv node to generate code for.</p>
  120. </td>
  121. </tr>
  122. </tbody>
  123. </table>
  124. <dl class="details">
  125. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#generateUV">TextureNode#generateUV</a></dt>
  126. </dl>
  127. <dl class="details">
  128. <dt class="tag-returns"><strong>Returns:</strong> The generated code snippet.</dt>
  129. </dl>
  130. </div>
  131. <h3 class="name name-method" id="getDefaultUV" translate="no">.<a href="#getDefaultUV">getDefaultUV</a><span class="signature">()</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  132. <div class="method">
  133. <div class="description">
  134. <p>Returns a default uv node which is in context of 3D textures a three-dimensional
  135. uv node.</p>
  136. </div>
  137. <dl class="details">
  138. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#getDefaultUV">TextureNode#getDefaultUV</a></dt>
  139. </dl>
  140. <dl class="details">
  141. <dt class="tag-returns"><strong>Returns:</strong> The default uv node.</dt>
  142. </dl>
  143. </div>
  144. <h3 class="name name-method" id="getInputType" translate="no">.<a href="#getInputType">getInputType</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
  145. <div class="method">
  146. <div class="description">
  147. <p>Overwrites the default implementation to return a fixed value <code>'texture3D'</code>.</p>
  148. </div>
  149. <table class="params">
  150. <tbody>
  151. <tr>
  152. <td class="name">
  153. <strong translate="no">builder</strong>
  154. </td>
  155. <td class="description last">
  156. <p>The current node builder.</p>
  157. </td>
  158. </tr>
  159. </tbody>
  160. </table>
  161. <dl class="details">
  162. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#getInputType">TextureNode#getInputType</a></dt>
  163. </dl>
  164. <dl class="details">
  165. <dt class="tag-returns"><strong>Returns:</strong> The input type.</dt>
  166. </dl>
  167. </div>
  168. <h3 class="name name-method" id="normal" translate="no">.<a href="#normal">normal</a><span class="signature">( uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  169. <div class="method">
  170. <div class="description">
  171. <p>Computes the normal for the given uv. These texture coordiantes represent a
  172. position inside the 3D texture. Unlike geometric normals, this normal
  173. represents a slope or gradient of scalar data inside the 3D texture.</p>
  174. </div>
  175. <table class="params">
  176. <tbody>
  177. <tr>
  178. <td class="name">
  179. <strong translate="no">uvNode</strong>
  180. </td>
  181. <td class="description last">
  182. <p>The uv node that defines a position in the 3D texture.</p>
  183. </td>
  184. </tr>
  185. </tbody>
  186. </table>
  187. <dl class="details">
  188. <dt class="tag-returns"><strong>Returns:</strong> The normal representing the slope/gradient in the data.</dt>
  189. </dl>
  190. </div>
  191. <h3 class="name name-method" id="setUpdateMatrix" translate="no">.<a href="#setUpdateMatrix">setUpdateMatrix</a><span class="signature">( value : <span class="param-type">boolean</span> )</span> </h3>
  192. <div class="method">
  193. <div class="description">
  194. <p>Overwritten with an empty implementation since the <code>updateMatrix</code> flag is ignored
  195. for 3D textures. The uv transformation matrix is not applied to 3D textures.</p>
  196. </div>
  197. <table class="params">
  198. <tbody>
  199. <tr>
  200. <td class="name">
  201. <strong translate="no">value</strong>
  202. </td>
  203. <td class="description last">
  204. <p>The update toggle.</p>
  205. </td>
  206. </tr>
  207. </tbody>
  208. </table>
  209. <dl class="details">
  210. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#setUpdateMatrix">TextureNode#setUpdateMatrix</a></dt>
  211. </dl>
  212. </div>
  213. <h2 class="subsection-title">Source</h2>
  214. <p>
  215. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/accessors/Texture3DNode.js" translate="no" target="_blank" rel="noopener">src/nodes/accessors/Texture3DNode.js</a>
  216. </p>
  217. </article>
  218. </section>
  219. <script src="../scripts/linenumber.js"></script>
  220. <script src="../scripts/page.js"></script>
  221. </body>
  222. </html>
粤ICP备19079148号