InspectorBase.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>InspectorBase - 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">InspectorBase</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <div class="container-overview">
  18. <h3 class="name name-method" id="InspectorBase" translate="no">new <a href="#InspectorBase">InspectorBase</a><span class="signature">()</span> </h3>
  19. <div class="method">
  20. <div class="description">
  21. <p>InspectorBase is the base class for all inspectors.</p>
  22. </div>
  23. </div>
  24. </div>
  25. <h2 class="subsection-title">Properties</h2>
  26. <div class="member">
  27. <h3 class="name" id="currentFrame" translate="no">.<a href="#currentFrame">currentFrame</a><span class="type-signature"> : Object</span> </h3>
  28. <div class="description">
  29. <p>The current frame being processed.</p>
  30. </div>
  31. </div>
  32. <div class="member">
  33. <h3 class="name" id="nodeFrame" translate="no">.<a href="#nodeFrame">nodeFrame</a> </h3>
  34. <div class="description">
  35. <p>Returns the node frame for the current renderer.</p>
  36. </div>
  37. </div>
  38. <h2 class="subsection-title">Methods</h2>
  39. <h3 class="name name-method" id="begin" translate="no">.<a href="#begin">begin</a><span class="signature">()</span> </h3>
  40. <div class="method">
  41. <div class="description">
  42. <p>Called when a frame begins.</p>
  43. </div>
  44. </div>
  45. <h3 class="name name-method" id="beginCompute" translate="no">.<a href="#beginCompute">beginCompute</a><span class="signature">( uid : <span class="param-type">string</span>, computeNode : <span class="param-type">ComputeNode</span> )</span> </h3>
  46. <div class="method">
  47. <div class="description">
  48. <p>Called when a compute operation begins.</p>
  49. </div>
  50. <table class="params">
  51. <tbody>
  52. <tr>
  53. <td class="name"><code>uid</code></td>
  54. <td class="description last"><p>A unique identifier for the render context.</p></td>
  55. </tr>
  56. <tr>
  57. <td class="name"><code>computeNode</code></td>
  58. <td class="description last"><p>The compute node being executed.</p></td>
  59. </tr>
  60. </tbody>
  61. </table>
  62. </div>
  63. <h3 class="name name-method" id="beginRender" translate="no">.<a href="#beginRender">beginRender</a><span class="signature">( uid : <span class="param-type">string</span>, scene : <span class="param-type">Scene</span>, camera : <span class="param-type">Camera</span>, renderTarget : <span class="param-type">WebGLRenderTarget</span> )</span> </h3>
  64. <div class="method">
  65. <div class="description">
  66. <p>Called when a render operation begins.</p>
  67. </div>
  68. <table class="params">
  69. <tbody>
  70. <tr>
  71. <td class="name"><code>uid</code></td>
  72. <td class="description last"><p>A unique identifier for the render context.</p></td>
  73. </tr>
  74. <tr>
  75. <td class="name"><code>scene</code></td>
  76. <td class="description last"><p>The scene being rendered.</p></td>
  77. </tr>
  78. <tr>
  79. <td class="name"><code>camera</code></td>
  80. <td class="description last"><p>The camera being used for rendering.</p></td>
  81. </tr>
  82. <tr>
  83. <td class="name"><code>renderTarget</code></td>
  84. <td class="description last"><p>The render target, if any.</p></td>
  85. </tr>
  86. </tbody>
  87. </table>
  88. </div>
  89. <h3 class="name name-method" id="computeAsync" translate="no">.<a href="#computeAsync">computeAsync</a><span class="signature">( computeNode : <span class="param-type">ComputeNode</span>, dispatchSizeOrCount : <span class="param-type">number | Array.&lt;number></span> )</span> </h3>
  90. <div class="method">
  91. <div class="description">
  92. <p>When a compute operation is performed.</p>
  93. </div>
  94. <table class="params">
  95. <tbody>
  96. <tr>
  97. <td class="name"><code>computeNode</code></td>
  98. <td class="description last"><p>The compute node being executed.</p></td>
  99. </tr>
  100. <tr>
  101. <td class="name"><code>dispatchSizeOrCount</code></td>
  102. <td class="description last"><p>The dispatch size or count.</p></td>
  103. </tr>
  104. </tbody>
  105. </table>
  106. </div>
  107. <h3 class="name name-method" id="copyFramebufferToTexture" translate="no">.<a href="#copyFramebufferToTexture">copyFramebufferToTexture</a><span class="signature">( framebufferTexture : <span class="param-type">Texture</span> )</span> </h3>
  108. <div class="method">
  109. <div class="description">
  110. <p>Called when a framebuffer copy operation is performed.</p>
  111. </div>
  112. <table class="params">
  113. <tbody>
  114. <tr>
  115. <td class="name"><code>framebufferTexture</code></td>
  116. <td class="description last"><p>The texture associated with the framebuffer.</p></td>
  117. </tr>
  118. </tbody>
  119. </table>
  120. </div>
  121. <h3 class="name name-method" id="copyTextureToTexture" translate="no">.<a href="#copyTextureToTexture">copyTextureToTexture</a><span class="signature">( srcTexture : <span class="param-type">Texture</span>, dstTexture : <span class="param-type">Texture</span> )</span> </h3>
  122. <div class="method">
  123. <div class="description">
  124. <p>Called when a texture copy operation is performed.</p>
  125. </div>
  126. <table class="params">
  127. <tbody>
  128. <tr>
  129. <td class="name"><code>srcTexture</code></td>
  130. <td class="description last"><p>The source texture.</p></td>
  131. </tr>
  132. <tr>
  133. <td class="name"><code>dstTexture</code></td>
  134. <td class="description last"><p>The destination texture.</p></td>
  135. </tr>
  136. </tbody>
  137. </table>
  138. </div>
  139. <h3 class="name name-method" id="finish" translate="no">.<a href="#finish">finish</a><span class="signature">()</span> </h3>
  140. <div class="method">
  141. <div class="description">
  142. <p>Called when a frame ends.</p>
  143. </div>
  144. </div>
  145. <h3 class="name name-method" id="finishCompute" translate="no">.<a href="#finishCompute">finishCompute</a><span class="signature">( uid : <span class="param-type">string</span>, computeNode : <span class="param-type">ComputeNode</span> )</span> </h3>
  146. <div class="method">
  147. <div class="description">
  148. <p>Called when a compute operation ends.</p>
  149. </div>
  150. <table class="params">
  151. <tbody>
  152. <tr>
  153. <td class="name"><code>uid</code></td>
  154. <td class="description last"><p>A unique identifier for the render context.</p></td>
  155. </tr>
  156. <tr>
  157. <td class="name"><code>computeNode</code></td>
  158. <td class="description last"><p>The compute node being executed.</p></td>
  159. </tr>
  160. </tbody>
  161. </table>
  162. </div>
  163. <h3 class="name name-method" id="finishRender" translate="no">.<a href="#finishRender">finishRender</a><span class="signature">( uid : <span class="param-type">string</span> )</span> </h3>
  164. <div class="method">
  165. <div class="description">
  166. <p>Called when an animation loop ends.</p>
  167. </div>
  168. <table class="params">
  169. <tbody>
  170. <tr>
  171. <td class="name"><code>uid</code></td>
  172. <td class="description last"><p>A unique identifier for the render context.</p></td>
  173. </tr>
  174. </tbody>
  175. </table>
  176. </div>
  177. <h3 class="name name-method" id="getRenderer" translate="no">.<a href="#getRenderer">getRenderer</a><span class="signature">()</span><span class="type-signature"> : <a href="WebGLRenderer.html">WebGLRenderer</a></span> </h3>
  178. <div class="method">
  179. <div class="description">
  180. <p>Returns the renderer associated with this inspector.</p>
  181. </div>
  182. <dl class="details">
  183. <dt class="tag-returns"><strong>Returns:</strong> The associated renderer.</dt>
  184. </dl>
  185. </div>
  186. <h3 class="name name-method" id="init" translate="no">.<a href="#init">init</a><span class="signature">()</span> </h3>
  187. <div class="method">
  188. <div class="description">
  189. <p>Initializes the inspector.</p>
  190. </div>
  191. </div>
  192. <h3 class="name name-method" id="inspect" translate="no">.<a href="#inspect">inspect</a><span class="signature">( node : <span class="param-type">Node</span> )</span> </h3>
  193. <div class="method">
  194. <div class="description">
  195. <p>Inspects a node.</p>
  196. </div>
  197. <table class="params">
  198. <tbody>
  199. <tr>
  200. <td class="name"><code>node</code></td>
  201. <td class="description last"><p>The node to inspect.</p></td>
  202. </tr>
  203. </tbody>
  204. </table>
  205. </div>
  206. <h3 class="name name-method" id="setRenderer" translate="no">.<a href="#setRenderer">setRenderer</a><span class="signature">( renderer : <span class="param-type">WebGLRenderer</span> )</span><span class="type-signature"> : <a href="InspectorBase.html">InspectorBase</a></span> </h3>
  207. <div class="method">
  208. <div class="description">
  209. <p>Sets the renderer for this inspector.</p>
  210. </div>
  211. <table class="params">
  212. <tbody>
  213. <tr>
  214. <td class="name"><code>renderer</code></td>
  215. <td class="description last"><p>The renderer to associate with this inspector.</p></td>
  216. </tr>
  217. </tbody>
  218. </table>
  219. <dl class="details">
  220. <dt class="tag-returns"><strong>Returns:</strong> This inspector instance.</dt>
  221. </dl>
  222. </div>
  223. <h2 class="subsection-title">Source</h2>
  224. <p>
  225. <a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/common/InspectorBase.js" target="_blank" rel="noopener" translate="no">src/renderers/common/InspectorBase.js</a>
  226. </p>
  227. </article>
  228. </section>
  229. <section>
  230. <header>
  231. </header>
  232. <article>
  233. <div class="container-overview">
  234. <h3 class="name name-method" id="InspectorBase" translate="no">new <a href="#InspectorBase">InspectorBase</a><span class="signature">()</span> </h3>
  235. <div class="method">
  236. <div class="description">
  237. <p>Creates a new InspectorBase.</p>
  238. </div>
  239. </div>
  240. </div>
  241. <h2 class="subsection-title">Properties</h2>
  242. <div class="member">
  243. <h3 class="name" id="currentFrame" translate="no">.<a href="#currentFrame">currentFrame</a><span class="type-signature"> : Object</span> </h3>
  244. <div class="description">
  245. <p>The current frame being processed.</p>
  246. </div>
  247. </div>
  248. <div class="member">
  249. <h3 class="name" id="nodeFrame" translate="no">.<a href="#nodeFrame">nodeFrame</a> </h3>
  250. <div class="description">
  251. <p>Returns the node frame for the current renderer.</p>
  252. </div>
  253. </div>
  254. <h2 class="subsection-title">Methods</h2>
  255. <h3 class="name name-method" id="begin" translate="no">.<a href="#begin">begin</a><span class="signature">()</span> </h3>
  256. <div class="method">
  257. <div class="description">
  258. <p>Called when a frame begins.</p>
  259. </div>
  260. </div>
  261. <h3 class="name name-method" id="beginCompute" translate="no">.<a href="#beginCompute">beginCompute</a><span class="signature">( uid : <span class="param-type">string</span>, computeNode : <span class="param-type">ComputeNode</span> )</span> </h3>
  262. <div class="method">
  263. <div class="description">
  264. <p>Called when a compute operation begins.</p>
  265. </div>
  266. <table class="params">
  267. <tbody>
  268. <tr>
  269. <td class="name"><code>uid</code></td>
  270. <td class="description last"><p>A unique identifier for the render context.</p></td>
  271. </tr>
  272. <tr>
  273. <td class="name"><code>computeNode</code></td>
  274. <td class="description last"><p>The compute node being executed.</p></td>
  275. </tr>
  276. </tbody>
  277. </table>
  278. </div>
  279. <h3 class="name name-method" id="beginRender" translate="no">.<a href="#beginRender">beginRender</a><span class="signature">( uid : <span class="param-type">string</span>, scene : <span class="param-type">Scene</span>, camera : <span class="param-type">Camera</span>, renderTarget : <span class="param-type">WebGLRenderTarget</span> )</span> </h3>
  280. <div class="method">
  281. <div class="description">
  282. <p>Called when a render operation begins.</p>
  283. </div>
  284. <table class="params">
  285. <tbody>
  286. <tr>
  287. <td class="name"><code>uid</code></td>
  288. <td class="description last"><p>A unique identifier for the render context.</p></td>
  289. </tr>
  290. <tr>
  291. <td class="name"><code>scene</code></td>
  292. <td class="description last"><p>The scene being rendered.</p></td>
  293. </tr>
  294. <tr>
  295. <td class="name"><code>camera</code></td>
  296. <td class="description last"><p>The camera being used for rendering.</p></td>
  297. </tr>
  298. <tr>
  299. <td class="name"><code>renderTarget</code></td>
  300. <td class="description last"><p>The render target, if any.</p></td>
  301. </tr>
  302. </tbody>
  303. </table>
  304. </div>
  305. <h3 class="name name-method" id="computeAsync" translate="no">.<a href="#computeAsync">computeAsync</a><span class="signature">( computeNode : <span class="param-type">ComputeNode</span>, dispatchSizeOrCount : <span class="param-type">number | Array.&lt;number></span> )</span> </h3>
  306. <div class="method">
  307. <div class="description">
  308. <p>When a compute operation is performed.</p>
  309. </div>
  310. <table class="params">
  311. <tbody>
  312. <tr>
  313. <td class="name"><code>computeNode</code></td>
  314. <td class="description last"><p>The compute node being executed.</p></td>
  315. </tr>
  316. <tr>
  317. <td class="name"><code>dispatchSizeOrCount</code></td>
  318. <td class="description last"><p>The dispatch size or count.</p></td>
  319. </tr>
  320. </tbody>
  321. </table>
  322. </div>
  323. <h3 class="name name-method" id="copyFramebufferToTexture" translate="no">.<a href="#copyFramebufferToTexture">copyFramebufferToTexture</a><span class="signature">( framebufferTexture : <span class="param-type">Texture</span> )</span> </h3>
  324. <div class="method">
  325. <div class="description">
  326. <p>Called when a framebuffer copy operation is performed.</p>
  327. </div>
  328. <table class="params">
  329. <tbody>
  330. <tr>
  331. <td class="name"><code>framebufferTexture</code></td>
  332. <td class="description last"><p>The texture associated with the framebuffer.</p></td>
  333. </tr>
  334. </tbody>
  335. </table>
  336. </div>
  337. <h3 class="name name-method" id="copyTextureToTexture" translate="no">.<a href="#copyTextureToTexture">copyTextureToTexture</a><span class="signature">( srcTexture : <span class="param-type">Texture</span>, dstTexture : <span class="param-type">Texture</span> )</span> </h3>
  338. <div class="method">
  339. <div class="description">
  340. <p>Called when a texture copy operation is performed.</p>
  341. </div>
  342. <table class="params">
  343. <tbody>
  344. <tr>
  345. <td class="name"><code>srcTexture</code></td>
  346. <td class="description last"><p>The source texture.</p></td>
  347. </tr>
  348. <tr>
  349. <td class="name"><code>dstTexture</code></td>
  350. <td class="description last"><p>The destination texture.</p></td>
  351. </tr>
  352. </tbody>
  353. </table>
  354. </div>
  355. <h3 class="name name-method" id="finish" translate="no">.<a href="#finish">finish</a><span class="signature">()</span> </h3>
  356. <div class="method">
  357. <div class="description">
  358. <p>Called when a frame ends.</p>
  359. </div>
  360. </div>
  361. <h3 class="name name-method" id="finishCompute" translate="no">.<a href="#finishCompute">finishCompute</a><span class="signature">( uid : <span class="param-type">string</span>, computeNode : <span class="param-type">ComputeNode</span> )</span> </h3>
  362. <div class="method">
  363. <div class="description">
  364. <p>Called when a compute operation ends.</p>
  365. </div>
  366. <table class="params">
  367. <tbody>
  368. <tr>
  369. <td class="name"><code>uid</code></td>
  370. <td class="description last"><p>A unique identifier for the render context.</p></td>
  371. </tr>
  372. <tr>
  373. <td class="name"><code>computeNode</code></td>
  374. <td class="description last"><p>The compute node being executed.</p></td>
  375. </tr>
  376. </tbody>
  377. </table>
  378. </div>
  379. <h3 class="name name-method" id="finishRender" translate="no">.<a href="#finishRender">finishRender</a><span class="signature">( uid : <span class="param-type">string</span> )</span> </h3>
  380. <div class="method">
  381. <div class="description">
  382. <p>Called when an animation loop ends.</p>
  383. </div>
  384. <table class="params">
  385. <tbody>
  386. <tr>
  387. <td class="name"><code>uid</code></td>
  388. <td class="description last"><p>A unique identifier for the render context.</p></td>
  389. </tr>
  390. </tbody>
  391. </table>
  392. </div>
  393. <h3 class="name name-method" id="getRenderer" translate="no">.<a href="#getRenderer">getRenderer</a><span class="signature">()</span><span class="type-signature"> : <a href="WebGLRenderer.html">WebGLRenderer</a></span> </h3>
  394. <div class="method">
  395. <div class="description">
  396. <p>Returns the renderer associated with this inspector.</p>
  397. </div>
  398. <dl class="details">
  399. <dt class="tag-returns"><strong>Returns:</strong> The associated renderer.</dt>
  400. </dl>
  401. </div>
  402. <h3 class="name name-method" id="init" translate="no">.<a href="#init">init</a><span class="signature">()</span> </h3>
  403. <div class="method">
  404. <div class="description">
  405. <p>Initializes the inspector.</p>
  406. </div>
  407. </div>
  408. <h3 class="name name-method" id="inspect" translate="no">.<a href="#inspect">inspect</a><span class="signature">( node : <span class="param-type">Node</span> )</span> </h3>
  409. <div class="method">
  410. <div class="description">
  411. <p>Inspects a node.</p>
  412. </div>
  413. <table class="params">
  414. <tbody>
  415. <tr>
  416. <td class="name"><code>node</code></td>
  417. <td class="description last"><p>The node to inspect.</p></td>
  418. </tr>
  419. </tbody>
  420. </table>
  421. </div>
  422. <h3 class="name name-method" id="setRenderer" translate="no">.<a href="#setRenderer">setRenderer</a><span class="signature">( renderer : <span class="param-type">WebGLRenderer</span> )</span><span class="type-signature"> : <a href="InspectorBase.html">InspectorBase</a></span> </h3>
  423. <div class="method">
  424. <div class="description">
  425. <p>Sets the renderer for this inspector.</p>
  426. </div>
  427. <table class="params">
  428. <tbody>
  429. <tr>
  430. <td class="name"><code>renderer</code></td>
  431. <td class="description last"><p>The renderer to associate with this inspector.</p></td>
  432. </tr>
  433. </tbody>
  434. </table>
  435. <dl class="details">
  436. <dt class="tag-returns"><strong>Returns:</strong> This inspector instance.</dt>
  437. </dl>
  438. </div>
  439. <h2 class="subsection-title">Source</h2>
  440. <p>
  441. <a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/common/InspectorBase.js" target="_blank" rel="noopener" translate="no">src/renderers/common/InspectorBase.js</a>
  442. </p>
  443. </article>
  444. </section>
  445. <script src="../scripts/linenumber.js"></script>
  446. <script src="../scripts/page.js"></script>
  447. </body>
  448. </html>
粤ICP备19079148号