babylon.inspector.module.d.ts 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328
  1. /*BabylonJS Inspector*/
  2. // Dependencies for this module:
  3. // ../../../../Tools/Gulp/babylonjs
  4. // ../../../../Tools/Gulp/babylonjs-gui
  5. declare module 'babylonjs-inspector' {
  6. export * from 'babylonjs-inspector/adapters';
  7. export * from 'babylonjs-inspector/details';
  8. export * from 'babylonjs-inspector/gui';
  9. export * from 'babylonjs-inspector/helpers';
  10. export * from 'babylonjs-inspector/scheduler';
  11. export * from 'babylonjs-inspector/tabs';
  12. export * from 'babylonjs-inspector/tools';
  13. export * from 'babylonjs-inspector/tree';
  14. export * from 'babylonjs-inspector/treetools';
  15. export * from 'babylonjs-inspector/Inspector';
  16. export * from 'babylonjs-inspector/properties';
  17. export * from 'babylonjs-inspector/properties_gui';
  18. }
  19. declare module 'babylonjs-inspector/adapters' {
  20. export * from 'babylonjs-inspector/adapters/Adapter';
  21. export * from 'babylonjs-inspector/adapters/CameraAdapter';
  22. export * from 'babylonjs-inspector/adapters/GUIAdapter';
  23. export * from 'babylonjs-inspector/adapters/LightAdapter';
  24. export * from 'babylonjs-inspector/adapters/MaterialAdapter';
  25. export * from 'babylonjs-inspector/adapters/MeshAdapter';
  26. export * from 'babylonjs-inspector/adapters/PhysicsImpostorAdapter';
  27. export * from 'babylonjs-inspector/adapters/SoundAdapter';
  28. export * from 'babylonjs-inspector/adapters/TextureAdapter';
  29. }
  30. declare module 'babylonjs-inspector/details' {
  31. export * from 'babylonjs-inspector/details/DetailPanel';
  32. export * from 'babylonjs-inspector/details/Property';
  33. export * from 'babylonjs-inspector/details/PropertyLine';
  34. }
  35. declare module 'babylonjs-inspector/gui' {
  36. export * from 'babylonjs-inspector/gui/BasicElement';
  37. export * from 'babylonjs-inspector/gui/ColorElement';
  38. export * from 'babylonjs-inspector/gui/ColorPickerElement';
  39. export * from 'babylonjs-inspector/gui/CubeTextureElement';
  40. export * from 'babylonjs-inspector/gui/HDRCubeTextureElement';
  41. export * from 'babylonjs-inspector/gui/SearchBar';
  42. export * from 'babylonjs-inspector/gui/TextureElement';
  43. export * from 'babylonjs-inspector/gui/Tooltip';
  44. }
  45. declare module 'babylonjs-inspector/helpers' {
  46. export * from 'babylonjs-inspector/helpers/Helpers';
  47. }
  48. declare module 'babylonjs-inspector/scheduler' {
  49. export * from 'babylonjs-inspector/scheduler/Scheduler';
  50. }
  51. declare module 'babylonjs-inspector/tabs' {
  52. export * from 'babylonjs-inspector/tabs/CameraTab';
  53. export * from 'babylonjs-inspector/tabs/ConsoleTab';
  54. export * from 'babylonjs-inspector/tabs/GLTFTab';
  55. export * from 'babylonjs-inspector/tabs/GUITab';
  56. export * from 'babylonjs-inspector/tabs/LightTab';
  57. export * from 'babylonjs-inspector/tabs/MaterialTab';
  58. export * from 'babylonjs-inspector/tabs/MeshTab';
  59. export * from 'babylonjs-inspector/tabs/PhysicsTab';
  60. export * from 'babylonjs-inspector/tabs/PropertyTab';
  61. export * from 'babylonjs-inspector/tabs/SceneTab';
  62. export * from 'babylonjs-inspector/tabs/SoundTab';
  63. export * from 'babylonjs-inspector/tabs/StatsTab';
  64. export * from 'babylonjs-inspector/tabs/Tab';
  65. export * from 'babylonjs-inspector/tabs/TabBar';
  66. export * from 'babylonjs-inspector/tabs/TextureTab';
  67. export * from 'babylonjs-inspector/tabs/ToolsTab';
  68. }
  69. declare module 'babylonjs-inspector/tools' {
  70. export * from 'babylonjs-inspector/tools/AbstractTool';
  71. export * from 'babylonjs-inspector/tools/DisposeTool';
  72. export * from 'babylonjs-inspector/tools/FullscreenTool';
  73. export * from 'babylonjs-inspector/tools/LabelTool';
  74. export * from 'babylonjs-inspector/tools/PauseScheduleTool';
  75. export * from 'babylonjs-inspector/tools/PickTool';
  76. export * from 'babylonjs-inspector/tools/PopupTool';
  77. export * from 'babylonjs-inspector/tools/RefreshTool';
  78. export * from 'babylonjs-inspector/tools/Toolbar';
  79. }
  80. declare module 'babylonjs-inspector/tree' {
  81. export * from 'babylonjs-inspector/tree/TreeItem';
  82. }
  83. declare module 'babylonjs-inspector/treetools' {
  84. export * from 'babylonjs-inspector/treetools/AbstractTreeTool';
  85. export * from 'babylonjs-inspector/treetools/BoundingBox';
  86. export * from 'babylonjs-inspector/treetools/CameraPOV';
  87. export * from 'babylonjs-inspector/treetools/Checkbox';
  88. export * from 'babylonjs-inspector/treetools/DebugArea';
  89. export * from 'babylonjs-inspector/treetools/Info';
  90. export * from 'babylonjs-inspector/treetools/SoundInteractions';
  91. }
  92. declare module 'babylonjs-inspector/Inspector' {
  93. import { AbstractMesh, Nullable, Scene } from "babylonjs";
  94. import "../sass/main.scss";
  95. export class Inspector {
  96. /** The HTML document relative to this inspector (the window or the popup depending on its mode) */
  97. static DOCUMENT: HTMLDocument;
  98. /** The HTML window. In popup mode, it's the popup itself. Otherwise, it's the current tab */
  99. static WINDOW: Window;
  100. /** The inspector is created with the given engine.
  101. * If the parameter 'popup' is false, the inspector is created as a right panel on the main window.
  102. * If the parameter 'popup' is true, the inspector is created in another popup.
  103. */
  104. constructor(scene: Scene, popup?: boolean, initialTab?: number, parentElement?: Nullable<HTMLElement>, newColors?: {
  105. backgroundColor?: string;
  106. backgroundColorLighter?: string;
  107. backgroundColorLighter2?: string;
  108. backgroundColorLighter3?: string;
  109. color?: string;
  110. colorTop?: string;
  111. colorBot?: string;
  112. });
  113. readonly scene: Scene;
  114. readonly popupMode: boolean;
  115. /**
  116. * Filter the list of item present in the tree.
  117. * All item returned should have the given filter contained in the item id.
  118. */
  119. filterItem(filter: string): void;
  120. /** Display the mesh tab on the given object */
  121. displayObjectDetails(mesh: AbstractMesh): void;
  122. /** Clean the whole tree of item and rebuilds it */
  123. refresh(): void;
  124. /** Remove the inspector panel when it's built as a right panel:
  125. * remove the right panel and remove the wrapper
  126. */
  127. dispose(): void;
  128. /** Open the inspector in a new popup
  129. * Set 'firstTime' to true if there is no inspector created beforehands
  130. */
  131. openPopup(firstTime?: boolean): void;
  132. getActiveTabIndex(): number;
  133. }
  134. }
  135. declare module 'babylonjs-inspector/properties' {
  136. import { Vector2, Vector3, Color3, Color4, Quaternion, Size, Texture, RenderTargetTexture, DynamicTexture, BaseTexture, CubeTexture, HDRCubeTexture, Sound, ArcRotateCamera, FreeCamera, Scene, TransformNode, AbstractMesh, Mesh, StandardMaterial, PBRMaterial, PhysicsImpostor, ImageProcessingConfiguration, ColorCurves } from "babylonjs";
  137. export const PROPERTIES: {
  138. /** Format the given object :
  139. * If a format function exists, returns the result of this function.
  140. * If this function doesn't exists, return the object type instead
  141. */
  142. format: (obj: any) => any;
  143. 'type_not_defined': {
  144. properties: any[];
  145. format: () => string;
  146. };
  147. 'Vector2': {
  148. type: typeof Vector2;
  149. format: (vec: Vector2) => string;
  150. };
  151. 'Vector3': {
  152. type: typeof Vector3;
  153. format: (vec: Vector3) => string;
  154. };
  155. 'Color3': {
  156. type: typeof Color3;
  157. format: (color: Color3) => string;
  158. slider: {
  159. r: {
  160. min: number;
  161. max: number;
  162. step: number;
  163. };
  164. g: {
  165. min: number;
  166. max: number;
  167. step: number;
  168. };
  169. b: {
  170. min: number;
  171. max: number;
  172. step: number;
  173. };
  174. };
  175. };
  176. 'Color4': {
  177. type: typeof Color4;
  178. format: (color: Color4) => string;
  179. slider: {
  180. r: {
  181. min: number;
  182. max: number;
  183. step: number;
  184. };
  185. g: {
  186. min: number;
  187. max: number;
  188. step: number;
  189. };
  190. b: {
  191. min: number;
  192. max: number;
  193. step: number;
  194. };
  195. };
  196. };
  197. 'Quaternion': {
  198. type: typeof Quaternion;
  199. };
  200. 'Size': {
  201. type: typeof Size;
  202. format: (size: Size) => string;
  203. };
  204. 'Texture': {
  205. type: typeof Texture;
  206. format: (tex: Texture) => string;
  207. };
  208. 'RenderTargetTexture': {
  209. type: typeof RenderTargetTexture;
  210. };
  211. 'DynamicTexture': {
  212. type: typeof DynamicTexture;
  213. };
  214. 'BaseTexture': {
  215. type: typeof BaseTexture;
  216. };
  217. 'CubeTexture': {
  218. type: typeof CubeTexture;
  219. };
  220. 'HDRCubeTexture': {
  221. type: typeof HDRCubeTexture;
  222. };
  223. 'Sound': {
  224. type: typeof Sound;
  225. };
  226. 'ArcRotateCamera': {
  227. type: typeof ArcRotateCamera;
  228. slider: {
  229. alpha: {
  230. min: number;
  231. max: number;
  232. step: number;
  233. };
  234. beta: {
  235. min: number;
  236. max: number;
  237. step: number;
  238. };
  239. fov: {
  240. min: number;
  241. max: number;
  242. step: number;
  243. };
  244. };
  245. };
  246. 'FreeCamera': {
  247. type: typeof FreeCamera;
  248. slider: {
  249. fov: {
  250. min: number;
  251. max: number;
  252. step: number;
  253. };
  254. };
  255. };
  256. 'Scene': {
  257. type: typeof Scene;
  258. };
  259. 'TransformNode': {
  260. type: typeof TransformNode;
  261. format: (m: TransformNode) => string;
  262. };
  263. 'AbstractMesh': {
  264. type: typeof AbstractMesh;
  265. format: (m: AbstractMesh) => string;
  266. };
  267. 'Mesh': {
  268. type: typeof Mesh;
  269. format: (m: Mesh) => string;
  270. slider: {
  271. visibility: {
  272. min: number;
  273. max: number;
  274. step: number;
  275. };
  276. };
  277. };
  278. 'StandardMaterial': {
  279. type: typeof StandardMaterial;
  280. format: (mat: StandardMaterial) => string;
  281. slider: {
  282. alpha: {
  283. min: number;
  284. max: number;
  285. step: number;
  286. };
  287. };
  288. };
  289. 'PBRMaterial': {
  290. type: typeof PBRMaterial;
  291. slider: {
  292. alpha: {
  293. min: number;
  294. max: number;
  295. step: number;
  296. };
  297. };
  298. };
  299. 'PhysicsImpostor': {
  300. type: typeof PhysicsImpostor;
  301. };
  302. 'ImageProcessingConfiguration': {
  303. type: typeof ImageProcessingConfiguration;
  304. };
  305. 'ColorCurves': {
  306. type: typeof ColorCurves;
  307. };
  308. };
  309. }
  310. declare module 'babylonjs-inspector/properties_gui' {
  311. /**
  312. * Function that add gui objects properties to the variable PROPERTIES
  313. */
  314. export function loadGUIProperties(): void;
  315. }
  316. declare module 'babylonjs-inspector/adapters/Adapter' {
  317. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  318. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  319. export abstract class Adapter {
  320. protected _obj: any;
  321. constructor(obj: any);
  322. /** Returns the name displayed in the tree */
  323. abstract id(): string;
  324. /** Returns the type of this object - displayed in the tree */
  325. abstract type(): string;
  326. /** Returns the list of properties to be displayed for this adapter */
  327. abstract getProperties(): Array<PropertyLine>;
  328. /** Returns true if the given object correspond to this */
  329. correspondsTo(obj: any): boolean;
  330. /** Returns the adapter unique name */
  331. readonly name: string;
  332. /**
  333. * Returns the actual object used for this adapter
  334. */
  335. readonly object: any;
  336. /** Returns the list of tools available for this adapter */
  337. abstract getTools(): Array<AbstractTreeTool>;
  338. }
  339. }
  340. declare module 'babylonjs-inspector/adapters/CameraAdapter' {
  341. import { Camera } from "babylonjs";
  342. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  343. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  344. import { ICameraPOV } from "babylonjs-inspector/treetools/CameraPOV";
  345. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  346. export class CameraAdapter extends Adapter implements ICameraPOV {
  347. constructor(obj: Camera);
  348. /** Returns the name displayed in the tree */
  349. id(): string;
  350. /** Returns the type of this object - displayed in the tree */
  351. type(): string;
  352. /** Returns the list of properties to be displayed for this adapter */
  353. getProperties(): Array<PropertyLine>;
  354. getTools(): Array<AbstractTreeTool>;
  355. setPOV(): void;
  356. getCurrentActiveCamera(): string;
  357. }
  358. }
  359. declare module 'babylonjs-inspector/adapters/GUIAdapter' {
  360. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  361. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  362. import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
  363. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  364. import { Control } from "babylonjs-gui";
  365. export class GUIAdapter extends Adapter implements IToolVisible {
  366. constructor(obj: Control);
  367. /** Returns the name displayed in the tree */
  368. id(): string;
  369. /** Returns the type of this object - displayed in the tree */
  370. type(): string;
  371. /** Returns the list of properties to be displayed for this adapter */
  372. getProperties(): Array<PropertyLine>;
  373. getTools(): Array<AbstractTreeTool>;
  374. setVisible(b: boolean): void;
  375. isVisible(): boolean;
  376. }
  377. }
  378. declare module 'babylonjs-inspector/adapters/LightAdapter' {
  379. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  380. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  381. import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
  382. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  383. export class LightAdapter extends Adapter implements IToolVisible {
  384. constructor(obj: BABYLON.Light);
  385. /** Returns the name displayed in the tree */
  386. id(): string;
  387. /** Returns the type of this object - displayed in the tree */
  388. type(): string;
  389. /** Returns the list of properties to be displayed for this adapter */
  390. getProperties(): Array<PropertyLine>;
  391. getTools(): Array<AbstractTreeTool>;
  392. setVisible(b: boolean): void;
  393. isVisible(): boolean;
  394. }
  395. }
  396. declare module 'babylonjs-inspector/adapters/MaterialAdapter' {
  397. import { Material } from "babylonjs";
  398. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  399. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  400. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  401. export class MaterialAdapter extends Adapter {
  402. constructor(obj: Material);
  403. /** Returns the name displayed in the tree */
  404. id(): string;
  405. /** Returns the type of this object - displayed in the tree */
  406. type(): string;
  407. /** Returns the list of properties to be displayed for this adapter */
  408. getProperties(): Array<PropertyLine>;
  409. /** No tools for a material adapter */
  410. getTools(): Array<AbstractTreeTool>;
  411. }
  412. }
  413. declare module 'babylonjs-inspector/adapters/MeshAdapter' {
  414. import { Node } from "babylonjs";
  415. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  416. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  417. import { IToolBoundingBox } from "babylonjs-inspector/treetools/BoundingBox";
  418. import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
  419. import { IToolDebug } from "babylonjs-inspector/treetools/DebugArea";
  420. import { IToolInfo } from "babylonjs-inspector/treetools/Info";
  421. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  422. export class MeshAdapter extends Adapter implements IToolVisible, IToolDebug, IToolBoundingBox, IToolInfo {
  423. constructor(mesh: Node);
  424. /** Returns the name displayed in the tree */
  425. id(): string;
  426. /** Returns the type of this object - displayed in the tree */
  427. type(): string;
  428. /** Returns the list of properties to be displayed for this adapter */
  429. getProperties(): Array<PropertyLine>;
  430. getTools(): Array<AbstractTreeTool>;
  431. setVisible(b: boolean): void;
  432. isVisible(): boolean;
  433. isBoxVisible(): boolean;
  434. setBoxVisible(b: boolean): boolean;
  435. debug(enable: boolean): void;
  436. /** Returns some information about this mesh */
  437. getInfo(): string;
  438. }
  439. }
  440. declare module 'babylonjs-inspector/adapters/PhysicsImpostorAdapter' {
  441. import { PhysicsImpostor } from "babylonjs";
  442. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  443. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  444. import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
  445. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  446. export class PhysicsImpostorAdapter extends Adapter implements IToolVisible {
  447. constructor(obj: PhysicsImpostor, viewer: any);
  448. /** Returns the name displayed in the tree */
  449. id(): string;
  450. /** Returns the type of this object - displayed in the tree */
  451. type(): string;
  452. /** Returns the list of properties to be displayed for this adapter */
  453. getProperties(): Array<PropertyLine>;
  454. getTools(): Array<AbstractTreeTool>;
  455. setVisible(b: boolean): void;
  456. isVisible(): boolean;
  457. }
  458. }
  459. declare module 'babylonjs-inspector/adapters/SoundAdapter' {
  460. import { Sound } from "babylonjs";
  461. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  462. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  463. import { ISoundInteractions } from "babylonjs-inspector/treetools/SoundInteractions";
  464. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  465. export class SoundAdapter extends Adapter implements ISoundInteractions {
  466. constructor(obj: Sound);
  467. /** Returns the name displayed in the tree */
  468. id(): string;
  469. /** Returns the type of this object - displayed in the tree */
  470. type(): string;
  471. /** Returns the list of properties to be displayed for this adapter */
  472. getProperties(): Array<PropertyLine>;
  473. getTools(): Array<AbstractTreeTool>;
  474. setPlaying(callback: Function): void;
  475. }
  476. }
  477. declare module 'babylonjs-inspector/adapters/TextureAdapter' {
  478. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  479. import { BaseTexture } from "babylonjs";
  480. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  481. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  482. export class TextureAdapter extends Adapter {
  483. constructor(obj: BaseTexture);
  484. /** Returns the name displayed in the tree */
  485. id(): string;
  486. /** Returns the type of this object - displayed in the tree */
  487. type(): string;
  488. /** Returns the list of properties to be displayed for this adapter */
  489. getProperties(): Array<PropertyLine>;
  490. getTools(): Array<AbstractTreeTool>;
  491. }
  492. }
  493. declare module 'babylonjs-inspector/details/DetailPanel' {
  494. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  495. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  496. export interface SortDirection {
  497. [property: string]: number;
  498. }
  499. export class DetailPanel extends BasicElement {
  500. constructor(dr?: Array<PropertyLine>);
  501. details: Array<PropertyLine>;
  502. protected _build(): void;
  503. /** Updates the HTML of the detail panel */
  504. update(_items?: Array<PropertyLine>): void;
  505. /** Search an element by name */
  506. searchByName(searchName: string): void;
  507. /**
  508. * Removes all data in the detail panel but keep the header row
  509. */
  510. clean(): void;
  511. /**
  512. * Clean the rows only
  513. */
  514. cleanRow(): void;
  515. /** Overrides basicelement.dispose */
  516. dispose(): void;
  517. }
  518. }
  519. declare module 'babylonjs-inspector/details/Property' {
  520. /**
  521. * A property is a link between a data (string) and an object.
  522. */
  523. export class Property {
  524. constructor(prop: string, obj: any, parentObj?: any);
  525. readonly name: string;
  526. value: any;
  527. readonly type: string;
  528. obj: any;
  529. }
  530. }
  531. declare module 'babylonjs-inspector/details/PropertyLine' {
  532. import { Nullable } from "babylonjs";
  533. import { Property } from "babylonjs-inspector/details/Property";
  534. export class PropertyFormatter {
  535. /**
  536. * Format the value of the given property of the given object.
  537. */
  538. static format(obj: any, prop: string): string;
  539. }
  540. /**
  541. * A property line represents a line in the detail panel. This line is composed of :
  542. * - a name (the property name)
  543. * - a value if this property is of a type 'simple' : string, number, boolean, color, texture
  544. * - the type of the value if this property is of a complex type (Vector2, Size, ...)
  545. * - a ID if defined (otherwise an empty string is displayed)
  546. * The original object is sent to the value object who will update it at will.
  547. *
  548. * A property line can contain OTHER property line objects in the case of a complex type.
  549. * If this instance has no link to other instances, its type is ALWAYS a simple one (see above).
  550. *
  551. */
  552. export class PropertyLine {
  553. constructor(prop: Property, parent?: Nullable<PropertyLine>, level?: number);
  554. validateInput(value: any, forceupdate?: boolean): void;
  555. /** Retrieve the correct object from its parent.
  556. * If no parent exists, returns the property value.
  557. * This method is used at each update in case the property object is removed from the original object
  558. * (example : mesh.position = new Vector3 ; the original vector3 object is deleted from the mesh).
  559. */
  560. updateObject(): any;
  561. readonly name: string;
  562. readonly value: any;
  563. readonly type: string;
  564. /** Delete properly this property line.
  565. * Removes itself from the scheduler.
  566. * Dispose all viewer element (color, texture...)
  567. */
  568. dispose(): void;
  569. /**
  570. * Update the property division with the new property value.
  571. * If this property is complex, update its child, otherwise update its text content
  572. */
  573. update(): void;
  574. toHtml(): HTMLElement;
  575. closeDetails(): void;
  576. }
  577. }
  578. declare module 'babylonjs-inspector/gui/BasicElement' {
  579. /**
  580. * Represents a html div element.
  581. * The div is built when an instance of BasicElement is created.
  582. */
  583. export abstract class BasicElement {
  584. protected _div: HTMLDivElement;
  585. constructor();
  586. /**
  587. * Returns the div element
  588. */
  589. toHtml(): HTMLDivElement;
  590. /**
  591. * Build the html element
  592. */
  593. protected _build(): void;
  594. abstract update(data?: any): void;
  595. /** Default dispose method if needed */
  596. dispose(): void;
  597. }
  598. }
  599. declare module 'babylonjs-inspector/gui/ColorElement' {
  600. import { Color3, Color4 } from "babylonjs";
  601. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  602. /**
  603. * Display a very small div corresponding to the given color
  604. */
  605. export class ColorElement extends BasicElement {
  606. constructor(color: Color4 | Color3);
  607. update(color?: Color4 | Color3): void;
  608. }
  609. }
  610. declare module 'babylonjs-inspector/gui/ColorPickerElement' {
  611. import { Color3, Color4 } from "babylonjs";
  612. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  613. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  614. /**
  615. * Represents a html div element.
  616. * The div is built when an instance of BasicElement is created.
  617. */
  618. export class ColorPickerElement extends BasicElement {
  619. protected _input: HTMLInputElement;
  620. constructor(color: Color4 | Color3, propertyLine: PropertyLine);
  621. update(color?: Color4 | Color3): void;
  622. }
  623. }
  624. declare module 'babylonjs-inspector/gui/CubeTextureElement' {
  625. import { Mesh, Scene, Texture } from "babylonjs";
  626. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  627. /**
  628. * Display a very small div. A new canvas is created, with a new js scene, containing only the
  629. * cube texture in a cube
  630. */
  631. export class CubeTextureElement extends BasicElement {
  632. protected _scene: Scene;
  633. protected _cube: Mesh;
  634. protected _textureUrl: string;
  635. /** The texture given as a parameter should be cube. */
  636. constructor(tex: Texture);
  637. update(tex?: Texture): void;
  638. /** Creates the box */
  639. protected _populateScene(): void;
  640. /** Removes properly the babylon engine */
  641. dispose(): void;
  642. }
  643. }
  644. declare module 'babylonjs-inspector/gui/HDRCubeTextureElement' {
  645. import { Texture } from "babylonjs";
  646. import { CubeTextureElement } from "babylonjs-inspector/gui/CubeTextureElement";
  647. /**
  648. * Display a very small div. A new canvas is created, with a new js scene, containing only the
  649. * cube texture in a cube
  650. */
  651. export class HDRCubeTextureElement extends CubeTextureElement {
  652. /** The texture given as a parameter should be cube. */
  653. constructor(tex: Texture);
  654. /** Creates the box */
  655. protected _populateScene(): void;
  656. }
  657. }
  658. declare module 'babylonjs-inspector/gui/SearchBar' {
  659. import { DetailPanel } from "babylonjs-inspector/details/DetailPanel";
  660. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  661. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  662. /**
  663. * A search bar can be used to filter elements in the tree panel.
  664. * At each keypress on the input, the treepanel will be filtered.
  665. */
  666. export class SearchBar extends BasicElement {
  667. constructor(tab: PropertyTab);
  668. /** Delete all characters typped in the input element */
  669. reset(): void;
  670. update(): void;
  671. }
  672. export class SearchBarDetails extends BasicElement {
  673. constructor(tab: DetailPanel);
  674. /** Delete all characters typped in the input element */
  675. reset(): void;
  676. update(): void;
  677. }
  678. }
  679. declare module 'babylonjs-inspector/gui/TextureElement' {
  680. import { Texture } from "babylonjs";
  681. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  682. /**
  683. * Display a very small div corresponding to the given texture. On mouse over, display the full image
  684. */
  685. export class TextureElement extends BasicElement {
  686. constructor(tex: Texture);
  687. update(tex?: Texture): void;
  688. }
  689. }
  690. declare module 'babylonjs-inspector/gui/Tooltip' {
  691. import { Nullable } from "babylonjs";
  692. /**
  693. * Creates a tooltip for the parent of the given html element
  694. */
  695. export class Tooltip {
  696. constructor(elem: HTMLElement, tip: string, attachTo?: Nullable<HTMLElement>);
  697. }
  698. }
  699. declare module 'babylonjs-inspector/helpers/Helpers' {
  700. import { Nullable } from "babylonjs";
  701. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  702. export class Helpers {
  703. /**
  704. * Returns the type of the given object. First
  705. * uses getClassName. If nothing is returned, used the type of the constructor
  706. */
  707. static GET_TYPE(obj: any): string;
  708. /**
  709. * Returns true if the user browser is edge.
  710. */
  711. static IsBrowserEdge(): boolean;
  712. /**
  713. * Returns true if the user browser is IE.
  714. */
  715. static IsBrowserIE(): boolean;
  716. /** Send the event which name is given in parameter to the window */
  717. static SEND_EVENT(eventName: string): void;
  718. /** Returns the given number with 2 decimal number max if a decimal part exists */
  719. static Trunc(nb: number): number;
  720. /**
  721. * Useful function used to create a div
  722. */
  723. static CreateDiv(className?: Nullable<string>, parent?: HTMLElement): HTMLDivElement;
  724. /**
  725. * Useful function used to create a input
  726. */
  727. static CreateInput(className?: string, parent?: HTMLElement): HTMLInputElement;
  728. static CreateElement(element: string, className?: Nullable<string>, parent?: HTMLElement): HTMLElement;
  729. /**
  730. * Removes all children of the given div.
  731. */
  732. static CleanDiv(div: HTMLElement): void;
  733. /**
  734. * Returns the true value of the given CSS Attribute from the given element (in percentage or in pixel, as it was specified in the css)
  735. */
  736. static Css(elem: HTMLElement, cssAttribute: string): string;
  737. static LoadScript(): void;
  738. static IsSystemName(name: string): boolean;
  739. /**
  740. * Return an array of PropertyLine for an obj
  741. * @param obj
  742. */
  743. static GetAllLinesProperties(obj: any): Array<PropertyLine>;
  744. /**
  745. * Returns an array of string corresponding to tjhe list of properties of the object to be displayed
  746. * @param obj
  747. */
  748. static GetAllLinesPropertiesAsString(obj: any, dontTakeThis?: Array<string>): Array<string>;
  749. static Capitalize(str: string): string;
  750. }
  751. }
  752. declare module 'babylonjs-inspector/scheduler/Scheduler' {
  753. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  754. export class Scheduler {
  755. /** Is this scheduler in pause ? */
  756. pause: boolean;
  757. /** All properties are refreshed every 250ms */
  758. static REFRESH_TIME: number;
  759. constructor();
  760. static getInstance(): Scheduler;
  761. /** Add a property line to be updated every X ms */
  762. add(prop: PropertyLine): void;
  763. /** Removes the given property from the list of properties to update */
  764. remove(prop: PropertyLine): void;
  765. dispose(): void;
  766. }
  767. }
  768. declare module 'babylonjs-inspector/tabs/CameraTab' {
  769. import { Inspector } from "babylonjs-inspector/Inspector";
  770. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  771. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  772. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  773. export class CameraTab extends PropertyTab {
  774. constructor(tabbar: TabBar, inspector: Inspector);
  775. protected _getTree(): Array<TreeItem>;
  776. }
  777. }
  778. declare module 'babylonjs-inspector/tabs/ConsoleTab' {
  779. import { Inspector } from "babylonjs-inspector/Inspector";
  780. import { Tab } from "babylonjs-inspector/tabs/Tab";
  781. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  782. /**
  783. * The console tab will have two features :
  784. * - hook all console.log call and display them in this panel (and in the browser console as well)
  785. * - display all Babylon logs (called with Tools.Log...)
  786. */
  787. export class ConsoleTab extends Tab {
  788. constructor(tabbar: TabBar, insp: Inspector);
  789. /** Overrides super.dispose */
  790. dispose(): void;
  791. active(b: boolean): void;
  792. }
  793. }
  794. declare module 'babylonjs-inspector/tabs/GLTFTab' {
  795. import { Inspector } from "babylonjs-inspector/Inspector";
  796. import { Tab } from "babylonjs-inspector/tabs/Tab";
  797. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  798. export class GLTFTab extends Tab {
  799. static readonly IsSupported: boolean;
  800. /** @hidden */
  801. static _Initialize(): void;
  802. constructor(tabbar: TabBar, inspector: Inspector);
  803. dispose(): void;
  804. }
  805. }
  806. declare module 'babylonjs-inspector/tabs/GUITab' {
  807. import { Inspector } from "babylonjs-inspector/Inspector";
  808. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  809. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  810. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  811. export class GUITab extends PropertyTab {
  812. constructor(tabbar: TabBar, inspector: Inspector);
  813. protected _getTree(): Array<TreeItem>;
  814. }
  815. }
  816. declare module 'babylonjs-inspector/tabs/LightTab' {
  817. import { Inspector } from "babylonjs-inspector/Inspector";
  818. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  819. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  820. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  821. export class LightTab extends PropertyTab {
  822. constructor(tabbar: TabBar, inspector: Inspector);
  823. protected _getTree(): Array<TreeItem>;
  824. }
  825. }
  826. declare module 'babylonjs-inspector/tabs/MaterialTab' {
  827. import { Inspector } from "babylonjs-inspector/Inspector";
  828. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  829. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  830. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  831. export class MaterialTab extends PropertyTab {
  832. constructor(tabbar: TabBar, inspector: Inspector);
  833. protected _getTree(): Array<TreeItem>;
  834. }
  835. }
  836. declare module 'babylonjs-inspector/tabs/MeshTab' {
  837. import { Inspector } from "babylonjs-inspector/Inspector";
  838. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  839. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  840. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  841. export class MeshTab extends PropertyTab {
  842. constructor(tabbar: TabBar, inspector: Inspector);
  843. protected _getTree(): Array<TreeItem>;
  844. }
  845. }
  846. declare module 'babylonjs-inspector/tabs/PhysicsTab' {
  847. import { Inspector } from "babylonjs-inspector/Inspector";
  848. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  849. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  850. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  851. export class PhysicsTab extends PropertyTab {
  852. viewer: any;
  853. constructor(tabbar: TabBar, inspector: Inspector);
  854. protected _getTree(): Array<TreeItem>;
  855. }
  856. }
  857. declare module 'babylonjs-inspector/tabs/PropertyTab' {
  858. import { Nullable } from "babylonjs";
  859. import { DetailPanel } from "babylonjs-inspector/details/DetailPanel";
  860. import { SearchBar } from "babylonjs-inspector/gui/SearchBar";
  861. import { Inspector } from "babylonjs-inspector/Inspector";
  862. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  863. import { Tab } from "babylonjs-inspector/tabs/Tab";
  864. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  865. /**
  866. * A Property tab can creates two panels:
  867. * a tree panel and a detail panel,
  868. * in which properties will be displayed.
  869. * Both panels are separated by a resize bar
  870. */
  871. export abstract class PropertyTab extends Tab {
  872. protected _inspector: Inspector;
  873. /** The panel containing a list of items */
  874. protected _treePanel: HTMLDivElement;
  875. /** The panel containing a list if properties corresponding to an item */
  876. protected _detailsPanel: DetailPanel;
  877. protected _treeItems: Array<TreeItem>;
  878. protected _searchBar: SearchBar;
  879. constructor(tabbar: TabBar, name: string, insp: Inspector);
  880. /** Overrides dispose */
  881. dispose(): void;
  882. update(_items?: Array<TreeItem>): void;
  883. /** Display the details of the given item */
  884. displayDetails(item: TreeItem): void;
  885. /** Select an item in the tree */
  886. select(item: TreeItem): void;
  887. /** Set the given item as active in the tree */
  888. activateNode(item: TreeItem): void;
  889. /** Returns the treeitem corersponding to the given obj, null if not found */
  890. getItemFor(_obj: any): Nullable<TreeItem>;
  891. filter(filter: string): void;
  892. /** Builds the tree panel */
  893. protected abstract _getTree(): Array<TreeItem>;
  894. }
  895. }
  896. declare module 'babylonjs-inspector/tabs/SceneTab' {
  897. import { Inspector } from "babylonjs-inspector/Inspector";
  898. import { Tab } from "babylonjs-inspector/tabs/Tab";
  899. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  900. export class SceneTab extends Tab {
  901. constructor(tabbar: TabBar, insp: Inspector);
  902. /** Overrides super.dispose */
  903. dispose(): void;
  904. }
  905. }
  906. declare module 'babylonjs-inspector/tabs/SoundTab' {
  907. import { Inspector } from "babylonjs-inspector/Inspector";
  908. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  909. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  910. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  911. export class SoundTab extends PropertyTab {
  912. constructor(tabbar: TabBar, inspector: Inspector);
  913. protected _getTree(): Array<TreeItem>;
  914. }
  915. }
  916. declare module 'babylonjs-inspector/tabs/StatsTab' {
  917. import { Inspector } from "babylonjs-inspector/Inspector";
  918. import { Tab } from "babylonjs-inspector/tabs/Tab";
  919. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  920. export class StatsTab extends Tab {
  921. constructor(tabbar: TabBar, insp: Inspector);
  922. dispose(): void;
  923. active(b: boolean): void;
  924. }
  925. }
  926. declare module 'babylonjs-inspector/tabs/Tab' {
  927. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  928. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  929. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  930. export abstract class Tab extends BasicElement {
  931. protected _tabbar: TabBar;
  932. name: string;
  933. protected _isActive: boolean;
  934. protected _panel: HTMLDivElement;
  935. constructor(tabbar: TabBar, name: string);
  936. /** True if the tab is active, false otherwise */
  937. isActive(): boolean;
  938. protected _build(): void;
  939. /** Set this tab as active or not, depending on the current state */
  940. active(b: boolean): void;
  941. update(): void;
  942. /** Creates the tab panel for this tab. */
  943. getPanel(): HTMLElement;
  944. /** Add this in the propertytab with the searchbar */
  945. filter(str: string): void;
  946. /** Dispose properly this tab */
  947. abstract dispose(): void;
  948. /** Select an item in the tree */
  949. select(item: TreeItem): void;
  950. /**
  951. * Returns the total width in pixel of this tab, 0 by default
  952. */
  953. getPixelWidth(): number;
  954. }
  955. }
  956. declare module 'babylonjs-inspector/tabs/TabBar' {
  957. import { AbstractMesh, Nullable } from "babylonjs";
  958. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  959. import { Inspector } from "babylonjs-inspector/Inspector";
  960. import { Tab } from "babylonjs-inspector/tabs/Tab";
  961. /**
  962. * A tab bar will contains each view the inspector can have : Canvas2D, Meshes...
  963. * The default active tab is the first one of the list.
  964. */
  965. export class TabBar extends BasicElement {
  966. constructor(inspector: Inspector, initialTab?: number);
  967. update(): void;
  968. protected _build(): void;
  969. /** Dispose the current tab, set the given tab as active, and refresh the treeview */
  970. switchTab(tab: Tab): void;
  971. /** Display the mesh tab.
  972. * If a parameter is given, the given mesh details are displayed
  973. */
  974. switchMeshTab(mesh?: AbstractMesh): void;
  975. /** Returns the active tab */
  976. getActiveTab(): Nullable<Tab>;
  977. getActiveTabIndex(): number;
  978. readonly inspector: Inspector;
  979. /**
  980. * Returns the total width in pixel of the tabbar,
  981. * that corresponds to the sum of the width of each visible tab + toolbar width
  982. */
  983. getPixelWidth(): number;
  984. /** Display the remaining icon or not depending on the tabbar width.
  985. * This function should be called each time the inspector width is updated
  986. */
  987. updateWidth(): void;
  988. }
  989. }
  990. declare module 'babylonjs-inspector/tabs/TextureTab' {
  991. import { Inspector } from "babylonjs-inspector/Inspector";
  992. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  993. import { Tab } from "babylonjs-inspector/tabs/Tab";
  994. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  995. export class TextureTab extends Tab {
  996. /** The panel containing a list of items */
  997. protected _treePanel: HTMLElement;
  998. protected _treeItems: Array<TreeItem>;
  999. constructor(tabbar: TabBar, inspector: Inspector);
  1000. dispose(): void;
  1001. update(_items?: Array<TreeItem>): void;
  1002. /** Display the details of the given item */
  1003. displayDetails(item: TreeItem): void;
  1004. /** Select an item in the tree */
  1005. select(item: TreeItem): void;
  1006. /** Set the given item as active in the tree */
  1007. activateNode(item: TreeItem): void;
  1008. }
  1009. }
  1010. declare module 'babylonjs-inspector/tabs/ToolsTab' {
  1011. import { Inspector } from "babylonjs-inspector/Inspector";
  1012. import { Tab } from "babylonjs-inspector/tabs/Tab";
  1013. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  1014. export class ToolsTab extends Tab {
  1015. constructor(tabbar: TabBar, insp: Inspector);
  1016. dispose(): void;
  1017. }
  1018. }
  1019. declare module 'babylonjs-inspector/tools/AbstractTool' {
  1020. import { Inspector } from "babylonjs-inspector/Inspector";
  1021. export abstract class AbstractTool {
  1022. protected _inspector: Inspector;
  1023. constructor(iconSet: string, icon: string, parent: HTMLElement, inspector: Inspector, tooltip: string);
  1024. toHtml(): HTMLElement;
  1025. /**
  1026. * Returns the total width in pixel of this tool, 0 by default
  1027. */
  1028. getPixelWidth(): number;
  1029. /**
  1030. * Updates the icon of this tool with the given string
  1031. */
  1032. protected _updateIcon(icon: string): void;
  1033. abstract action(): void;
  1034. }
  1035. }
  1036. declare module 'babylonjs-inspector/tools/DisposeTool' {
  1037. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1038. import { Inspector } from "babylonjs-inspector/Inspector";
  1039. /**
  1040. * Removes the inspector panel
  1041. */
  1042. export class DisposeTool extends AbstractTool {
  1043. constructor(parent: HTMLElement, inspector: Inspector);
  1044. action(): void;
  1045. }
  1046. }
  1047. declare module 'babylonjs-inspector/tools/FullscreenTool' {
  1048. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1049. import { Inspector } from "babylonjs-inspector/Inspector";
  1050. export class FullscreenTool extends AbstractTool {
  1051. constructor(parent: HTMLElement, inspector: Inspector);
  1052. action(): void;
  1053. }
  1054. }
  1055. declare module 'babylonjs-inspector/tools/LabelTool' {
  1056. import { Inspector } from "babylonjs-inspector/Inspector";
  1057. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1058. export class LabelTool extends AbstractTool {
  1059. constructor(parent: HTMLElement, inspector: Inspector);
  1060. dispose(): void;
  1061. action(): void;
  1062. }
  1063. }
  1064. declare module 'babylonjs-inspector/tools/PauseScheduleTool' {
  1065. import { Inspector } from "babylonjs-inspector/Inspector";
  1066. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1067. export class PauseScheduleTool extends AbstractTool {
  1068. constructor(parent: HTMLElement, inspector: Inspector);
  1069. action(): void;
  1070. }
  1071. }
  1072. declare module 'babylonjs-inspector/tools/PickTool' {
  1073. import { Inspector } from "babylonjs-inspector/Inspector";
  1074. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1075. export class PickTool extends AbstractTool {
  1076. constructor(parent: HTMLElement, inspector: Inspector);
  1077. action(): void;
  1078. }
  1079. }
  1080. declare module 'babylonjs-inspector/tools/PopupTool' {
  1081. import { Inspector } from "babylonjs-inspector/Inspector";
  1082. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1083. export class PopupTool extends AbstractTool {
  1084. constructor(parent: HTMLElement, inspector: Inspector);
  1085. action(): void;
  1086. }
  1087. }
  1088. declare module 'babylonjs-inspector/tools/RefreshTool' {
  1089. import { Inspector } from "babylonjs-inspector/Inspector";
  1090. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1091. export class RefreshTool extends AbstractTool {
  1092. constructor(parent: HTMLElement, inspector: Inspector);
  1093. action(): void;
  1094. }
  1095. }
  1096. declare module 'babylonjs-inspector/tools/Toolbar' {
  1097. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  1098. import { Inspector } from "babylonjs-inspector/Inspector";
  1099. export class Toolbar extends BasicElement {
  1100. constructor(inspector: Inspector);
  1101. update(): void;
  1102. protected _build(): void;
  1103. /**
  1104. * Returns the total width in pixel of the tabbar,
  1105. * that corresponds to the sum of the width of each tab + toolbar width
  1106. */
  1107. getPixelWidth(): number;
  1108. }
  1109. }
  1110. declare module 'babylonjs-inspector/tree/TreeItem' {
  1111. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  1112. import { Tab } from "babylonjs-inspector/tabs/Tab";
  1113. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  1114. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  1115. export class TreeItem extends BasicElement {
  1116. children: Array<TreeItem>;
  1117. constructor(tab: Tab, obj: Adapter);
  1118. /** Returns the item ID == its adapter ID */
  1119. readonly id: string;
  1120. /** Add the given item as a child of this one */
  1121. add(child: TreeItem): void;
  1122. /**
  1123. * Returns the original adapter
  1124. */
  1125. readonly adapter: Adapter;
  1126. /**
  1127. * Function used to compare this item to another tree item.
  1128. * Returns the alphabetical sort of the adapter ID
  1129. */
  1130. compareTo(item: TreeItem): number;
  1131. /** Returns true if the given obj correspond to the adapter linked to this tree item */
  1132. correspondsTo(obj: any): boolean;
  1133. /** hide all children of this item */
  1134. fold(): void;
  1135. /** Show all children of this item */
  1136. unfold(): void;
  1137. /** Build the HTML of this item */
  1138. protected _build(): void;
  1139. /**
  1140. * Returns one HTML element (.details) containing all details of this primitive
  1141. */
  1142. getDetails(): Array<PropertyLine>;
  1143. update(): void;
  1144. /**
  1145. * Add an event listener on the item :
  1146. * - one click display details
  1147. */
  1148. protected _addEvent(): void;
  1149. /** Set this item as active (background lighter) in the tree panel */
  1150. active(b: boolean): void;
  1151. getDiv(): HTMLDivElement;
  1152. }
  1153. }
  1154. declare module 'babylonjs-inspector/treetools/AbstractTreeTool' {
  1155. export abstract class AbstractTreeTool {
  1156. protected _elem: HTMLElement;
  1157. /** Is the tool enabled ? */
  1158. protected _on: boolean;
  1159. constructor();
  1160. toHtml(): HTMLElement;
  1161. protected _addEvents(): void;
  1162. /**
  1163. * Action launched when clicked on this element
  1164. * Should be overrided
  1165. */
  1166. protected action(): void;
  1167. }
  1168. }
  1169. declare module 'babylonjs-inspector/treetools/BoundingBox' {
  1170. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1171. /** Any object implementing this interface should
  1172. * provide methods to toggle its bounding box
  1173. */
  1174. export interface IToolBoundingBox {
  1175. isBoxVisible: () => boolean;
  1176. setBoxVisible: (b: boolean) => void;
  1177. }
  1178. /**
  1179. * Checkbox to display/hide the primitive
  1180. */
  1181. export class BoundingBox extends AbstractTreeTool {
  1182. constructor(obj: IToolBoundingBox);
  1183. protected action(): void;
  1184. }
  1185. }
  1186. declare module 'babylonjs-inspector/treetools/CameraPOV' {
  1187. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1188. export interface ICameraPOV {
  1189. setPOV: () => void;
  1190. getCurrentActiveCamera: () => string;
  1191. id: () => string;
  1192. }
  1193. /**
  1194. *
  1195. */
  1196. export class CameraPOV extends AbstractTreeTool {
  1197. constructor(camera: ICameraPOV);
  1198. protected action(): void;
  1199. }
  1200. }
  1201. declare module 'babylonjs-inspector/treetools/Checkbox' {
  1202. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1203. /** Any object implementing this interface should
  1204. * provide methods to toggle its visibility
  1205. */
  1206. export interface IToolVisible {
  1207. isVisible: () => boolean;
  1208. setVisible: (b: boolean) => void;
  1209. }
  1210. /**
  1211. * Checkbox to display/hide the primitive
  1212. */
  1213. export class Checkbox extends AbstractTreeTool {
  1214. constructor(obj: IToolVisible);
  1215. protected action(): void;
  1216. }
  1217. }
  1218. declare module 'babylonjs-inspector/treetools/DebugArea' {
  1219. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1220. /** Any object implementing this interface should
  1221. * provide methods to toggle a debug area
  1222. */
  1223. export interface IToolDebug {
  1224. debug: (b: boolean) => void;
  1225. }
  1226. export class DebugArea extends AbstractTreeTool {
  1227. constructor(obj: IToolDebug);
  1228. protected action(): void;
  1229. }
  1230. }
  1231. declare module 'babylonjs-inspector/treetools/Info' {
  1232. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1233. /** Any object implementing this interface should
  1234. * provide methods to retrieve its info
  1235. */
  1236. export interface IToolInfo {
  1237. getInfo: () => string;
  1238. }
  1239. /**
  1240. * Checkbox to display/hide the primitive
  1241. */
  1242. export class Info extends AbstractTreeTool {
  1243. constructor(obj: IToolInfo);
  1244. protected action(): void;
  1245. }
  1246. }
  1247. declare module 'babylonjs-inspector/treetools/SoundInteractions' {
  1248. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1249. export interface ISoundInteractions {
  1250. setPlaying: (callback: Function) => void;
  1251. }
  1252. /**
  1253. *
  1254. */
  1255. export class SoundInteractions extends AbstractTreeTool {
  1256. constructor(playSound: ISoundInteractions);
  1257. protected action(): void;
  1258. }
  1259. }