CubeTextureNode.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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">CubeTexture</span>, uvNode : <span class="param-type">Node.&lt;vec3></span>, levelNode : <span class="param-type">Node.&lt;int></span>, biasNode : <span class="param-type">Node.&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"><code>value</code></td>
  30. <td class="description last"><p>The cube 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. <tr>
  41. <td class="name"><code>biasNode</code></td>
  42. <td class="description last"><p>The bias node.<br/>Default is <code>null</code>.</p></td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. <h2 class="subsection-title">Properties</h2>
  49. <div class="member">
  50. <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>
  51. <div class="description">
  52. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  53. </div>
  54. </div>
  55. <h2 class="subsection-title">Methods</h2>
  56. <h3 class="name name-method" id="generateUV" translate="no">.<a href="#generateUV">generateUV</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span>, cubeUV : <span class="param-type">Node</span> )</span><span class="type-signature"> : string</span> </h3>
  57. <div class="method">
  58. <div class="description">
  59. <p>Generates the uv code snippet.</p>
  60. </div>
  61. <table class="params">
  62. <tbody>
  63. <tr>
  64. <td class="name"><code>builder</code></td>
  65. <td class="description last"><p>The current node builder.</p></td>
  66. </tr>
  67. <tr>
  68. <td class="name"><code>cubeUV</code></td>
  69. <td class="description last"><p>The uv node to generate code for.</p></td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. <dl class="details">
  74. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#generateUV">TextureNode#generateUV</a></dt>
  75. </dl>
  76. <dl class="details">
  77. <dt class="tag-returns"><strong>Returns:</strong> The generated code snippet.</dt>
  78. </dl>
  79. </div>
  80. <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>
  81. <div class="method">
  82. <div class="description">
  83. <p>Returns a default uvs based on the mapping type of the cube texture.</p>
  84. </div>
  85. <dl class="details">
  86. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#getDefaultUV">TextureNode#getDefaultUV</a></dt>
  87. </dl>
  88. <dl class="details">
  89. <dt class="tag-returns"><strong>Returns:</strong> The default uv attribute.</dt>
  90. </dl>
  91. </div>
  92. <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>
  93. <div class="method">
  94. <div class="description">
  95. <p>Overwrites the default implementation to return a fixed value <code>'cubeTexture'</code>.</p>
  96. </div>
  97. <table class="params">
  98. <tbody>
  99. <tr>
  100. <td class="name"><code>builder</code></td>
  101. <td class="description last"><p>The current node builder.</p></td>
  102. </tr>
  103. </tbody>
  104. </table>
  105. <dl class="details">
  106. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#getInputType">TextureNode#getInputType</a></dt>
  107. </dl>
  108. <dl class="details">
  109. <dt class="tag-returns"><strong>Returns:</strong> The input type.</dt>
  110. </dl>
  111. </div>
  112. <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>
  113. <div class="method">
  114. <div class="description">
  115. <p>Overwritten with an empty implementation since the <code>updateMatrix</code> flag is ignored
  116. for cube textures. The uv transformation matrix is not applied to cube textures.</p>
  117. </div>
  118. <table class="params">
  119. <tbody>
  120. <tr>
  121. <td class="name"><code>value</code></td>
  122. <td class="description last"><p>The update toggle.</p></td>
  123. </tr>
  124. </tbody>
  125. </table>
  126. <dl class="details">
  127. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#setUpdateMatrix">TextureNode#setUpdateMatrix</a></dt>
  128. </dl>
  129. </div>
  130. <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>
  131. <div class="method">
  132. <div class="description">
  133. <p>Setups the uv node. Depending on the backend as well as the texture type, it might be necessary
  134. to modify the uv node for correct sampling.</p>
  135. </div>
  136. <table class="params">
  137. <tbody>
  138. <tr>
  139. <td class="name"><code>builder</code></td>
  140. <td class="description last"><p>The current node builder.</p></td>
  141. </tr>
  142. <tr>
  143. <td class="name"><code>uvNode</code></td>
  144. <td class="description last"><p>The uv node to setup.</p></td>
  145. </tr>
  146. </tbody>
  147. </table>
  148. <dl class="details">
  149. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#setupUV">TextureNode#setupUV</a></dt>
  150. </dl>
  151. <dl class="details">
  152. <dt class="tag-returns"><strong>Returns:</strong> The updated uv node.</dt>
  153. </dl>
  154. </div>
  155. <h2 class="subsection-title">Source</h2>
  156. <p>
  157. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/accessors/CubeTextureNode.js" target="_blank" rel="noopener" translate="no">src/nodes/accessors/CubeTextureNode.js</a>
  158. </p>
  159. </article>
  160. </section>
  161. <script src="../scripts/linenumber.js"></script>
  162. <script src="../scripts/page.js"></script>
  163. </body>
  164. </html>
粤ICP备19079148号