NodeCode.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>NodeCode - 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. <h1 translate="no">NodeCode</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p><a href="NodeBuilder.html">NodeBuilder</a> is going to create instances of this class during the build process
  16. of nodes. They represent user-defined, native shader code portions that are going to be
  17. injected by the builder. A dictionary of node codes is maintained in <a href="NodeBuilder.html#codes">NodeBuilder#codes</a>
  18. for this purpose.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="NodeCode" translate="no">new <a href="#NodeCode">NodeCode</a><span class="signature">( name : <span class="param-type">string</span>, type : <span class="param-type">string</span>, code : <span class="param-type">string</span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new code node.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name">
  32. <strong>name</strong>
  33. </td>
  34. <td class="description last">
  35. <p>The name of the code.</p>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td class="name">
  40. <strong>type</strong>
  41. </td>
  42. <td class="description last">
  43. <p>The node type.</p>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class="name">
  48. <strong>code</strong>
  49. </td>
  50. <td class="description last">
  51. <p>The native shader code.</p>
  52. <p>Default is <code>''</code>.</p>
  53. </td>
  54. </tr>
  55. </tbody>
  56. </table>
  57. </div>
  58. </div>
  59. <h2 class="subsection-title">Properties</h2>
  60. <div class="member">
  61. <h3 class="name" id="code" translate="no">.<a href="#code">code</a><span class="type-signature"> : string</span> </h3>
  62. <div class="description">
  63. <p>The native shader code.</p>
  64. <p>Default is <code>''</code>.</p>
  65. </div>
  66. </div>
  67. <div class="member">
  68. <h3 class="name" id="name" translate="no">.<a href="#name">name</a><span class="type-signature"> : string</span> </h3>
  69. <div class="description">
  70. <p>The name of the code.</p>
  71. </div>
  72. </div>
  73. <div class="member">
  74. <h3 class="name" id="type" translate="no">.<a href="#type">type</a><span class="type-signature"> : string</span> </h3>
  75. <div class="description">
  76. <p>The node type.</p>
  77. </div>
  78. </div>
  79. <h2 class="subsection-title">Source</h2>
  80. <p>
  81. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/NodeCode.js" translate="no" target="_blank" rel="noopener">src/nodes/core/NodeCode.js</a>
  82. </p>
  83. </article>
  84. </section>
  85. <script src="../scripts/linenumber.js"></script>
  86. <script src="../scripts/page.js"></script>
  87. </body>
  88. </html>
粤ICP备19079148号