AttributeNode.html 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>AttributeNode - 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">AttributeNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Base class for representing shader attributes as nodes.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="AttributeNode" translate="no">new <a href="#AttributeNode">AttributeNode</a><span class="signature">( attributeName : <span class="param-type">string</span>, nodeType : <span class="param-type">string</span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new attribute node.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name"><code>attributeName</code></td>
  30. <td class="description last"><p>The name of the attribute.</p></td>
  31. </tr>
  32. <tr>
  33. <td class="name"><code>nodeType</code></td>
  34. <td class="description last"><p>The node type.<br/>Default is <code>null</code>.</p></td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. </div>
  39. </div>
  40. <h2 class="subsection-title">Properties</h2>
  41. <div class="member">
  42. <h3 class="name" id="global" translate="no">.<a href="#global">global</a><span class="type-signature"> : boolean</span> </h3>
  43. <div class="description">
  44. <p><code>AttributeNode</code> sets this property to <code>true</code> by default.<br/>Default is <code>true</code>.</p>
  45. </div>
  46. <dl class="details">
  47. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#global">Node#global</a></dt>
  48. </dl>
  49. </div>
  50. <h2 class="subsection-title">Methods</h2>
  51. <h3 class="name name-method" id="getAttributeName" translate="no">.<a href="#getAttributeName">getAttributeName</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
  52. <div class="method">
  53. <div class="description">
  54. <p>Returns the attribute name of this node. The method can be
  55. overwritten in derived classes if the final name must be computed
  56. analytically.</p>
  57. </div>
  58. <table class="params">
  59. <tbody>
  60. <tr>
  61. <td class="name"><code>builder</code></td>
  62. <td class="description last"><p>The current node builder.</p></td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. <dl class="details">
  67. <dt class="tag-returns"><strong>Returns:</strong> The attribute name.</dt>
  68. </dl>
  69. </div>
  70. <h3 class="name name-method" id="setAttributeName" translate="no">.<a href="#setAttributeName">setAttributeName</a><span class="signature">( attributeName : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="AttributeNode.html">AttributeNode</a></span> </h3>
  71. <div class="method">
  72. <div class="description">
  73. <p>Sets the attribute name to the given value. The method can be
  74. overwritten in derived classes if the final name must be computed
  75. analytically.</p>
  76. </div>
  77. <table class="params">
  78. <tbody>
  79. <tr>
  80. <td class="name"><code>attributeName</code></td>
  81. <td class="description last"><p>The name of the attribute.</p></td>
  82. </tr>
  83. </tbody>
  84. </table>
  85. <dl class="details">
  86. <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
  87. </dl>
  88. </div>
  89. <h2 class="subsection-title">Source</h2>
  90. <p>
  91. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/AttributeNode.js" target="_blank" rel="noopener" translate="no">src/nodes/core/AttributeNode.js</a>
  92. </p>
  93. </article>
  94. </section>
  95. <script src="../scripts/linenumber.js"></script>
  96. <script src="../scripts/page.js"></script>
  97. </body>
  98. </html>
粤ICP备19079148号