babylon.inspector.module.d.ts 53 KB

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