InspectorBase.html 22 KB

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