ConvertNode.html 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ConvertNode - 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> → </p>
  13. <h1 translate="no">ConvertNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This module is part of the TSL core and usually not used in app level code.
  17. It represents a convert operation during the shader generation process
  18. meaning it converts the data type of a node to a target data type.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="ConvertNode" translate="no">new <a href="#ConvertNode">ConvertNode</a><span class="signature">( node : <span class="param-type">Node</span>, convertTo : <span class="param-type">string</span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new convert node.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name"><code>node</code></td>
  32. <td class="description last"><p>The node which type should be converted.</p></td>
  33. </tr>
  34. <tr>
  35. <td class="name"><code>convertTo</code></td>
  36. <td class="description last"><p>The target node type. Multiple types can be defined by separating them with a <code>|</code> sign.</p></td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. </div>
  41. </div>
  42. <h2 class="subsection-title">Properties</h2>
  43. <div class="member">
  44. <h3 class="name" id="convertTo" translate="no">.<a href="#convertTo">convertTo</a><span class="type-signature"> : string</span> </h3>
  45. <div class="description">
  46. <p>The target node type. Multiple types can be defined by separating them with a <code>|</code> sign.</p>
  47. </div>
  48. </div>
  49. <div class="member">
  50. <h3 class="name" id="node" translate="no">.<a href="#node">node</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  51. <div class="description">
  52. <p>The node which type should be converted.</p>
  53. </div>
  54. </div>
  55. <h2 class="subsection-title">Methods</h2>
  56. <h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
  57. <div class="method">
  58. <div class="description">
  59. <p>This method is overwritten since the implementation tries to infer the best
  60. matching type from the <a href="ConvertNode.html#convertTo">ConvertNode#convertTo</a> property.</p>
  61. </div>
  62. <table class="params">
  63. <tbody>
  64. <tr>
  65. <td class="name"><code>builder</code></td>
  66. <td class="description last"><p>The current node builder.</p></td>
  67. </tr>
  68. </tbody>
  69. </table>
  70. <dl class="details">
  71. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
  72. </dl>
  73. <dl class="details">
  74. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  75. </dl>
  76. </div>
  77. <h2 class="subsection-title">Source</h2>
  78. <p>
  79. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/utils/ConvertNode.js" target="_blank" rel="noopener" translate="no">src/nodes/utils/ConvertNode.js</a>
  80. </p>
  81. </article>
  82. </section>
  83. <script src="../scripts/linenumber.js"></script>
  84. <script src="../scripts/page.js"></script>
  85. </body>
  86. </html>
粤ICP备19079148号