babylon.inspector.module.d.ts 91 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371
  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<any>;
  100. static GUIObject: any;
  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 = any;
  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. }
  1262. /*BabylonJS Inspector*/
  1263. // Dependencies for this module:
  1264. // ../../../../Tools/Gulp/babylonjs
  1265. declare module INSPECTOR {
  1266. }
  1267. declare module INSPECTOR {
  1268. }
  1269. declare module INSPECTOR {
  1270. }
  1271. declare module INSPECTOR {
  1272. }
  1273. declare module INSPECTOR {
  1274. }
  1275. declare module INSPECTOR {
  1276. }
  1277. declare module INSPECTOR {
  1278. }
  1279. declare module INSPECTOR {
  1280. }
  1281. declare module INSPECTOR {
  1282. }
  1283. declare module INSPECTOR {
  1284. }
  1285. declare module INSPECTOR {
  1286. export class Inspector {
  1287. /** The HTML document relative to this inspector (the window or the popup depending on its mode) */
  1288. static DOCUMENT: HTMLDocument;
  1289. /** The HTML window. In popup mode, it's the popup itself. Otherwise, it's the current tab */
  1290. static WINDOW: Window;
  1291. onGUILoaded: BABYLON.Observable<any>;
  1292. static GUIObject: any;
  1293. /** The inspector is created with the given engine.
  1294. * If the parameter 'popup' is false, the inspector is created as a right panel on the main window.
  1295. * If the parameter 'popup' is true, the inspector is created in another popup.
  1296. */
  1297. constructor(scene: BABYLON.Scene, popup?: boolean, initialTab?: number, parentElement?: BABYLON.Nullable<HTMLElement>, newColors?: {
  1298. backgroundColor?: string;
  1299. backgroundColorLighter?: string;
  1300. backgroundColorLighter2?: string;
  1301. backgroundColorLighter3?: string;
  1302. color?: string;
  1303. colorTop?: string;
  1304. colorBot?: string;
  1305. });
  1306. readonly scene: BABYLON.Scene;
  1307. readonly popupMode: boolean;
  1308. /**
  1309. * Filter the list of item present in the tree.
  1310. * All item returned should have the given filter contained in the item id.
  1311. */
  1312. filterItem(filter: string): void;
  1313. /** Display the mesh tab on the given object */
  1314. displayObjectDetails(mesh: BABYLON.AbstractMesh): void;
  1315. /** Clean the whole tree of item and rebuilds it */
  1316. refresh(): void;
  1317. /** Remove the inspector panel when it's built as a right panel:
  1318. * remove the right panel and remove the wrapper
  1319. */
  1320. dispose(): void;
  1321. /** Open the inspector in a new popup
  1322. * Set 'firstTime' to true if there is no inspector created beforehands
  1323. */
  1324. openPopup(firstTime?: boolean): void;
  1325. getActiveTabIndex(): number;
  1326. }
  1327. }
  1328. declare module INSPECTOR {
  1329. export const PROPERTIES: {
  1330. /** Format the given object :
  1331. * If a format function exists, returns the result of this function.
  1332. * If this function doesn't exists, return the object type instead
  1333. */
  1334. format: (obj: any) => any;
  1335. 'type_not_defined': {
  1336. properties: any[];
  1337. format: () => string;
  1338. };
  1339. 'Vector2': {
  1340. type: typeof BABYLON.Vector2;
  1341. format: (vec: BABYLON.Vector2) => string;
  1342. };
  1343. 'Vector3': {
  1344. type: typeof BABYLON.Vector3;
  1345. format: (vec: BABYLON.Vector3) => string;
  1346. };
  1347. 'Color3': {
  1348. type: typeof BABYLON.Color3;
  1349. format: (color: BABYLON.Color3) => string;
  1350. slider: {
  1351. r: {
  1352. min: number;
  1353. max: number;
  1354. step: number;
  1355. };
  1356. g: {
  1357. min: number;
  1358. max: number;
  1359. step: number;
  1360. };
  1361. b: {
  1362. min: number;
  1363. max: number;
  1364. step: number;
  1365. };
  1366. };
  1367. };
  1368. 'Color4': {
  1369. type: typeof BABYLON.Color4;
  1370. format: (color: BABYLON.Color4) => string;
  1371. slider: {
  1372. r: {
  1373. min: number;
  1374. max: number;
  1375. step: number;
  1376. };
  1377. g: {
  1378. min: number;
  1379. max: number;
  1380. step: number;
  1381. };
  1382. b: {
  1383. min: number;
  1384. max: number;
  1385. step: number;
  1386. };
  1387. };
  1388. };
  1389. 'Quaternion': {
  1390. type: typeof BABYLON.Quaternion;
  1391. };
  1392. 'Size': {
  1393. type: typeof BABYLON.Size;
  1394. format: (size: BABYLON.Size) => string;
  1395. };
  1396. 'Texture': {
  1397. type: typeof BABYLON.Texture;
  1398. format: (tex: BABYLON.Texture) => string;
  1399. };
  1400. 'RenderTargetTexture': {
  1401. type: typeof BABYLON.RenderTargetTexture;
  1402. };
  1403. 'DynamicTexture': {
  1404. type: typeof BABYLON.DynamicTexture;
  1405. };
  1406. 'BaseTexture': {
  1407. type: typeof BABYLON.BaseTexture;
  1408. };
  1409. 'CubeTexture': {
  1410. type: typeof BABYLON.CubeTexture;
  1411. };
  1412. 'HDRCubeTexture': {
  1413. type: typeof BABYLON.HDRCubeTexture;
  1414. };
  1415. 'Sound': {
  1416. type: typeof BABYLON.Sound;
  1417. };
  1418. 'ArcRotateCamera': {
  1419. type: typeof BABYLON.ArcRotateCamera;
  1420. slider: {
  1421. alpha: {
  1422. min: number;
  1423. max: number;
  1424. step: number;
  1425. };
  1426. beta: {
  1427. min: number;
  1428. max: number;
  1429. step: number;
  1430. };
  1431. fov: {
  1432. min: number;
  1433. max: number;
  1434. step: number;
  1435. };
  1436. };
  1437. };
  1438. 'FreeCamera': {
  1439. type: typeof BABYLON.FreeCamera;
  1440. slider: {
  1441. fov: {
  1442. min: number;
  1443. max: number;
  1444. step: number;
  1445. };
  1446. };
  1447. };
  1448. 'Scene': {
  1449. type: typeof BABYLON.Scene;
  1450. };
  1451. 'TransformNode': {
  1452. type: typeof BABYLON.TransformNode;
  1453. format: (m: BABYLON.TransformNode) => string;
  1454. };
  1455. 'AbstractMesh': {
  1456. type: typeof BABYLON.AbstractMesh;
  1457. format: (m: BABYLON.AbstractMesh) => string;
  1458. };
  1459. 'Mesh': {
  1460. type: typeof BABYLON.Mesh;
  1461. format: (m: BABYLON.Mesh) => string;
  1462. slider: {
  1463. visibility: {
  1464. min: number;
  1465. max: number;
  1466. step: number;
  1467. };
  1468. };
  1469. };
  1470. 'StandardMaterial': {
  1471. type: typeof BABYLON.StandardMaterial;
  1472. format: (mat: BABYLON.StandardMaterial) => string;
  1473. slider: {
  1474. alpha: {
  1475. min: number;
  1476. max: number;
  1477. step: number;
  1478. };
  1479. };
  1480. };
  1481. 'PBRMaterial': {
  1482. type: typeof BABYLON.PBRMaterial;
  1483. slider: {
  1484. alpha: {
  1485. min: number;
  1486. max: number;
  1487. step: number;
  1488. };
  1489. };
  1490. };
  1491. 'PhysicsImpostor': {
  1492. type: typeof BABYLON.PhysicsImpostor;
  1493. };
  1494. 'ImageProcessingConfiguration': {
  1495. type: typeof BABYLON.ImageProcessingConfiguration;
  1496. };
  1497. 'ColorCurves': {
  1498. type: typeof BABYLON.ColorCurves;
  1499. };
  1500. };
  1501. }
  1502. declare module INSPECTOR {
  1503. export type GUITyping = any;
  1504. export let guiLoaded: boolean;
  1505. /**
  1506. * Function that add gui objects properties to the variable PROPERTIES
  1507. */
  1508. export function loadGUIProperties(GUI: GUITyping): void;
  1509. }
  1510. declare module INSPECTOR {
  1511. export abstract class Adapter {
  1512. protected _obj: any;
  1513. constructor(obj: any);
  1514. /** Returns the name displayed in the tree */
  1515. abstract id(): string;
  1516. /** Returns the type of this object - displayed in the tree */
  1517. abstract type(): string;
  1518. /** Returns the list of properties to be displayed for this adapter */
  1519. abstract getProperties(): Array<PropertyLine>;
  1520. /** Returns true if the given object correspond to this */
  1521. correspondsTo(obj: any): boolean;
  1522. /** Returns the adapter unique name */
  1523. readonly name: string;
  1524. /**
  1525. * Returns the actual object used for this adapter
  1526. */
  1527. readonly object: any;
  1528. /** Returns the list of tools available for this adapter */
  1529. abstract getTools(): Array<AbstractTreeTool>;
  1530. }
  1531. }
  1532. declare module INSPECTOR {
  1533. export class CameraAdapter extends Adapter implements ICameraPOV {
  1534. constructor(obj: BABYLON.Camera);
  1535. /** Returns the name displayed in the tree */
  1536. id(): string;
  1537. /** Returns the type of this object - displayed in the tree */
  1538. type(): string;
  1539. /** Returns the list of properties to be displayed for this adapter */
  1540. getProperties(): Array<PropertyLine>;
  1541. getTools(): Array<AbstractTreeTool>;
  1542. setPOV(): void;
  1543. getCurrentActiveCamera(): string;
  1544. }
  1545. }
  1546. declare module INSPECTOR {
  1547. export class GUIAdapter extends Adapter implements IToolVisible {
  1548. constructor(obj: import("babylonjs-gui").Control);
  1549. /** Returns the name displayed in the tree */
  1550. id(): string;
  1551. /** Returns the type of this object - displayed in the tree */
  1552. type(): string;
  1553. /** Returns the list of properties to be displayed for this adapter */
  1554. getProperties(): Array<PropertyLine>;
  1555. getTools(): Array<AbstractTreeTool>;
  1556. setVisible(b: boolean): void;
  1557. isVisible(): boolean;
  1558. }
  1559. }
  1560. declare module INSPECTOR {
  1561. export class LightAdapter extends Adapter implements IToolVisible {
  1562. constructor(obj: BABYLON.Light);
  1563. /** Returns the name displayed in the tree */
  1564. id(): string;
  1565. /** Returns the type of this object - displayed in the tree */
  1566. type(): string;
  1567. /** Returns the list of properties to be displayed for this adapter */
  1568. getProperties(): Array<PropertyLine>;
  1569. getTools(): Array<AbstractTreeTool>;
  1570. setVisible(b: boolean): void;
  1571. isVisible(): boolean;
  1572. }
  1573. }
  1574. declare module INSPECTOR {
  1575. export class MaterialAdapter extends Adapter {
  1576. constructor(obj: BABYLON.Material);
  1577. /** Returns the name displayed in the tree */
  1578. id(): string;
  1579. /** Returns the type of this object - displayed in the tree */
  1580. type(): string;
  1581. /** Returns the list of properties to be displayed for this adapter */
  1582. getProperties(): Array<PropertyLine>;
  1583. /** No tools for a material adapter */
  1584. getTools(): Array<AbstractTreeTool>;
  1585. }
  1586. }
  1587. declare module INSPECTOR {
  1588. export class MeshAdapter extends Adapter implements IToolVisible, IToolDebug, IToolBoundingBox, IToolInfo {
  1589. constructor(mesh: BABYLON.Node);
  1590. /** Returns the name displayed in the tree */
  1591. id(): string;
  1592. /** Returns the type of this object - displayed in the tree */
  1593. type(): string;
  1594. /** Returns the list of properties to be displayed for this adapter */
  1595. getProperties(): Array<PropertyLine>;
  1596. getTools(): Array<AbstractTreeTool>;
  1597. setVisible(b: boolean): void;
  1598. isVisible(): boolean;
  1599. isBoxVisible(): boolean;
  1600. setBoxVisible(b: boolean): boolean;
  1601. debug(enable: boolean): void;
  1602. /** Returns some information about this mesh */
  1603. getInfo(): string;
  1604. }
  1605. }
  1606. declare module INSPECTOR {
  1607. export class PhysicsImpostorAdapter extends Adapter implements IToolVisible {
  1608. constructor(obj: BABYLON.PhysicsImpostor, viewer: any);
  1609. /** Returns the name displayed in the tree */
  1610. id(): string;
  1611. /** Returns the type of this object - displayed in the tree */
  1612. type(): string;
  1613. /** Returns the list of properties to be displayed for this adapter */
  1614. getProperties(): Array<PropertyLine>;
  1615. getTools(): Array<AbstractTreeTool>;
  1616. setVisible(b: boolean): void;
  1617. isVisible(): boolean;
  1618. }
  1619. }
  1620. declare module INSPECTOR {
  1621. export class SoundAdapter extends Adapter implements ISoundInteractions {
  1622. constructor(obj: BABYLON.Sound);
  1623. /** Returns the name displayed in the tree */
  1624. id(): string;
  1625. /** Returns the type of this object - displayed in the tree */
  1626. type(): string;
  1627. /** Returns the list of properties to be displayed for this adapter */
  1628. getProperties(): Array<PropertyLine>;
  1629. getTools(): Array<AbstractTreeTool>;
  1630. setPlaying(callback: Function): void;
  1631. }
  1632. }
  1633. declare module INSPECTOR {
  1634. export class TextureAdapter extends Adapter {
  1635. constructor(obj: BABYLON.BaseTexture);
  1636. /** Returns the name displayed in the tree */
  1637. id(): string;
  1638. /** Returns the type of this object - displayed in the tree */
  1639. type(): string;
  1640. /** Returns the list of properties to be displayed for this adapter */
  1641. getProperties(): Array<PropertyLine>;
  1642. getTools(): Array<AbstractTreeTool>;
  1643. }
  1644. }
  1645. declare module INSPECTOR {
  1646. export interface SortDirection {
  1647. [property: string]: number;
  1648. }
  1649. export class DetailPanel extends BasicElement {
  1650. constructor(dr?: Array<PropertyLine>);
  1651. details: Array<PropertyLine>;
  1652. protected _build(): void;
  1653. /** Updates the HTML of the detail panel */
  1654. update(_items?: Array<PropertyLine>): void;
  1655. /** Search an element by name */
  1656. searchByName(searchName: string): void;
  1657. /**
  1658. * Removes all data in the detail panel but keep the header row
  1659. */
  1660. clean(): void;
  1661. /**
  1662. * Clean the rows only
  1663. */
  1664. cleanRow(): void;
  1665. /** Overrides basicelement.dispose */
  1666. dispose(): void;
  1667. }
  1668. }
  1669. declare module INSPECTOR {
  1670. /**
  1671. * A property is a link between a data (string) and an object.
  1672. */
  1673. export class Property {
  1674. constructor(prop: string, obj: any, parentObj?: any);
  1675. readonly name: string;
  1676. value: any;
  1677. readonly type: string;
  1678. obj: any;
  1679. }
  1680. }
  1681. declare module INSPECTOR {
  1682. export class PropertyFormatter {
  1683. /**
  1684. * Format the value of the given property of the given object.
  1685. */
  1686. static format(obj: any, prop: string): string;
  1687. }
  1688. /**
  1689. * A property line represents a line in the detail panel. This line is composed of :
  1690. * - a name (the property name)
  1691. * - a value if this property is of a type 'simple' : string, number, boolean, color, texture
  1692. * - the type of the value if this property is of a complex type (Vector2, BABYLON.Size, ...)
  1693. * - a ID if defined (otherwise an empty string is displayed)
  1694. * The original object is sent to the value object who will update it at will.
  1695. *
  1696. * A property line can contain OTHER property line objects in the case of a complex type.
  1697. * If this instance has no link to other instances, its type is ALWAYS a simple one (see above).
  1698. *
  1699. */
  1700. export class PropertyLine {
  1701. constructor(prop: Property, parent?: BABYLON.Nullable<PropertyLine>, level?: number);
  1702. validateInput(value: any, forceupdate?: boolean): void;
  1703. /** Retrieve the correct object from its parent.
  1704. * If no parent exists, returns the property value.
  1705. * This method is used at each update in case the property object is removed from the original object
  1706. * (example : mesh.position = new BABYLON.Vector3 ; the original vector3 object is deleted from the mesh).
  1707. */
  1708. updateObject(): any;
  1709. readonly name: string;
  1710. readonly value: any;
  1711. readonly type: string;
  1712. /** Delete properly this property line.
  1713. * Removes itself from the scheduler.
  1714. * Dispose all viewer element (color, texture...)
  1715. */
  1716. dispose(): void;
  1717. /**
  1718. * Update the property division with the new property value.
  1719. * If this property is complex, update its child, otherwise update its text content
  1720. */
  1721. update(): void;
  1722. toHtml(): HTMLElement;
  1723. closeDetails(): void;
  1724. }
  1725. }
  1726. declare module INSPECTOR {
  1727. /**
  1728. * Represents a html div element.
  1729. * The div is built when an instance of BasicElement is created.
  1730. */
  1731. export abstract class BasicElement {
  1732. protected _div: HTMLDivElement;
  1733. constructor();
  1734. /**
  1735. * Returns the div element
  1736. */
  1737. toHtml(): HTMLDivElement;
  1738. /**
  1739. * Build the html element
  1740. */
  1741. protected _build(): void;
  1742. abstract update(data?: any): void;
  1743. /** Default dispose method if needed */
  1744. dispose(): void;
  1745. }
  1746. }
  1747. declare module INSPECTOR {
  1748. /**
  1749. * Display a very small div corresponding to the given color
  1750. */
  1751. export class ColorElement extends BasicElement {
  1752. constructor(color: BABYLON.Color4 | BABYLON.Color3);
  1753. update(color?: BABYLON.Color4 | BABYLON.Color3): void;
  1754. }
  1755. }
  1756. declare module INSPECTOR {
  1757. /**
  1758. * Represents a html div element.
  1759. * The div is built when an instance of BasicElement is created.
  1760. */
  1761. export class ColorPickerElement extends BasicElement {
  1762. protected _input: HTMLInputElement;
  1763. constructor(color: BABYLON.Color4 | BABYLON.Color3, propertyLine: PropertyLine);
  1764. update(color?: BABYLON.Color4 | BABYLON.Color3): void;
  1765. }
  1766. }
  1767. declare module INSPECTOR {
  1768. /**
  1769. * Display a very small div. A new canvas is created, with a new js scene, containing only the
  1770. * cube texture in a cube
  1771. */
  1772. export class CubeTextureElement extends BasicElement {
  1773. protected _scene: BABYLON.Scene;
  1774. protected _cube: BABYLON.Mesh;
  1775. protected _textureUrl: string;
  1776. /** The texture given as a parameter should be cube. */
  1777. constructor(tex: BABYLON.Texture);
  1778. update(tex?: BABYLON.Texture): void;
  1779. /** Creates the box */
  1780. protected _populateScene(): void;
  1781. /** Removes properly the babylon engine */
  1782. dispose(): void;
  1783. }
  1784. }
  1785. declare module INSPECTOR {
  1786. /**
  1787. * Display a very small div. A new canvas is created, with a new js scene, containing only the
  1788. * cube texture in a cube
  1789. */
  1790. export class HDRCubeTextureElement extends CubeTextureElement {
  1791. /** The texture given as a parameter should be cube. */
  1792. constructor(tex: BABYLON.Texture);
  1793. /** Creates the box */
  1794. protected _populateScene(): void;
  1795. }
  1796. }
  1797. declare module INSPECTOR {
  1798. /**
  1799. * A search bar can be used to filter elements in the tree panel.
  1800. * At each keypress on the input, the treepanel will be filtered.
  1801. */
  1802. export class SearchBar extends BasicElement {
  1803. constructor(tab: PropertyTab);
  1804. /** Delete all characters typped in the input element */
  1805. reset(): void;
  1806. update(): void;
  1807. }
  1808. export class SearchBarDetails extends BasicElement {
  1809. constructor(tab: DetailPanel);
  1810. /** Delete all characters typped in the input element */
  1811. reset(): void;
  1812. update(): void;
  1813. }
  1814. }
  1815. declare module INSPECTOR {
  1816. /**
  1817. * Display a very small div corresponding to the given texture. On mouse over, display the full image
  1818. */
  1819. export class TextureElement extends BasicElement {
  1820. constructor(tex: BABYLON.Texture);
  1821. update(tex?: BABYLON.Texture): void;
  1822. }
  1823. }
  1824. declare module INSPECTOR {
  1825. /**
  1826. * Creates a tooltip for the parent of the given html element
  1827. */
  1828. export class Tooltip {
  1829. constructor(elem: HTMLElement, tip: string, attachTo?: BABYLON.Nullable<HTMLElement>);
  1830. }
  1831. }
  1832. declare module INSPECTOR {
  1833. export class Helpers {
  1834. /**
  1835. * Returns the type of the given object. First
  1836. * uses getClassName. If nothing is returned, used the type of the constructor
  1837. */
  1838. static GET_TYPE(obj: any): string;
  1839. /**
  1840. * Returns true if the user browser is edge.
  1841. */
  1842. static IsBrowserEdge(): boolean;
  1843. /**
  1844. * Returns true if the user browser is IE.
  1845. */
  1846. static IsBrowserIE(): boolean;
  1847. /** Send the event which name is given in parameter to the window */
  1848. static SEND_EVENT(eventName: string): void;
  1849. /** Returns the given number with 2 decimal number max if a decimal part exists */
  1850. static Trunc(nb: number): number;
  1851. /**
  1852. * Useful function used to create a div
  1853. */
  1854. static CreateDiv(className?: BABYLON.Nullable<string>, parent?: HTMLElement): HTMLDivElement;
  1855. /**
  1856. * Useful function used to create a input
  1857. */
  1858. static CreateInput(className?: string, parent?: HTMLElement): HTMLInputElement;
  1859. static CreateElement(element: string, className?: BABYLON.Nullable<string>, parent?: HTMLElement): HTMLElement;
  1860. /**
  1861. * Removes all children of the given div.
  1862. */
  1863. static CleanDiv(div: HTMLElement): void;
  1864. /**
  1865. * 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)
  1866. */
  1867. static Css(elem: HTMLElement, cssAttribute: string): string;
  1868. static LoadScript(): void;
  1869. static IsSystemName(name: string): boolean;
  1870. /**
  1871. * Return an array of PropertyLine for an obj
  1872. * @param obj
  1873. */
  1874. static GetAllLinesProperties(obj: any): Array<PropertyLine>;
  1875. /**
  1876. * Returns an array of string corresponding to tjhe list of properties of the object to be displayed
  1877. * @param obj
  1878. */
  1879. static GetAllLinesPropertiesAsString(obj: any, dontTakeThis?: Array<string>): Array<string>;
  1880. static Capitalize(str: string): string;
  1881. }
  1882. }
  1883. declare module INSPECTOR {
  1884. export class Scheduler {
  1885. /** Is this scheduler in pause ? */
  1886. pause: boolean;
  1887. /** All properties are refreshed every 250ms */
  1888. static REFRESH_TIME: number;
  1889. constructor();
  1890. static getInstance(): Scheduler;
  1891. /** Add a property line to be updated every X ms */
  1892. add(prop: PropertyLine): void;
  1893. /** Removes the given property from the list of properties to update */
  1894. remove(prop: PropertyLine): void;
  1895. dispose(): void;
  1896. }
  1897. }
  1898. declare module INSPECTOR {
  1899. export class CameraTab extends PropertyTab {
  1900. constructor(tabbar: TabBar, inspector: Inspector);
  1901. protected _getTree(): Array<TreeItem>;
  1902. }
  1903. }
  1904. declare module INSPECTOR {
  1905. /**
  1906. * The console tab will have two features :
  1907. * - hook all console.log call and display them in this panel (and in the browser console as well)
  1908. * - display all Babylon logs (called with Tools.Log...)
  1909. */
  1910. export class ConsoleTab extends Tab {
  1911. constructor(tabbar: TabBar, insp: Inspector);
  1912. /** Overrides super.dispose */
  1913. dispose(): void;
  1914. active(b: boolean): void;
  1915. }
  1916. }
  1917. declare module INSPECTOR {
  1918. export class GLTFTab extends Tab {
  1919. static readonly IsSupported: boolean;
  1920. /** @hidden */
  1921. static _Initialize(): void;
  1922. constructor(tabbar: TabBar, inspector: Inspector);
  1923. dispose(): void;
  1924. }
  1925. }
  1926. declare module INSPECTOR {
  1927. export class GUITab extends PropertyTab {
  1928. constructor(tabbar: TabBar, inspector: Inspector);
  1929. protected _getTree(): Array<TreeItem>;
  1930. }
  1931. }
  1932. declare module INSPECTOR {
  1933. export class LightTab extends PropertyTab {
  1934. constructor(tabbar: TabBar, inspector: Inspector);
  1935. protected _getTree(): Array<TreeItem>;
  1936. }
  1937. }
  1938. declare module INSPECTOR {
  1939. export class MaterialTab extends PropertyTab {
  1940. constructor(tabbar: TabBar, inspector: Inspector);
  1941. protected _getTree(): Array<TreeItem>;
  1942. }
  1943. }
  1944. declare module INSPECTOR {
  1945. export class MeshTab extends PropertyTab {
  1946. constructor(tabbar: TabBar, inspector: Inspector);
  1947. protected _getTree(): Array<TreeItem>;
  1948. }
  1949. }
  1950. declare module INSPECTOR {
  1951. export class PhysicsTab extends PropertyTab {
  1952. viewer: any;
  1953. constructor(tabbar: TabBar, inspector: Inspector);
  1954. protected _getTree(): Array<TreeItem>;
  1955. }
  1956. }
  1957. declare module INSPECTOR {
  1958. /**
  1959. * A Property tab can creates two panels:
  1960. * a tree panel and a detail panel,
  1961. * in which properties will be displayed.
  1962. * Both panels are separated by a resize bar
  1963. */
  1964. export abstract class PropertyTab extends Tab {
  1965. protected _inspector: Inspector;
  1966. /** The panel containing a list of items */
  1967. protected _treePanel: HTMLDivElement;
  1968. /** The panel containing a list if properties corresponding to an item */
  1969. protected _detailsPanel: DetailPanel;
  1970. protected _treeItems: Array<TreeItem>;
  1971. protected _searchBar: SearchBar;
  1972. constructor(tabbar: TabBar, name: string, insp: Inspector);
  1973. /** Overrides dispose */
  1974. dispose(): void;
  1975. update(_items?: Array<TreeItem>): void;
  1976. /** Display the details of the given item */
  1977. displayDetails(item: TreeItem): void;
  1978. /** Select an item in the tree */
  1979. select(item: TreeItem): void;
  1980. /** Set the given item as active in the tree */
  1981. activateNode(item: TreeItem): void;
  1982. /** Returns the treeitem corersponding to the given obj, null if not found */
  1983. getItemFor(_obj: any): BABYLON.Nullable<TreeItem>;
  1984. filter(filter: string): void;
  1985. /** Builds the tree panel */
  1986. protected abstract _getTree(): Array<TreeItem>;
  1987. }
  1988. }
  1989. declare module INSPECTOR {
  1990. export class SceneTab extends Tab {
  1991. constructor(tabbar: TabBar, insp: Inspector);
  1992. /** Overrides super.dispose */
  1993. dispose(): void;
  1994. }
  1995. }
  1996. declare module INSPECTOR {
  1997. export class SoundTab extends PropertyTab {
  1998. constructor(tabbar: TabBar, inspector: Inspector);
  1999. protected _getTree(): Array<TreeItem>;
  2000. }
  2001. }
  2002. declare module INSPECTOR {
  2003. export class StatsTab extends Tab {
  2004. constructor(tabbar: TabBar, insp: Inspector);
  2005. dispose(): void;
  2006. active(b: boolean): void;
  2007. }
  2008. }
  2009. declare module INSPECTOR {
  2010. export abstract class Tab extends BasicElement {
  2011. protected _tabbar: TabBar;
  2012. name: string;
  2013. protected _isActive: boolean;
  2014. protected _panel: HTMLDivElement;
  2015. constructor(tabbar: TabBar, name: string);
  2016. /** True if the tab is active, false otherwise */
  2017. isActive(): boolean;
  2018. protected _build(): void;
  2019. /** Set this tab as active or not, depending on the current state */
  2020. active(b: boolean): void;
  2021. update(): void;
  2022. /** Creates the tab panel for this tab. */
  2023. getPanel(): HTMLElement;
  2024. /** Add this in the propertytab with the searchbar */
  2025. filter(str: string): void;
  2026. /** Dispose properly this tab */
  2027. abstract dispose(): void;
  2028. /** Select an item in the tree */
  2029. select(item: TreeItem): void;
  2030. /**
  2031. * Returns the total width in pixel of this tab, 0 by default
  2032. */
  2033. getPixelWidth(): number;
  2034. }
  2035. }
  2036. declare module INSPECTOR {
  2037. /**
  2038. * A tab bar will contains each view the inspector can have : Canvas2D, Meshes...
  2039. * The default active tab is the first one of the list.
  2040. */
  2041. export class TabBar extends BasicElement {
  2042. constructor(inspector: Inspector, initialTab?: number);
  2043. update(): void;
  2044. protected _build(): void;
  2045. /** Dispose the current tab, set the given tab as active, and refresh the treeview */
  2046. switchTab(tab: Tab): void;
  2047. /** Display the mesh tab.
  2048. * If a parameter is given, the given mesh details are displayed
  2049. */
  2050. switchMeshTab(mesh?: BABYLON.AbstractMesh): void;
  2051. /** Returns the active tab */
  2052. getActiveTab(): BABYLON.Nullable<Tab>;
  2053. getActiveTabIndex(): number;
  2054. readonly inspector: Inspector;
  2055. /**
  2056. * Returns the total width in pixel of the tabbar,
  2057. * that corresponds to the sum of the width of each visible tab + toolbar width
  2058. */
  2059. getPixelWidth(): number;
  2060. /** Display the remaining icon or not depending on the tabbar width.
  2061. * This function should be called each time the inspector width is updated
  2062. */
  2063. updateWidth(): void;
  2064. }
  2065. }
  2066. declare module INSPECTOR {
  2067. export class TextureTab extends Tab {
  2068. /** The panel containing a list of items */
  2069. protected _treePanel: HTMLElement;
  2070. protected _treeItems: Array<TreeItem>;
  2071. constructor(tabbar: TabBar, inspector: Inspector);
  2072. dispose(): void;
  2073. update(_items?: Array<TreeItem>): void;
  2074. /** Display the details of the given item */
  2075. displayDetails(item: TreeItem): void;
  2076. /** Select an item in the tree */
  2077. select(item: TreeItem): void;
  2078. /** Set the given item as active in the tree */
  2079. activateNode(item: TreeItem): void;
  2080. }
  2081. }
  2082. declare module INSPECTOR {
  2083. export class ToolsTab extends Tab {
  2084. constructor(tabbar: TabBar, insp: Inspector);
  2085. dispose(): void;
  2086. }
  2087. }
  2088. declare module INSPECTOR {
  2089. export abstract class AbstractTool {
  2090. protected _inspector: Inspector;
  2091. constructor(iconSet: string, icon: string, parent: HTMLElement, inspector: Inspector, tooltip: string);
  2092. toHtml(): HTMLElement;
  2093. /**
  2094. * Returns the total width in pixel of this tool, 0 by default
  2095. */
  2096. getPixelWidth(): number;
  2097. /**
  2098. * Updates the icon of this tool with the given string
  2099. */
  2100. protected _updateIcon(icon: string): void;
  2101. abstract action(): void;
  2102. }
  2103. }
  2104. declare module INSPECTOR {
  2105. /**
  2106. * Removes the inspector panel
  2107. */
  2108. export class DisposeTool extends AbstractTool {
  2109. constructor(parent: HTMLElement, inspector: Inspector);
  2110. action(): void;
  2111. }
  2112. }
  2113. declare module INSPECTOR {
  2114. export class FullscreenTool extends AbstractTool {
  2115. constructor(parent: HTMLElement, inspector: Inspector);
  2116. action(): void;
  2117. }
  2118. }
  2119. declare module INSPECTOR {
  2120. export class LabelTool extends AbstractTool {
  2121. constructor(parent: HTMLElement, inspector: Inspector);
  2122. dispose(): void;
  2123. action(): void;
  2124. }
  2125. }
  2126. declare module INSPECTOR {
  2127. export class PauseScheduleTool extends AbstractTool {
  2128. constructor(parent: HTMLElement, inspector: Inspector);
  2129. action(): void;
  2130. }
  2131. }
  2132. declare module INSPECTOR {
  2133. export class PickTool extends AbstractTool {
  2134. constructor(parent: HTMLElement, inspector: Inspector);
  2135. action(): void;
  2136. }
  2137. }
  2138. declare module INSPECTOR {
  2139. export class PopupTool extends AbstractTool {
  2140. constructor(parent: HTMLElement, inspector: Inspector);
  2141. action(): void;
  2142. }
  2143. }
  2144. declare module INSPECTOR {
  2145. export class RefreshTool extends AbstractTool {
  2146. constructor(parent: HTMLElement, inspector: Inspector);
  2147. action(): void;
  2148. }
  2149. }
  2150. declare module INSPECTOR {
  2151. export class Toolbar extends BasicElement {
  2152. constructor(inspector: Inspector);
  2153. update(): void;
  2154. protected _build(): void;
  2155. /**
  2156. * Returns the total width in pixel of the tabbar,
  2157. * that corresponds to the sum of the width of each tab + toolbar width
  2158. */
  2159. getPixelWidth(): number;
  2160. }
  2161. }
  2162. declare module INSPECTOR {
  2163. export class TreeItem extends BasicElement {
  2164. children: Array<TreeItem>;
  2165. constructor(tab: Tab, obj: Adapter);
  2166. /** Returns the item ID == its adapter ID */
  2167. readonly id: string;
  2168. /** Add the given item as a child of this one */
  2169. add(child: TreeItem): void;
  2170. /**
  2171. * Returns the original adapter
  2172. */
  2173. readonly adapter: Adapter;
  2174. /**
  2175. * Function used to compare this item to another tree item.
  2176. * Returns the alphabetical sort of the adapter ID
  2177. */
  2178. compareTo(item: TreeItem): number;
  2179. /** Returns true if the given obj correspond to the adapter linked to this tree item */
  2180. correspondsTo(obj: any): boolean;
  2181. /** hide all children of this item */
  2182. fold(): void;
  2183. /** Show all children of this item */
  2184. unfold(): void;
  2185. /** Build the HTML of this item */
  2186. protected _build(): void;
  2187. /**
  2188. * Returns one HTML element (.details) containing all details of this primitive
  2189. */
  2190. getDetails(): Array<PropertyLine>;
  2191. update(): void;
  2192. /**
  2193. * Add an event listener on the item :
  2194. * - one click display details
  2195. */
  2196. protected _addEvent(): void;
  2197. /** Set this item as active (background lighter) in the tree panel */
  2198. active(b: boolean): void;
  2199. getDiv(): HTMLDivElement;
  2200. }
  2201. }
  2202. declare module INSPECTOR {
  2203. export abstract class AbstractTreeTool {
  2204. protected _elem: HTMLElement;
  2205. /** Is the tool enabled ? */
  2206. protected _on: boolean;
  2207. constructor();
  2208. toHtml(): HTMLElement;
  2209. protected _addEvents(): void;
  2210. /**
  2211. * Action launched when clicked on this element
  2212. * Should be overrided
  2213. */
  2214. protected action(): void;
  2215. }
  2216. }
  2217. declare module INSPECTOR {
  2218. /** Any object implementing this interface should
  2219. * provide methods to toggle its bounding box
  2220. */
  2221. export interface IToolBoundingBox {
  2222. isBoxVisible: () => boolean;
  2223. setBoxVisible: (b: boolean) => void;
  2224. }
  2225. /**
  2226. * Checkbox to display/hide the primitive
  2227. */
  2228. export class BoundingBox extends AbstractTreeTool {
  2229. constructor(obj: IToolBoundingBox);
  2230. protected action(): void;
  2231. }
  2232. }
  2233. declare module INSPECTOR {
  2234. export interface ICameraPOV {
  2235. setPOV: () => void;
  2236. getCurrentActiveCamera: () => string;
  2237. id: () => string;
  2238. }
  2239. /**
  2240. *
  2241. */
  2242. export class CameraPOV extends AbstractTreeTool {
  2243. constructor(camera: ICameraPOV);
  2244. protected action(): void;
  2245. }
  2246. }
  2247. declare module INSPECTOR {
  2248. /** Any object implementing this interface should
  2249. * provide methods to toggle its visibility
  2250. */
  2251. export interface IToolVisible {
  2252. isVisible: () => boolean;
  2253. setVisible: (b: boolean) => void;
  2254. }
  2255. /**
  2256. * Checkbox to display/hide the primitive
  2257. */
  2258. export class Checkbox extends AbstractTreeTool {
  2259. constructor(obj: IToolVisible);
  2260. protected action(): void;
  2261. }
  2262. }
  2263. declare module INSPECTOR {
  2264. /** Any object implementing this interface should
  2265. * provide methods to toggle a debug area
  2266. */
  2267. export interface IToolDebug {
  2268. debug: (b: boolean) => void;
  2269. }
  2270. export class DebugArea extends AbstractTreeTool {
  2271. constructor(obj: IToolDebug);
  2272. protected action(): void;
  2273. }
  2274. }
  2275. declare module INSPECTOR {
  2276. /** Any object implementing this interface should
  2277. * provide methods to retrieve its info
  2278. */
  2279. export interface IToolInfo {
  2280. getInfo: () => string;
  2281. }
  2282. /**
  2283. * Checkbox to display/hide the primitive
  2284. */
  2285. export class Info extends AbstractTreeTool {
  2286. constructor(obj: IToolInfo);
  2287. protected action(): void;
  2288. }
  2289. }
  2290. declare module INSPECTOR {
  2291. export interface ISoundInteractions {
  2292. setPlaying: (callback: Function) => void;
  2293. }
  2294. /**
  2295. *
  2296. */
  2297. export class SoundInteractions extends AbstractTreeTool {
  2298. constructor(playSound: ISoundInteractions);
  2299. protected action(): void;
  2300. }
  2301. }