1
0

CubeTextureNode.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CubeTextureNode - 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">CubeTextureNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This type of uniform node represents a cube texture.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="CubeTextureNode" translate="no">new <a href="#CubeTextureNode">CubeTextureNode</a><span class="signature">( value : <span class="param-type"><a href="CubeTexture.html">CubeTexture</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, biasNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new cube texture node.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name">
  30. <strong>value</strong>
  31. </td>
  32. <td class="description last">
  33. <p>The cube texture.</p>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td class="name">
  38. <strong>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>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. <tr>
  55. <td class="name">
  56. <strong>biasNode</strong>
  57. </td>
  58. <td class="description last">
  59. <p>The bias node.</p>
  60. <p>Default is <code>null</code>.</p>
  61. </td>
  62. </tr>
  63. </tbody>
  64. </table>
  65. </div>
  66. </div>
  67. <h2 class="subsection-title">Properties</h2>
  68. <div class="member">
  69. <h3 class="name" id="isCubeTextureNode" translate="no">.<a href="#isCubeTextureNode">isCubeTextureNode</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.</p>
  72. <p>Default is <code>true</code>.</p>
  73. </div>
  74. </div>
  75. <h2 class="subsection-title">Methods</h2>
  76. <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>, cubeUV : <span class="param-type"><a href="Node.html">Node</a></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">
  85. <strong>builder</strong>
  86. </td>
  87. <td class="description last">
  88. <p>The current node builder.</p>
  89. </td>
  90. </tr>
  91. <tr>
  92. <td class="name">
  93. <strong>cubeUV</strong>
  94. </td>
  95. <td class="description last">
  96. <p>The uv node to generate code for.</p>
  97. </td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. <dl class="details">
  102. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#generateUV">TextureNode#generateUV</a></dt>
  103. </dl>
  104. <dl class="details">
  105. <dt class="tag-returns"><strong>Returns:</strong> The generated code snippet.</dt>
  106. </dl>
  107. </div>
  108. <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>
  109. <div class="method">
  110. <div class="description">
  111. <p>Returns a default uvs based on the mapping type of the cube texture.</p>
  112. </div>
  113. <dl class="details">
  114. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#getDefaultUV">TextureNode#getDefaultUV</a></dt>
  115. </dl>
  116. <dl class="details">
  117. <dt class="tag-returns"><strong>Returns:</strong> The default uv attribute.</dt>
  118. </dl>
  119. </div>
  120. <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>
  121. <div class="method">
  122. <div class="description">
  123. <p>Overwrites the default implementation to return a fixed value <code>'cubeTexture'</code>.</p>
  124. </div>
  125. <table class="params">
  126. <tbody>
  127. <tr>
  128. <td class="name">
  129. <strong>builder</strong>
  130. </td>
  131. <td class="description last">
  132. <p>The current node builder.</p>
  133. </td>
  134. </tr>
  135. </tbody>
  136. </table>
  137. <dl class="details">
  138. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#getInputType">TextureNode#getInputType</a></dt>
  139. </dl>
  140. <dl class="details">
  141. <dt class="tag-returns"><strong>Returns:</strong> The input type.</dt>
  142. </dl>
  143. </div>
  144. <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>
  145. <div class="method">
  146. <div class="description">
  147. <p>Overwritten with an empty implementation since the <code>updateMatrix</code> flag is ignored
  148. for cube textures. The uv transformation matrix is not applied to cube textures.</p>
  149. </div>
  150. <table class="params">
  151. <tbody>
  152. <tr>
  153. <td class="name">
  154. <strong>value</strong>
  155. </td>
  156. <td class="description last">
  157. <p>The update toggle.</p>
  158. </td>
  159. </tr>
  160. </tbody>
  161. </table>
  162. <dl class="details">
  163. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#setUpdateMatrix">TextureNode#setUpdateMatrix</a></dt>
  164. </dl>
  165. </div>
  166. <h3 class="name name-method" id="setupUV" translate="no">.<a href="#setupUV">setupUV</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"> : <a href="Node.html">Node</a></span> </h3>
  167. <div class="method">
  168. <div class="description">
  169. <p>Setups the uv node. Depending on the backend as well as the texture type, it might be necessary
  170. to modify the uv node for correct sampling.</p>
  171. </div>
  172. <table class="params">
  173. <tbody>
  174. <tr>
  175. <td class="name">
  176. <strong>builder</strong>
  177. </td>
  178. <td class="description last">
  179. <p>The current node builder.</p>
  180. </td>
  181. </tr>
  182. <tr>
  183. <td class="name">
  184. <strong>uvNode</strong>
  185. </td>
  186. <td class="description last">
  187. <p>The uv node to setup.</p>
  188. </td>
  189. </tr>
  190. </tbody>
  191. </table>
  192. <dl class="details">
  193. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#setupUV">TextureNode#setupUV</a></dt>
  194. </dl>
  195. <dl class="details">
  196. <dt class="tag-returns"><strong>Returns:</strong> The updated uv node.</dt>
  197. </dl>
  198. </div>
  199. <h2 class="subsection-title">Source</h2>
  200. <p>
  201. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/accessors/CubeTextureNode.js" translate="no" target="_blank" rel="noopener">src/nodes/accessors/CubeTextureNode.js</a>
  202. </p>
  203. </article>
  204. </section>
  205. <script src="../scripts/linenumber.js"></script>
  206. <script src="../scripts/page.js"></script>
  207. </body>
  208. </html>
粤ICP备19079148号