InspectorBase.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  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"><a href="ComputeNode.html">ComputeNode</a></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">
  54. <strong>uid</strong>
  55. </td>
  56. <td class="description last">
  57. <p>A unique identifier for the render context.</p>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td class="name">
  62. <strong>computeNode</strong>
  63. </td>
  64. <td class="description last">
  65. <p>The compute node being executed.</p>
  66. </td>
  67. </tr>
  68. </tbody>
  69. </table>
  70. </div>
  71. <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"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, renderTarget : <span class="param-type"><a href="WebGLRenderTarget.html">WebGLRenderTarget</a></span> )</span> </h3>
  72. <div class="method">
  73. <div class="description">
  74. <p>Called when a render operation begins.</p>
  75. </div>
  76. <table class="params">
  77. <tbody>
  78. <tr>
  79. <td class="name">
  80. <strong>uid</strong>
  81. </td>
  82. <td class="description last">
  83. <p>A unique identifier for the render context.</p>
  84. </td>
  85. </tr>
  86. <tr>
  87. <td class="name">
  88. <strong>scene</strong>
  89. </td>
  90. <td class="description last">
  91. <p>The scene being rendered.</p>
  92. </td>
  93. </tr>
  94. <tr>
  95. <td class="name">
  96. <strong>camera</strong>
  97. </td>
  98. <td class="description last">
  99. <p>The camera being used for rendering.</p>
  100. </td>
  101. </tr>
  102. <tr>
  103. <td class="name">
  104. <strong>renderTarget</strong>
  105. </td>
  106. <td class="description last">
  107. <p>The render target, if any.</p>
  108. </td>
  109. </tr>
  110. </tbody>
  111. </table>
  112. </div>
  113. <h3 class="name name-method" id="computeAsync" translate="no">.<a href="#computeAsync">computeAsync</a><span class="signature">( computeNode : <span class="param-type"><a href="ComputeNode.html">ComputeNode</a></span>, dispatchSizeOrCount : <span class="param-type">number | Array.&lt;number></span> )</span> </h3>
  114. <div class="method">
  115. <div class="description">
  116. <p>When a compute operation is performed.</p>
  117. </div>
  118. <table class="params">
  119. <tbody>
  120. <tr>
  121. <td class="name">
  122. <strong>computeNode</strong>
  123. </td>
  124. <td class="description last">
  125. <p>The compute node being executed.</p>
  126. </td>
  127. </tr>
  128. <tr>
  129. <td class="name">
  130. <strong>dispatchSizeOrCount</strong>
  131. </td>
  132. <td class="description last">
  133. <p>The dispatch size or count.</p>
  134. </td>
  135. </tr>
  136. </tbody>
  137. </table>
  138. </div>
  139. <h3 class="name name-method" id="copyFramebufferToTexture" translate="no">.<a href="#copyFramebufferToTexture">copyFramebufferToTexture</a><span class="signature">( framebufferTexture : <span class="param-type"><a href="Texture.html">Texture</a></span> )</span> </h3>
  140. <div class="method">
  141. <div class="description">
  142. <p>Called when a framebuffer copy operation is performed.</p>
  143. </div>
  144. <table class="params">
  145. <tbody>
  146. <tr>
  147. <td class="name">
  148. <strong>framebufferTexture</strong>
  149. </td>
  150. <td class="description last">
  151. <p>The texture associated with the framebuffer.</p>
  152. </td>
  153. </tr>
  154. </tbody>
  155. </table>
  156. </div>
  157. <h3 class="name name-method" id="copyTextureToTexture" translate="no">.<a href="#copyTextureToTexture">copyTextureToTexture</a><span class="signature">( srcTexture : <span class="param-type"><a href="Texture.html">Texture</a></span>, dstTexture : <span class="param-type"><a href="Texture.html">Texture</a></span> )</span> </h3>
  158. <div class="method">
  159. <div class="description">
  160. <p>Called when a texture copy operation is performed.</p>
  161. </div>
  162. <table class="params">
  163. <tbody>
  164. <tr>
  165. <td class="name">
  166. <strong>srcTexture</strong>
  167. </td>
  168. <td class="description last">
  169. <p>The source texture.</p>
  170. </td>
  171. </tr>
  172. <tr>
  173. <td class="name">
  174. <strong>dstTexture</strong>
  175. </td>
  176. <td class="description last">
  177. <p>The destination texture.</p>
  178. </td>
  179. </tr>
  180. </tbody>
  181. </table>
  182. </div>
  183. <h3 class="name name-method" id="finish" translate="no">.<a href="#finish">finish</a><span class="signature">()</span> </h3>
  184. <div class="method">
  185. <div class="description">
  186. <p>Called when a frame ends.</p>
  187. </div>
  188. </div>
  189. <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"><a href="ComputeNode.html">ComputeNode</a></span> )</span> </h3>
  190. <div class="method">
  191. <div class="description">
  192. <p>Called when a compute operation ends.</p>
  193. </div>
  194. <table class="params">
  195. <tbody>
  196. <tr>
  197. <td class="name">
  198. <strong>uid</strong>
  199. </td>
  200. <td class="description last">
  201. <p>A unique identifier for the render context.</p>
  202. </td>
  203. </tr>
  204. <tr>
  205. <td class="name">
  206. <strong>computeNode</strong>
  207. </td>
  208. <td class="description last">
  209. <p>The compute node being executed.</p>
  210. </td>
  211. </tr>
  212. </tbody>
  213. </table>
  214. </div>
  215. <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>
  216. <div class="method">
  217. <div class="description">
  218. <p>Called when an animation loop ends.</p>
  219. </div>
  220. <table class="params">
  221. <tbody>
  222. <tr>
  223. <td class="name">
  224. <strong>uid</strong>
  225. </td>
  226. <td class="description last">
  227. <p>A unique identifier for the render context.</p>
  228. </td>
  229. </tr>
  230. </tbody>
  231. </table>
  232. </div>
  233. <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>
  234. <div class="method">
  235. <div class="description">
  236. <p>Returns the renderer associated with this inspector.</p>
  237. </div>
  238. <dl class="details">
  239. <dt class="tag-returns"><strong>Returns:</strong> The associated renderer.</dt>
  240. </dl>
  241. </div>
  242. <h3 class="name name-method" id="init" translate="no">.<a href="#init">init</a><span class="signature">()</span> </h3>
  243. <div class="method">
  244. <div class="description">
  245. <p>Initializes the inspector.</p>
  246. </div>
  247. </div>
  248. <h3 class="name name-method" id="inspect" translate="no">.<a href="#inspect">inspect</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  249. <div class="method">
  250. <div class="description">
  251. <p>Inspects a node.</p>
  252. </div>
  253. <table class="params">
  254. <tbody>
  255. <tr>
  256. <td class="name">
  257. <strong>node</strong>
  258. </td>
  259. <td class="description last">
  260. <p>The node to inspect.</p>
  261. </td>
  262. </tr>
  263. </tbody>
  264. </table>
  265. </div>
  266. <h3 class="name name-method" id="setRenderer" translate="no">.<a href="#setRenderer">setRenderer</a><span class="signature">( renderer : <span class="param-type"><a href="WebGLRenderer.html">WebGLRenderer</a></span> )</span><span class="type-signature"> : <a href="InspectorBase.html">InspectorBase</a></span> </h3>
  267. <div class="method">
  268. <div class="description">
  269. <p>Sets the renderer for this inspector.</p>
  270. </div>
  271. <table class="params">
  272. <tbody>
  273. <tr>
  274. <td class="name">
  275. <strong>renderer</strong>
  276. </td>
  277. <td class="description last">
  278. <p>The renderer to associate with this inspector.</p>
  279. </td>
  280. </tr>
  281. </tbody>
  282. </table>
  283. <dl class="details">
  284. <dt class="tag-returns"><strong>Returns:</strong> This inspector instance.</dt>
  285. </dl>
  286. </div>
  287. <h2 class="subsection-title">Source</h2>
  288. <p>
  289. <a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/common/InspectorBase.js" translate="no" target="_blank" rel="noopener">src/renderers/common/InspectorBase.js</a>
  290. </p>
  291. </article>
  292. </section>
  293. <section>
  294. <header>
  295. </header>
  296. <article>
  297. <div class="container-overview">
  298. <h3 class="name name-method" id="InspectorBase" translate="no">new <a href="#InspectorBase">InspectorBase</a><span class="signature">()</span> </h3>
  299. <div class="method">
  300. <div class="description">
  301. <p>Creates a new InspectorBase.</p>
  302. </div>
  303. </div>
  304. </div>
  305. <h2 class="subsection-title">Properties</h2>
  306. <div class="member">
  307. <h3 class="name" id="currentFrame" translate="no">.<a href="#currentFrame">currentFrame</a><span class="type-signature"> : Object</span> </h3>
  308. <div class="description">
  309. <p>The current frame being processed.</p>
  310. </div>
  311. </div>
  312. <div class="member">
  313. <h3 class="name" id="nodeFrame" translate="no">.<a href="#nodeFrame">nodeFrame</a> </h3>
  314. <div class="description">
  315. <p>Returns the node frame for the current renderer.</p>
  316. </div>
  317. </div>
  318. <h2 class="subsection-title">Methods</h2>
  319. <h3 class="name name-method" id="begin" translate="no">.<a href="#begin">begin</a><span class="signature">()</span> </h3>
  320. <div class="method">
  321. <div class="description">
  322. <p>Called when a frame begins.</p>
  323. </div>
  324. </div>
  325. <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"><a href="ComputeNode.html">ComputeNode</a></span> )</span> </h3>
  326. <div class="method">
  327. <div class="description">
  328. <p>Called when a compute operation begins.</p>
  329. </div>
  330. <table class="params">
  331. <tbody>
  332. <tr>
  333. <td class="name">
  334. <strong>uid</strong>
  335. </td>
  336. <td class="description last">
  337. <p>A unique identifier for the render context.</p>
  338. </td>
  339. </tr>
  340. <tr>
  341. <td class="name">
  342. <strong>computeNode</strong>
  343. </td>
  344. <td class="description last">
  345. <p>The compute node being executed.</p>
  346. </td>
  347. </tr>
  348. </tbody>
  349. </table>
  350. </div>
  351. <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"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, renderTarget : <span class="param-type"><a href="WebGLRenderTarget.html">WebGLRenderTarget</a></span> )</span> </h3>
  352. <div class="method">
  353. <div class="description">
  354. <p>Called when a render operation begins.</p>
  355. </div>
  356. <table class="params">
  357. <tbody>
  358. <tr>
  359. <td class="name">
  360. <strong>uid</strong>
  361. </td>
  362. <td class="description last">
  363. <p>A unique identifier for the render context.</p>
  364. </td>
  365. </tr>
  366. <tr>
  367. <td class="name">
  368. <strong>scene</strong>
  369. </td>
  370. <td class="description last">
  371. <p>The scene being rendered.</p>
  372. </td>
  373. </tr>
  374. <tr>
  375. <td class="name">
  376. <strong>camera</strong>
  377. </td>
  378. <td class="description last">
  379. <p>The camera being used for rendering.</p>
  380. </td>
  381. </tr>
  382. <tr>
  383. <td class="name">
  384. <strong>renderTarget</strong>
  385. </td>
  386. <td class="description last">
  387. <p>The render target, if any.</p>
  388. </td>
  389. </tr>
  390. </tbody>
  391. </table>
  392. </div>
  393. <h3 class="name name-method" id="computeAsync" translate="no">.<a href="#computeAsync">computeAsync</a><span class="signature">( computeNode : <span class="param-type"><a href="ComputeNode.html">ComputeNode</a></span>, dispatchSizeOrCount : <span class="param-type">number | Array.&lt;number></span> )</span> </h3>
  394. <div class="method">
  395. <div class="description">
  396. <p>When a compute operation is performed.</p>
  397. </div>
  398. <table class="params">
  399. <tbody>
  400. <tr>
  401. <td class="name">
  402. <strong>computeNode</strong>
  403. </td>
  404. <td class="description last">
  405. <p>The compute node being executed.</p>
  406. </td>
  407. </tr>
  408. <tr>
  409. <td class="name">
  410. <strong>dispatchSizeOrCount</strong>
  411. </td>
  412. <td class="description last">
  413. <p>The dispatch size or count.</p>
  414. </td>
  415. </tr>
  416. </tbody>
  417. </table>
  418. </div>
  419. <h3 class="name name-method" id="copyFramebufferToTexture" translate="no">.<a href="#copyFramebufferToTexture">copyFramebufferToTexture</a><span class="signature">( framebufferTexture : <span class="param-type"><a href="Texture.html">Texture</a></span> )</span> </h3>
  420. <div class="method">
  421. <div class="description">
  422. <p>Called when a framebuffer copy operation is performed.</p>
  423. </div>
  424. <table class="params">
  425. <tbody>
  426. <tr>
  427. <td class="name">
  428. <strong>framebufferTexture</strong>
  429. </td>
  430. <td class="description last">
  431. <p>The texture associated with the framebuffer.</p>
  432. </td>
  433. </tr>
  434. </tbody>
  435. </table>
  436. </div>
  437. <h3 class="name name-method" id="copyTextureToTexture" translate="no">.<a href="#copyTextureToTexture">copyTextureToTexture</a><span class="signature">( srcTexture : <span class="param-type"><a href="Texture.html">Texture</a></span>, dstTexture : <span class="param-type"><a href="Texture.html">Texture</a></span> )</span> </h3>
  438. <div class="method">
  439. <div class="description">
  440. <p>Called when a texture copy operation is performed.</p>
  441. </div>
  442. <table class="params">
  443. <tbody>
  444. <tr>
  445. <td class="name">
  446. <strong>srcTexture</strong>
  447. </td>
  448. <td class="description last">
  449. <p>The source texture.</p>
  450. </td>
  451. </tr>
  452. <tr>
  453. <td class="name">
  454. <strong>dstTexture</strong>
  455. </td>
  456. <td class="description last">
  457. <p>The destination texture.</p>
  458. </td>
  459. </tr>
  460. </tbody>
  461. </table>
  462. </div>
  463. <h3 class="name name-method" id="finish" translate="no">.<a href="#finish">finish</a><span class="signature">()</span> </h3>
  464. <div class="method">
  465. <div class="description">
  466. <p>Called when a frame ends.</p>
  467. </div>
  468. </div>
  469. <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"><a href="ComputeNode.html">ComputeNode</a></span> )</span> </h3>
  470. <div class="method">
  471. <div class="description">
  472. <p>Called when a compute operation ends.</p>
  473. </div>
  474. <table class="params">
  475. <tbody>
  476. <tr>
  477. <td class="name">
  478. <strong>uid</strong>
  479. </td>
  480. <td class="description last">
  481. <p>A unique identifier for the render context.</p>
  482. </td>
  483. </tr>
  484. <tr>
  485. <td class="name">
  486. <strong>computeNode</strong>
  487. </td>
  488. <td class="description last">
  489. <p>The compute node being executed.</p>
  490. </td>
  491. </tr>
  492. </tbody>
  493. </table>
  494. </div>
  495. <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>
  496. <div class="method">
  497. <div class="description">
  498. <p>Called when an animation loop ends.</p>
  499. </div>
  500. <table class="params">
  501. <tbody>
  502. <tr>
  503. <td class="name">
  504. <strong>uid</strong>
  505. </td>
  506. <td class="description last">
  507. <p>A unique identifier for the render context.</p>
  508. </td>
  509. </tr>
  510. </tbody>
  511. </table>
  512. </div>
  513. <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>
  514. <div class="method">
  515. <div class="description">
  516. <p>Returns the renderer associated with this inspector.</p>
  517. </div>
  518. <dl class="details">
  519. <dt class="tag-returns"><strong>Returns:</strong> The associated renderer.</dt>
  520. </dl>
  521. </div>
  522. <h3 class="name name-method" id="init" translate="no">.<a href="#init">init</a><span class="signature">()</span> </h3>
  523. <div class="method">
  524. <div class="description">
  525. <p>Initializes the inspector.</p>
  526. </div>
  527. </div>
  528. <h3 class="name name-method" id="inspect" translate="no">.<a href="#inspect">inspect</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  529. <div class="method">
  530. <div class="description">
  531. <p>Inspects a node.</p>
  532. </div>
  533. <table class="params">
  534. <tbody>
  535. <tr>
  536. <td class="name">
  537. <strong>node</strong>
  538. </td>
  539. <td class="description last">
  540. <p>The node to inspect.</p>
  541. </td>
  542. </tr>
  543. </tbody>
  544. </table>
  545. </div>
  546. <h3 class="name name-method" id="setRenderer" translate="no">.<a href="#setRenderer">setRenderer</a><span class="signature">( renderer : <span class="param-type"><a href="WebGLRenderer.html">WebGLRenderer</a></span> )</span><span class="type-signature"> : <a href="InspectorBase.html">InspectorBase</a></span> </h3>
  547. <div class="method">
  548. <div class="description">
  549. <p>Sets the renderer for this inspector.</p>
  550. </div>
  551. <table class="params">
  552. <tbody>
  553. <tr>
  554. <td class="name">
  555. <strong>renderer</strong>
  556. </td>
  557. <td class="description last">
  558. <p>The renderer to associate with this inspector.</p>
  559. </td>
  560. </tr>
  561. </tbody>
  562. </table>
  563. <dl class="details">
  564. <dt class="tag-returns"><strong>Returns:</strong> This inspector instance.</dt>
  565. </dl>
  566. </div>
  567. <h2 class="subsection-title">Source</h2>
  568. <p>
  569. <a href="https://github.com/mrdoob/three.js/blob/master/src/renderers/common/InspectorBase.js" translate="no" target="_blank" rel="noopener">src/renderers/common/InspectorBase.js</a>
  570. </p>
  571. </article>
  572. </section>
  573. <script src="../scripts/linenumber.js"></script>
  574. <script src="../scripts/page.js"></script>
  575. </body>
  576. </html>
粤ICP备19079148号