Texture3DNode.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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">Data3DTexture</span>, uvNode : <span class="param-type">Node.&lt;(vec2|vec3)></span>, levelNode : <span class="param-type">Node.&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"><code>value</code></td>
  30. <td class="description last"><p>The 3D texture.</p></td>
  31. </tr>
  32. <tr>
  33. <td class="name"><code>uvNode</code></td>
  34. <td class="description last"><p>The uv node.<br/>Default is <code>null</code>.</p></td>
  35. </tr>
  36. <tr>
  37. <td class="name"><code>levelNode</code></td>
  38. <td class="description last"><p>The level node.<br/>Default is <code>null</code>.</p></td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. </div>
  44. <h2 class="subsection-title">Properties</h2>
  45. <div class="member">
  46. <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>
  47. <div class="description">
  48. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  49. </div>
  50. </div>
  51. <h2 class="subsection-title">Methods</h2>
  52. <h3 class="name name-method" id="generateOffset" translate="no">.<a href="#generateOffset">generateOffset</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span>, offsetNode : <span class="param-type">Node</span> )</span><span class="type-signature"> : string</span> </h3>
  53. <div class="method">
  54. <div class="description">
  55. <p>Generates the offset code snippet.</p>
  56. </div>
  57. <table class="params">
  58. <tbody>
  59. <tr>
  60. <td class="name"><code>builder</code></td>
  61. <td class="description last"><p>The current node builder.</p></td>
  62. </tr>
  63. <tr>
  64. <td class="name"><code>offsetNode</code></td>
  65. <td class="description last"><p>The offset node to generate code for.</p></td>
  66. </tr>
  67. </tbody>
  68. </table>
  69. <dl class="details">
  70. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#generateOffset">TextureNode#generateOffset</a></dt>
  71. </dl>
  72. <dl class="details">
  73. <dt class="tag-returns"><strong>Returns:</strong> The generated code snippet.</dt>
  74. </dl>
  75. </div>
  76. <h3 class="name name-method" id="generateUV" translate="no">.<a href="#generateUV">generateUV</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span>, uvNode : <span class="param-type">Node</span> )</span><span class="type-signature"> : string</span> </h3>
  77. <div class="method">
  78. <div class="description">
  79. <p>Generates the uv code snippet.</p>
  80. </div>
  81. <table class="params">
  82. <tbody>
  83. <tr>
  84. <td class="name"><code>builder</code></td>
  85. <td class="description last"><p>The current node builder.</p></td>
  86. </tr>
  87. <tr>
  88. <td class="name"><code>uvNode</code></td>
  89. <td class="description last"><p>The uv node to generate code for.</p></td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. <dl class="details">
  94. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#generateUV">TextureNode#generateUV</a></dt>
  95. </dl>
  96. <dl class="details">
  97. <dt class="tag-returns"><strong>Returns:</strong> The generated code snippet.</dt>
  98. </dl>
  99. </div>
  100. <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>
  101. <div class="method">
  102. <div class="description">
  103. <p>Returns a default uv node which is in context of 3D textures a three-dimensional
  104. uv node.</p>
  105. </div>
  106. <dl class="details">
  107. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#getDefaultUV">TextureNode#getDefaultUV</a></dt>
  108. </dl>
  109. <dl class="details">
  110. <dt class="tag-returns"><strong>Returns:</strong> The default uv node.</dt>
  111. </dl>
  112. </div>
  113. <h3 class="name name-method" id="getInputType" translate="no">.<a href="#getInputType">getInputType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
  114. <div class="method">
  115. <div class="description">
  116. <p>Overwrites the default implementation to return a fixed value <code>'texture3D'</code>.</p>
  117. </div>
  118. <table class="params">
  119. <tbody>
  120. <tr>
  121. <td class="name"><code>builder</code></td>
  122. <td class="description last"><p>The current node builder.</p></td>
  123. </tr>
  124. </tbody>
  125. </table>
  126. <dl class="details">
  127. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#getInputType">TextureNode#getInputType</a></dt>
  128. </dl>
  129. <dl class="details">
  130. <dt class="tag-returns"><strong>Returns:</strong> The input type.</dt>
  131. </dl>
  132. </div>
  133. <h3 class="name name-method" id="normal" translate="no">.<a href="#normal">normal</a><span class="signature">( uvNode : <span class="param-type">Node.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  134. <div class="method">
  135. <div class="description">
  136. <p>TODO.</p>
  137. </div>
  138. <table class="params">
  139. <tbody>
  140. <tr>
  141. <td class="name"><code>uvNode</code></td>
  142. <td class="description last"><p>The uv node .</p></td>
  143. </tr>
  144. </tbody>
  145. </table>
  146. <dl class="details">
  147. <dt class="tag-returns"><strong>Returns:</strong> TODO.</dt>
  148. </dl>
  149. </div>
  150. <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>
  151. <div class="method">
  152. <div class="description">
  153. <p>Overwritten with an empty implementation since the <code>updateMatrix</code> flag is ignored
  154. for 3D textures. The uv transformation matrix is not applied to 3D textures.</p>
  155. </div>
  156. <table class="params">
  157. <tbody>
  158. <tr>
  159. <td class="name"><code>value</code></td>
  160. <td class="description last"><p>The update toggle.</p></td>
  161. </tr>
  162. </tbody>
  163. </table>
  164. <dl class="details">
  165. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#setUpdateMatrix">TextureNode#setUpdateMatrix</a></dt>
  166. </dl>
  167. </div>
  168. <h3 class="name name-method" id="setupUV" translate="no">.<a href="#setupUV">setupUV</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span>, uvNode : <span class="param-type">Node</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  169. <div class="method">
  170. <div class="description">
  171. <p>Overwrites the default implementation to return the unmodified uv node.</p>
  172. </div>
  173. <table class="params">
  174. <tbody>
  175. <tr>
  176. <td class="name"><code>builder</code></td>
  177. <td class="description last"><p>The current node builder.</p></td>
  178. </tr>
  179. <tr>
  180. <td class="name"><code>uvNode</code></td>
  181. <td class="description last"><p>The uv node to setup.</p></td>
  182. </tr>
  183. </tbody>
  184. </table>
  185. <dl class="details">
  186. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#setupUV">TextureNode#setupUV</a></dt>
  187. </dl>
  188. <dl class="details">
  189. <dt class="tag-returns"><strong>Returns:</strong> The unmodified uv node.</dt>
  190. </dl>
  191. </div>
  192. <h2 class="subsection-title">Source</h2>
  193. <p>
  194. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/accessors/Texture3DNode.js" target="_blank" rel="noopener" translate="no">src/nodes/accessors/Texture3DNode.js</a>
  195. </p>
  196. </article>
  197. </section>
  198. <script src="../scripts/linenumber.js"></script>
  199. <script src="../scripts/page.js"></script>
  200. </body>
  201. </html>
粤ICP备19079148号