ScriptableValueNode.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ScriptableValueNode - 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">ScriptableValueNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p><code>ScriptableNode</code> uses this class to manage script inputs and outputs.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="ScriptableValueNode" translate="no">new <a href="#ScriptableValueNode">ScriptableValueNode</a><span class="signature">( value : <span class="param-type"><a href="global.html#any">any</a></span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new scriptable 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 value.</p>
  34. <p>Default is <code>null</code>.</p>
  35. </td>
  36. </tr>
  37. </tbody>
  38. </table>
  39. </div>
  40. </div>
  41. <h2 class="subsection-title">Properties</h2>
  42. <div class="member">
  43. <h3 class="name" id="events" translate="no">.<a href="#events">events</a><span class="type-signature"> : <a href="EventDispatcher.html">EventDispatcher</a></span> </h3>
  44. <div class="description">
  45. <p>An event dispatcher for managing events.</p>
  46. </div>
  47. </div>
  48. <div class="member">
  49. <h3 class="name" id="inputType" translate="no">.<a href="#inputType">inputType</a><span class="type-signature"> : string</span> </h3>
  50. <div class="description">
  51. <p>If this node represents an input, this property represents the input type.</p>
  52. <p>Default is <code>null</code>.</p>
  53. </div>
  54. </div>
  55. <div class="member">
  56. <h3 class="name" id="isScriptableOutputNode" translate="no">.<a href="#isScriptableOutputNode">isScriptableOutputNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  57. <div class="description">
  58. <p>Whether this node represents an output or not.</p>
  59. <p>Default is <code>true</code>.</p>
  60. </div>
  61. </div>
  62. <div class="member">
  63. <h3 class="name" id="isScriptableValueNode" translate="no">.<a href="#isScriptableValueNode">isScriptableValueNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  64. <div class="description">
  65. <p>This flag can be used for type testing.</p>
  66. <p>Default is <code>true</code>.</p>
  67. </div>
  68. </div>
  69. <div class="member">
  70. <h3 class="name" id="outputType" translate="no">.<a href="#outputType">outputType</a><span class="type-signature"> : string</span> </h3>
  71. <div class="description">
  72. <p>If this node represents an output, this property represents the output type.</p>
  73. <p>Default is <code>null</code>.</p>
  74. </div>
  75. </div>
  76. <div class="member">
  77. <h3 class="name" id="value" translate="no">.<a href="#value">value</a><span class="type-signature"> : <a href="global.html#any">any</a></span> </h3>
  78. <div class="description">
  79. <p>The node's value.</p>
  80. </div>
  81. </div>
  82. <h2 class="subsection-title">Methods</h2>
  83. <h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
  84. <div class="method">
  85. <div class="description">
  86. <p>Overwritten since the node type is inferred from the value.</p>
  87. </div>
  88. <table class="params">
  89. <tbody>
  90. <tr>
  91. <td class="name">
  92. <strong>builder</strong>
  93. </td>
  94. <td class="description last">
  95. <p>The current node builder.</p>
  96. </td>
  97. </tr>
  98. </tbody>
  99. </table>
  100. <dl class="details">
  101. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
  102. </dl>
  103. <dl class="details">
  104. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  105. </dl>
  106. </div>
  107. <h3 class="name name-method" id="getValue" translate="no">.<a href="#getValue">getValue</a><span class="signature">()</span><span class="type-signature"> : <a href="global.html#any">any</a></span> </h3>
  108. <div class="method">
  109. <div class="description">
  110. <p>The <code>value</code> property usually represents a node or even binary data in form of array buffers.
  111. In this case, this method tries to return the actual value behind the complex type.</p>
  112. </div>
  113. <dl class="details">
  114. <dt class="tag-returns"><strong>Returns:</strong> The value.</dt>
  115. </dl>
  116. </div>
  117. <h3 class="name name-method" id="refresh" translate="no">.<a href="#refresh">refresh</a><span class="signature">()</span> </h3>
  118. <div class="method">
  119. <div class="description">
  120. <p>Dispatches the <code>refresh</code> event.</p>
  121. </div>
  122. </div>
  123. <h2 class="subsection-title">Source</h2>
  124. <p>
  125. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/code/ScriptableValueNode.js" translate="no" target="_blank" rel="noopener">src/nodes/code/ScriptableValueNode.js</a>
  126. </p>
  127. </article>
  128. </section>
  129. <script src="../scripts/linenumber.js"></script>
  130. <script src="../scripts/page.js"></script>
  131. </body>
  132. </html>
粤ICP备19079148号