1
0

ScriptableValueNode.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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">any</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"><code>value</code></td>
  30. <td class="description last"><p>The value.<br/>Default is <code>null</code>.</p></td>
  31. </tr>
  32. </tbody>
  33. </table>
  34. </div>
  35. </div>
  36. <h2 class="subsection-title">Properties</h2>
  37. <div class="member">
  38. <h3 class="name" id="events" translate="no">.<a href="#events">events</a><span class="type-signature"> : <a href="EventDispatcher.html">EventDispatcher</a></span> </h3>
  39. <div class="description">
  40. <p>An event dispatcher for managing events.</p>
  41. </div>
  42. </div>
  43. <div class="member">
  44. <h3 class="name" id="inputType" translate="no">.<a href="#inputType">inputType</a><span class="type-signature"> : string</span> </h3>
  45. <div class="description">
  46. <p>If this node represents an input, this property represents the input type.<br/>Default is <code>null</code>.</p>
  47. </div>
  48. </div>
  49. <div class="member">
  50. <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>
  51. <div class="description">
  52. <p>Whether this node represents an output or not.<br/>Default is <code>true</code>.</p>
  53. </div>
  54. </div>
  55. <div class="member">
  56. <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>
  57. <div class="description">
  58. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  59. </div>
  60. </div>
  61. <div class="member">
  62. <h3 class="name" id="outputType" translate="no">.<a href="#outputType">outputType</a><span class="type-signature"> : string</span> </h3>
  63. <div class="description">
  64. <p>If this node represents an output, this property represents the output type.<br/>Default is <code>null</code>.</p>
  65. </div>
  66. </div>
  67. <div class="member">
  68. <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>
  69. <div class="description">
  70. <p>The node's value.</p>
  71. </div>
  72. </div>
  73. <h2 class="subsection-title">Methods</h2>
  74. <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>
  75. <div class="method">
  76. <div class="description">
  77. <p>Overwritten since the node type is inferred from the value.</p>
  78. </div>
  79. <table class="params">
  80. <tbody>
  81. <tr>
  82. <td class="name"><code>builder</code></td>
  83. <td class="description last"><p>The current node builder.</p></td>
  84. </tr>
  85. </tbody>
  86. </table>
  87. <dl class="details">
  88. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
  89. </dl>
  90. <dl class="details">
  91. <dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
  92. </dl>
  93. </div>
  94. <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>
  95. <div class="method">
  96. <div class="description">
  97. <p>The <code>value</code> property usually represents a node or even binary data in form of array buffers.
  98. In this case, this method tries to return the actual value behind the complex type.</p>
  99. </div>
  100. <dl class="details">
  101. <dt class="tag-returns"><strong>Returns:</strong> The value.</dt>
  102. </dl>
  103. </div>
  104. <h3 class="name name-method" id="refresh" translate="no">.<a href="#refresh">refresh</a><span class="signature">()</span> </h3>
  105. <div class="method">
  106. <div class="description">
  107. <p>Dispatches the <code>refresh</code> event.</p>
  108. </div>
  109. </div>
  110. <h2 class="subsection-title">Source</h2>
  111. <p>
  112. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/code/ScriptableValueNode.js" target="_blank" rel="noopener" translate="no">src/nodes/code/ScriptableValueNode.js</a>
  113. </p>
  114. </article>
  115. </section>
  116. <script src="../scripts/linenumber.js"></script>
  117. <script src="../scripts/page.js"></script>
  118. </body>
  119. </html>
粤ICP备19079148号