InspectorNode.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>InspectorNode - 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">InspectorNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>InspectorNode is a wrapper node that allows inspection of node values during rendering.
  17. It can be used to debug or analyze node outputs in the rendering pipeline.</p></div>
  18. </header>
  19. <article>
  20. <div class="container-overview">
  21. <h2>Constructor</h2>
  22. <h3 class="name name-method" id="InspectorNode" translate="no">new <a href="#InspectorNode">InspectorNode</a><span class="signature">( node : <span class="param-type">Node</span>, name : <span class="param-type">string</span>, callback : <span class="param-type">function | null</span> )</span> </h3>
  23. <div class="method">
  24. <div class="description">
  25. <p>Creates an InspectorNode.</p>
  26. </div>
  27. <table class="params">
  28. <tbody>
  29. <tr>
  30. <td class="name"><code>node</code></td>
  31. <td class="description last"><p>The node to inspect.</p></td>
  32. </tr>
  33. <tr>
  34. <td class="name"><code>name</code></td>
  35. <td class="description last"><p>Optional name for the inspector node.<br/>Default is <code>''</code>.</p></td>
  36. </tr>
  37. <tr>
  38. <td class="name"><code>callback</code></td>
  39. <td class="description last"><p>Optional callback to modify the node during setup.<br/>Default is <code>null</code>.</p></td>
  40. </tr>
  41. </tbody>
  42. </table>
  43. </div>
  44. </div>
  45. <h2 class="subsection-title">Properties</h2>
  46. <div class="member">
  47. <h3 class="name" id=".type" translate="no">.<a href="#.type">type</a> </h3>
  48. <div class="description">
  49. <p>Returns the type of the node.</p>
  50. </div>
  51. </div>
  52. <h2 class="subsection-title">Methods</h2>
  53. <h3 class="name name-method" id="getName" translate="no">.<a href="#getName">getName</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
  54. <div class="method">
  55. <div class="description">
  56. <p>Returns the name of the inspector node.</p>
  57. </div>
  58. <dl class="details">
  59. <dt class="tag-returns"><strong>Returns:</strong> </dt>
  60. </dl>
  61. </div>
  62. <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>
  63. <div class="method">
  64. <div class="description">
  65. <p>Returns the type of the wrapped node.</p>
  66. </div>
  67. <table class="params">
  68. <tbody>
  69. <tr>
  70. <td class="name"><code>builder</code></td>
  71. <td class="description last"><p>The node builder.</p></td>
  72. </tr>
  73. </tbody>
  74. </table>
  75. <dl class="details">
  76. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
  77. </dl>
  78. <dl class="details">
  79. <dt class="tag-returns"><strong>Returns:</strong> </dt>
  80. </dl>
  81. </div>
  82. <h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  83. <div class="method">
  84. <div class="description">
  85. <p>Sets up the inspector node.</p>
  86. </div>
  87. <table class="params">
  88. <tbody>
  89. <tr>
  90. <td class="name"><code>builder</code></td>
  91. <td class="description last"><p>The node builder.</p></td>
  92. </tr>
  93. </tbody>
  94. </table>
  95. <dl class="details">
  96. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#setup">Node#setup</a></dt>
  97. </dl>
  98. <dl class="details">
  99. <dt class="tag-returns"><strong>Returns:</strong> The setup node.</dt>
  100. </dl>
  101. </div>
  102. <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">( frame : <span class="param-type">NodeFrame</span> )</span> </h3>
  103. <div class="method">
  104. <div class="description">
  105. <p>Updates the inspector node, allowing inspection of the wrapped node.</p>
  106. </div>
  107. <table class="params">
  108. <tbody>
  109. <tr>
  110. <td class="name"><code>frame</code></td>
  111. <td class="description last"><p>A reference to the current node frame.</p></td>
  112. </tr>
  113. </tbody>
  114. </table>
  115. <dl class="details">
  116. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#update">Node#update</a></dt>
  117. </dl>
  118. </div>
  119. <h2 class="subsection-title">Source</h2>
  120. <p>
  121. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/InspectorNode.js" target="_blank" rel="noopener" translate="no">src/nodes/core/InspectorNode.js</a>
  122. </p>
  123. </article>
  124. </section>
  125. <script src="../scripts/linenumber.js"></script>
  126. <script src="../scripts/page.js"></script>
  127. </body>
  128. </html>
粤ICP备19079148号