babylon.inspector.module.d.ts 91 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383
  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. export class Inspector {
  94. /** The HTML document relative to this inspector (the window or the popup depending on its mode) */
  95. static DOCUMENT: HTMLDocument;
  96. /** The HTML window. In popup mode, it's the popup itself. Otherwise, it's the current tab */
  97. static WINDOW: Window;
  98. onGUILoaded: Observable<any>;
  99. static GUIObject: any;
  100. /** The inspector is created with the given engine.
  101. * If the parameter 'popup' is false, the inspector is created as a right panel on the main window.
  102. * If the parameter 'popup' is true, the inspector is created in another popup.
  103. */
  104. constructor(scene: Scene, popup?: boolean, initialTab?: number, parentElement?: Nullable<HTMLElement>, newColors?: {
  105. backgroundColor?: string;
  106. backgroundColorLighter?: string;
  107. backgroundColorLighter2?: string;
  108. backgroundColorLighter3?: string;
  109. color?: string;
  110. colorTop?: string;
  111. colorBot?: string;
  112. });
  113. readonly scene: Scene;
  114. readonly popupMode: boolean;
  115. /**
  116. * Filter the list of item present in the tree.
  117. * All item returned should have the given filter contained in the item id.
  118. */
  119. filterItem(filter: string): void;
  120. /** Display the mesh tab on the given object */
  121. displayObjectDetails(mesh: AbstractMesh): void;
  122. /** Clean the whole tree of item and rebuilds it */
  123. refresh(): void;
  124. /** Remove the inspector panel when it's built as a right panel:
  125. * remove the right panel and remove the wrapper
  126. */
  127. dispose(): void;
  128. /** Open the inspector in a new popup
  129. * Set 'firstTime' to true if there is no inspector created beforehands
  130. */
  131. openPopup(firstTime?: boolean): void;
  132. getActiveTabIndex(): number;
  133. }
  134. }
  135. declare module 'babylonjs-inspector/properties' {
  136. import { Vector2, Vector3, Color3, Color4, Quaternion, Size, Texture, RenderTargetTexture, DynamicTexture, BaseTexture, CubeTexture, HDRCubeTexture, Sound, ArcRotateCamera, FreeCamera, Scene, TransformNode, AbstractMesh, Mesh, StandardMaterial, PBRMaterial, PhysicsImpostor, ImageProcessingConfiguration, ColorCurves } from "babylonjs";
  137. export const PROPERTIES: {
  138. /** Format the given object :
  139. * If a format function exists, returns the result of this function.
  140. * If this function doesn't exists, return the object type instead
  141. */
  142. format: (obj: any) => any;
  143. 'type_not_defined': {
  144. properties: any[];
  145. format: () => string;
  146. };
  147. 'Vector2': {
  148. type: typeof Vector2;
  149. format: (vec: Vector2) => string;
  150. };
  151. 'Vector3': {
  152. type: typeof Vector3;
  153. format: (vec: Vector3) => string;
  154. };
  155. 'Color3': {
  156. type: typeof Color3;
  157. format: (color: Color3) => string;
  158. slider: {
  159. r: {
  160. min: number;
  161. max: number;
  162. step: number;
  163. };
  164. g: {
  165. min: number;
  166. max: number;
  167. step: number;
  168. };
  169. b: {
  170. min: number;
  171. max: number;
  172. step: number;
  173. };
  174. };
  175. };
  176. 'Color4': {
  177. type: typeof Color4;
  178. format: (color: Color4) => string;
  179. slider: {
  180. r: {
  181. min: number;
  182. max: number;
  183. step: number;
  184. };
  185. g: {
  186. min: number;
  187. max: number;
  188. step: number;
  189. };
  190. b: {
  191. min: number;
  192. max: number;
  193. step: number;
  194. };
  195. };
  196. };
  197. 'Quaternion': {
  198. type: typeof Quaternion;
  199. };
  200. 'Size': {
  201. type: typeof Size;
  202. format: (size: Size) => string;
  203. };
  204. 'Texture': {
  205. type: typeof Texture;
  206. format: (tex: Texture) => string;
  207. };
  208. 'RenderTargetTexture': {
  209. type: typeof RenderTargetTexture;
  210. };
  211. 'DynamicTexture': {
  212. type: typeof DynamicTexture;
  213. };
  214. 'BaseTexture': {
  215. type: typeof BaseTexture;
  216. };
  217. 'CubeTexture': {
  218. type: typeof CubeTexture;
  219. };
  220. 'HDRCubeTexture': {
  221. type: typeof HDRCubeTexture;
  222. };
  223. 'Sound': {
  224. type: typeof Sound;
  225. };
  226. 'ArcRotateCamera': {
  227. type: typeof ArcRotateCamera;
  228. slider: {
  229. alpha: {
  230. min: number;
  231. max: number;
  232. step: number;
  233. };
  234. beta: {
  235. min: number;
  236. max: number;
  237. step: number;
  238. };
  239. fov: {
  240. min: number;
  241. max: number;
  242. step: number;
  243. };
  244. };
  245. };
  246. 'FreeCamera': {
  247. type: typeof FreeCamera;
  248. slider: {
  249. fov: {
  250. min: number;
  251. max: number;
  252. step: number;
  253. };
  254. };
  255. };
  256. 'Scene': {
  257. type: typeof Scene;
  258. };
  259. 'TransformNode': {
  260. type: typeof TransformNode;
  261. format: (m: TransformNode) => string;
  262. };
  263. 'AbstractMesh': {
  264. type: typeof AbstractMesh;
  265. format: (m: AbstractMesh) => string;
  266. };
  267. 'Mesh': {
  268. type: typeof Mesh;
  269. format: (m: Mesh) => string;
  270. slider: {
  271. visibility: {
  272. min: number;
  273. max: number;
  274. step: number;
  275. };
  276. };
  277. };
  278. 'StandardMaterial': {
  279. type: typeof StandardMaterial;
  280. format: (mat: StandardMaterial) => string;
  281. slider: {
  282. alpha: {
  283. min: number;
  284. max: number;
  285. step: number;
  286. };
  287. };
  288. };
  289. 'PBRMaterial': {
  290. type: typeof PBRMaterial;
  291. slider: {
  292. alpha: {
  293. min: number;
  294. max: number;
  295. step: number;
  296. };
  297. };
  298. };
  299. 'PhysicsImpostor': {
  300. type: typeof PhysicsImpostor;
  301. };
  302. 'ImageProcessingConfiguration': {
  303. type: typeof ImageProcessingConfiguration;
  304. };
  305. 'ColorCurves': {
  306. type: typeof ColorCurves;
  307. };
  308. };
  309. }
  310. declare module 'babylonjs-inspector/properties_gui' {
  311. export type GUITyping = any;
  312. export let guiLoaded: boolean;
  313. /**
  314. * Function that add gui objects properties to the variable PROPERTIES
  315. */
  316. export function loadGUIProperties(GUI: GUITyping): void;
  317. }
  318. declare module 'babylonjs-inspector/adapters/Adapter' {
  319. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  320. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  321. export abstract class Adapter {
  322. protected _obj: any;
  323. constructor(obj: any);
  324. /** Returns the name displayed in the tree */
  325. abstract id(): string;
  326. /** Returns the type of this object - displayed in the tree */
  327. abstract type(): string;
  328. /** Returns the list of properties to be displayed for this adapter */
  329. abstract getProperties(): Array<PropertyLine>;
  330. /** Returns true if the given object correspond to this */
  331. correspondsTo(obj: any): boolean;
  332. /** Returns the adapter unique name */
  333. readonly name: string;
  334. /**
  335. * Returns the actual object used for this adapter
  336. */
  337. readonly object: any;
  338. /** Returns the list of tools available for this adapter */
  339. abstract getTools(): Array<AbstractTreeTool>;
  340. }
  341. }
  342. declare module 'babylonjs-inspector/adapters/CameraAdapter' {
  343. import { Camera } from "babylonjs";
  344. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  345. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  346. import { ICameraPOV } from "babylonjs-inspector/treetools/CameraPOV";
  347. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  348. export class CameraAdapter extends Adapter implements ICameraPOV {
  349. constructor(obj: Camera);
  350. /** Returns the name displayed in the tree */
  351. id(): string;
  352. /** Returns the type of this object - displayed in the tree */
  353. type(): string;
  354. /** Returns the list of properties to be displayed for this adapter */
  355. getProperties(): Array<PropertyLine>;
  356. getTools(): Array<AbstractTreeTool>;
  357. setPOV(): void;
  358. getCurrentActiveCamera(): string;
  359. }
  360. }
  361. declare module 'babylonjs-inspector/adapters/GUIAdapter' {
  362. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  363. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  364. import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
  365. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  366. export class GUIAdapter extends Adapter implements IToolVisible {
  367. constructor(obj: any);
  368. /** Returns the name displayed in the tree */
  369. id(): string;
  370. /** Returns the type of this object - displayed in the tree */
  371. type(): string;
  372. /** Returns the list of properties to be displayed for this adapter */
  373. getProperties(): Array<PropertyLine>;
  374. getTools(): Array<AbstractTreeTool>;
  375. setVisible(b: boolean): void;
  376. isVisible(): boolean;
  377. }
  378. }
  379. declare module 'babylonjs-inspector/adapters/LightAdapter' {
  380. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  381. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  382. import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
  383. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  384. export class LightAdapter extends Adapter implements IToolVisible {
  385. constructor(obj: BABYLON.Light);
  386. /** Returns the name displayed in the tree */
  387. id(): string;
  388. /** Returns the type of this object - displayed in the tree */
  389. type(): string;
  390. /** Returns the list of properties to be displayed for this adapter */
  391. getProperties(): Array<PropertyLine>;
  392. getTools(): Array<AbstractTreeTool>;
  393. setVisible(b: boolean): void;
  394. isVisible(): boolean;
  395. }
  396. }
  397. declare module 'babylonjs-inspector/adapters/MaterialAdapter' {
  398. import { Material } from "babylonjs";
  399. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  400. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  401. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  402. export class MaterialAdapter extends Adapter {
  403. constructor(obj: Material);
  404. /** Returns the name displayed in the tree */
  405. id(): string;
  406. /** Returns the type of this object - displayed in the tree */
  407. type(): string;
  408. /** Returns the list of properties to be displayed for this adapter */
  409. getProperties(): Array<PropertyLine>;
  410. /** No tools for a material adapter */
  411. getTools(): Array<AbstractTreeTool>;
  412. }
  413. }
  414. declare module 'babylonjs-inspector/adapters/MeshAdapter' {
  415. import { Node } from "babylonjs";
  416. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  417. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  418. import { IToolBoundingBox } from "babylonjs-inspector/treetools/BoundingBox";
  419. import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
  420. import { IToolDebug } from "babylonjs-inspector/treetools/DebugArea";
  421. import { IToolInfo } from "babylonjs-inspector/treetools/Info";
  422. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  423. export class MeshAdapter extends Adapter implements IToolVisible, IToolDebug, IToolBoundingBox, IToolInfo {
  424. constructor(mesh: Node);
  425. /** Returns the name displayed in the tree */
  426. id(): string;
  427. /** Returns the type of this object - displayed in the tree */
  428. type(): string;
  429. /** Returns the list of properties to be displayed for this adapter */
  430. getProperties(): Array<PropertyLine>;
  431. getTools(): Array<AbstractTreeTool>;
  432. setVisible(b: boolean): void;
  433. isVisible(): boolean;
  434. isBoxVisible(): boolean;
  435. setBoxVisible(b: boolean): boolean;
  436. debug(enable: boolean): void;
  437. /** Returns some information about this mesh */
  438. getInfo(): string;
  439. }
  440. }
  441. declare module 'babylonjs-inspector/adapters/PhysicsImpostorAdapter' {
  442. import { PhysicsImpostor } from "babylonjs";
  443. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  444. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  445. import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
  446. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  447. export class PhysicsImpostorAdapter extends Adapter implements IToolVisible {
  448. constructor(obj: PhysicsImpostor, viewer: any);
  449. /** Returns the name displayed in the tree */
  450. id(): string;
  451. /** Returns the type of this object - displayed in the tree */
  452. type(): string;
  453. /** Returns the list of properties to be displayed for this adapter */
  454. getProperties(): Array<PropertyLine>;
  455. getTools(): Array<AbstractTreeTool>;
  456. setVisible(b: boolean): void;
  457. isVisible(): boolean;
  458. }
  459. }
  460. declare module 'babylonjs-inspector/adapters/SoundAdapter' {
  461. import { Sound } from "babylonjs";
  462. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  463. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  464. import { ISoundInteractions } from "babylonjs-inspector/treetools/SoundInteractions";
  465. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  466. export class SoundAdapter extends Adapter implements ISoundInteractions {
  467. constructor(obj: Sound);
  468. /** Returns the name displayed in the tree */
  469. id(): string;
  470. /** Returns the type of this object - displayed in the tree */
  471. type(): string;
  472. /** Returns the list of properties to be displayed for this adapter */
  473. getProperties(): Array<PropertyLine>;
  474. getTools(): Array<AbstractTreeTool>;
  475. setPlaying(callback: Function): void;
  476. }
  477. }
  478. declare module 'babylonjs-inspector/adapters/TextureAdapter' {
  479. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  480. import { BaseTexture } from "babylonjs";
  481. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  482. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  483. export class TextureAdapter extends Adapter {
  484. constructor(obj: BaseTexture);
  485. /** Returns the name displayed in the tree */
  486. id(): string;
  487. /** Returns the type of this object - displayed in the tree */
  488. type(): string;
  489. /** Returns the list of properties to be displayed for this adapter */
  490. getProperties(): Array<PropertyLine>;
  491. getTools(): Array<AbstractTreeTool>;
  492. }
  493. }
  494. declare module 'babylonjs-inspector/details/DetailPanel' {
  495. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  496. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  497. export interface SortDirection {
  498. [property: string]: number;
  499. }
  500. export class DetailPanel extends BasicElement {
  501. constructor(dr?: Array<PropertyLine>);
  502. details: Array<PropertyLine>;
  503. protected _build(): void;
  504. /** Updates the HTML of the detail panel */
  505. update(_items?: Array<PropertyLine>): void;
  506. /** Search an element by name */
  507. searchByName(searchName: string): void;
  508. /**
  509. * Removes all data in the detail panel but keep the header row
  510. */
  511. clean(): void;
  512. /**
  513. * Clean the rows only
  514. */
  515. cleanRow(): void;
  516. /** Overrides basicelement.dispose */
  517. dispose(): void;
  518. }
  519. }
  520. declare module 'babylonjs-inspector/details/Property' {
  521. /**
  522. * A property is a link between a data (string) and an object.
  523. */
  524. export class Property {
  525. constructor(prop: string, obj: any, parentObj?: any);
  526. readonly name: string;
  527. value: any;
  528. readonly type: string;
  529. obj: any;
  530. }
  531. }
  532. declare module 'babylonjs-inspector/details/PropertyLine' {
  533. import { Nullable } from "babylonjs";
  534. import { Property } from "babylonjs-inspector/details/Property";
  535. export class PropertyFormatter {
  536. /**
  537. * Format the value of the given property of the given object.
  538. */
  539. static format(obj: any, prop: string): string;
  540. }
  541. /**
  542. * A property line represents a line in the detail panel. This line is composed of :
  543. * - a name (the property name)
  544. * - a value if this property is of a type 'simple' : string, number, boolean, color, texture
  545. * - the type of the value if this property is of a complex type (Vector2, Size, ...)
  546. * - a ID if defined (otherwise an empty string is displayed)
  547. * The original object is sent to the value object who will update it at will.
  548. *
  549. * A property line can contain OTHER property line objects in the case of a complex type.
  550. * If this instance has no link to other instances, its type is ALWAYS a simple one (see above).
  551. *
  552. */
  553. export class PropertyLine {
  554. constructor(prop: Property, parent?: Nullable<PropertyLine>, level?: number);
  555. validateInput(value: any, forceupdate?: boolean): void;
  556. /** Retrieve the correct object from its parent.
  557. * If no parent exists, returns the property value.
  558. * This method is used at each update in case the property object is removed from the original object
  559. * (example : mesh.position = new Vector3 ; the original vector3 object is deleted from the mesh).
  560. */
  561. updateObject(): any;
  562. readonly name: string;
  563. readonly value: any;
  564. readonly type: string;
  565. /** Delete properly this property line.
  566. * Removes itself from the scheduler.
  567. * Dispose all viewer element (color, texture...)
  568. */
  569. dispose(): void;
  570. /**
  571. * Update the property division with the new property value.
  572. * If this property is complex, update its child, otherwise update its text content
  573. */
  574. update(): void;
  575. toHtml(): HTMLElement;
  576. closeDetails(): void;
  577. }
  578. }
  579. declare module 'babylonjs-inspector/gui/BasicElement' {
  580. /**
  581. * Represents a html div element.
  582. * The div is built when an instance of BasicElement is created.
  583. */
  584. export abstract class BasicElement {
  585. protected _div: HTMLDivElement;
  586. constructor();
  587. /**
  588. * Returns the div element
  589. */
  590. toHtml(): HTMLDivElement;
  591. /**
  592. * Build the html element
  593. */
  594. protected _build(): void;
  595. abstract update(data?: any): void;
  596. /** Default dispose method if needed */
  597. dispose(): void;
  598. }
  599. }
  600. declare module 'babylonjs-inspector/gui/ColorElement' {
  601. import { Color3, Color4 } from "babylonjs";
  602. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  603. /**
  604. * Display a very small div corresponding to the given color
  605. */
  606. export class ColorElement extends BasicElement {
  607. constructor(color: Color4 | Color3);
  608. update(color?: Color4 | Color3): void;
  609. }
  610. }
  611. declare module 'babylonjs-inspector/gui/ColorPickerElement' {
  612. import { Color3, Color4 } from "babylonjs";
  613. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  614. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  615. /**
  616. * Represents a html div element.
  617. * The div is built when an instance of BasicElement is created.
  618. */
  619. export class ColorPickerElement extends BasicElement {
  620. protected _input: HTMLInputElement;
  621. constructor(color: Color4 | Color3, propertyLine: PropertyLine);
  622. update(color?: Color4 | Color3): void;
  623. }
  624. }
  625. declare module 'babylonjs-inspector/gui/CubeTextureElement' {
  626. import { Mesh, Scene, Texture } from "babylonjs";
  627. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  628. /**
  629. * Display a very small div. A new canvas is created, with a new js scene, containing only the
  630. * cube texture in a cube
  631. */
  632. export class CubeTextureElement extends BasicElement {
  633. protected _scene: Scene;
  634. protected _cube: Mesh;
  635. protected _textureUrl: string;
  636. /** The texture given as a parameter should be cube. */
  637. constructor(tex: Texture);
  638. update(tex?: Texture): void;
  639. /** Creates the box */
  640. protected _populateScene(): void;
  641. /** Removes properly the babylon engine */
  642. dispose(): void;
  643. }
  644. }
  645. declare module 'babylonjs-inspector/gui/HDRCubeTextureElement' {
  646. import { Texture } from "babylonjs";
  647. import { CubeTextureElement } from "babylonjs-inspector/gui/CubeTextureElement";
  648. /**
  649. * Display a very small div. A new canvas is created, with a new js scene, containing only the
  650. * cube texture in a cube
  651. */
  652. export class HDRCubeTextureElement extends CubeTextureElement {
  653. /** The texture given as a parameter should be cube. */
  654. constructor(tex: Texture);
  655. /** Creates the box */
  656. protected _populateScene(): void;
  657. }
  658. }
  659. declare module 'babylonjs-inspector/gui/SearchBar' {
  660. import { DetailPanel } from "babylonjs-inspector/details/DetailPanel";
  661. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  662. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  663. /**
  664. * A search bar can be used to filter elements in the tree panel.
  665. * At each keypress on the input, the treepanel will be filtered.
  666. */
  667. export class SearchBar extends BasicElement {
  668. constructor(tab: PropertyTab);
  669. /** Delete all characters typped in the input element */
  670. reset(): void;
  671. update(): void;
  672. }
  673. export class SearchBarDetails extends BasicElement {
  674. constructor(tab: DetailPanel);
  675. /** Delete all characters typped in the input element */
  676. reset(): void;
  677. update(): void;
  678. }
  679. }
  680. declare module 'babylonjs-inspector/gui/TextureElement' {
  681. import { Texture } from "babylonjs";
  682. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  683. /**
  684. * Display a very small div corresponding to the given texture. On mouse over, display the full image
  685. */
  686. export class TextureElement extends BasicElement {
  687. constructor(tex: Texture);
  688. update(tex?: Texture): void;
  689. }
  690. }
  691. declare module 'babylonjs-inspector/gui/Tooltip' {
  692. import { Nullable } from "babylonjs";
  693. /**
  694. * Creates a tooltip for the parent of the given html element
  695. */
  696. export class Tooltip {
  697. constructor(elem: HTMLElement, tip: string, attachTo?: Nullable<HTMLElement>);
  698. }
  699. }
  700. declare module 'babylonjs-inspector/helpers/Helpers' {
  701. import { Nullable } from "babylonjs";
  702. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  703. export class Helpers {
  704. /**
  705. * Returns the type of the given object. First
  706. * uses getClassName. If nothing is returned, used the type of the constructor
  707. */
  708. static GET_TYPE(obj: any): string;
  709. /**
  710. * Returns true if the user browser is edge.
  711. */
  712. static IsBrowserEdge(): boolean;
  713. /**
  714. * Returns true if the user browser is IE.
  715. */
  716. static IsBrowserIE(): boolean;
  717. /** Send the event which name is given in parameter to the window */
  718. static SEND_EVENT(eventName: string): void;
  719. /** Returns the given number with 2 decimal number max if a decimal part exists */
  720. static Trunc(nb: number): number;
  721. /**
  722. * Useful function used to create a div
  723. */
  724. static CreateDiv(className?: Nullable<string>, parent?: HTMLElement, tooltip?: string): HTMLDivElement;
  725. /**
  726. * Useful function used to create a input
  727. */
  728. static CreateInput(className?: string, parent?: HTMLElement, tooltip?: string): HTMLInputElement;
  729. static CreateElement(element: string, className?: Nullable<string>, parent?: HTMLElement, tooltip?: string): HTMLElement;
  730. /**
  731. * Removes all children of the given div.
  732. */
  733. static CleanDiv(div: HTMLElement): void;
  734. /**
  735. * 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)
  736. */
  737. static Css(elem: HTMLElement, cssAttribute: string): string;
  738. static LoadScript(): void;
  739. static IsSystemName(name: string): boolean;
  740. /**
  741. * Return an array of PropertyLine for an obj
  742. * @param obj
  743. */
  744. static GetAllLinesProperties(obj: any): Array<PropertyLine>;
  745. /**
  746. * Returns an array of string corresponding to tjhe list of properties of the object to be displayed
  747. * @param obj
  748. */
  749. static GetAllLinesPropertiesAsString(obj: any, dontTakeThis?: Array<string>): Array<string>;
  750. static Capitalize(str: string): string;
  751. }
  752. }
  753. declare module 'babylonjs-inspector/scheduler/Scheduler' {
  754. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  755. export class Scheduler {
  756. /** Is this scheduler in pause ? */
  757. pause: boolean;
  758. /** All properties are refreshed every 250ms */
  759. static REFRESH_TIME: number;
  760. constructor();
  761. static getInstance(): Scheduler;
  762. /** Add a property line to be updated every X ms */
  763. add(prop: PropertyLine): void;
  764. /** Removes the given property from the list of properties to update */
  765. remove(prop: PropertyLine): void;
  766. dispose(): void;
  767. }
  768. }
  769. declare module 'babylonjs-inspector/tabs/CameraTab' {
  770. import { Inspector } from "babylonjs-inspector/Inspector";
  771. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  772. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  773. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  774. export class CameraTab extends PropertyTab {
  775. constructor(tabbar: TabBar, inspector: Inspector);
  776. protected _getTree(): Array<TreeItem>;
  777. }
  778. }
  779. declare module 'babylonjs-inspector/tabs/ConsoleTab' {
  780. import { Inspector } from "babylonjs-inspector/Inspector";
  781. import { Tab } from "babylonjs-inspector/tabs/Tab";
  782. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  783. /**
  784. * The console tab will have two features :
  785. * - hook all console.log call and display them in this panel (and in the browser console as well)
  786. * - display all Babylon logs (called with Tools.Log...)
  787. */
  788. export class ConsoleTab extends Tab {
  789. constructor(tabbar: TabBar, insp: Inspector);
  790. /** Overrides super.dispose */
  791. dispose(): void;
  792. active(b: boolean): void;
  793. }
  794. }
  795. declare module 'babylonjs-inspector/tabs/GLTFTab' {
  796. import { Inspector } from "babylonjs-inspector/Inspector";
  797. import { Tab } from "babylonjs-inspector/tabs/Tab";
  798. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  799. export class GLTFTab extends Tab {
  800. static readonly IsSupported: boolean;
  801. /** @hidden */
  802. static _Initialize(): void;
  803. constructor(tabbar: TabBar, inspector: Inspector);
  804. dispose(): void;
  805. }
  806. }
  807. declare module 'babylonjs-inspector/tabs/GUITab' {
  808. import { Inspector } from "babylonjs-inspector/Inspector";
  809. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  810. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  811. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  812. export class GUITab extends PropertyTab {
  813. constructor(tabbar: TabBar, inspector: Inspector);
  814. protected _getTree(): Array<TreeItem>;
  815. }
  816. }
  817. declare module 'babylonjs-inspector/tabs/LightTab' {
  818. import { Inspector } from "babylonjs-inspector/Inspector";
  819. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  820. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  821. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  822. export class LightTab extends PropertyTab {
  823. constructor(tabbar: TabBar, inspector: Inspector);
  824. protected _getTree(): Array<TreeItem>;
  825. }
  826. }
  827. declare module 'babylonjs-inspector/tabs/MaterialTab' {
  828. import { Inspector } from "babylonjs-inspector/Inspector";
  829. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  830. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  831. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  832. export class MaterialTab extends PropertyTab {
  833. constructor(tabbar: TabBar, inspector: Inspector);
  834. protected _getTree(): Array<TreeItem>;
  835. }
  836. }
  837. declare module 'babylonjs-inspector/tabs/MeshTab' {
  838. import { Inspector } from "babylonjs-inspector/Inspector";
  839. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  840. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  841. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  842. export class MeshTab extends PropertyTab {
  843. constructor(tabbar: TabBar, inspector: Inspector);
  844. protected _getTree(): Array<TreeItem>;
  845. }
  846. }
  847. declare module 'babylonjs-inspector/tabs/PhysicsTab' {
  848. import { Inspector } from "babylonjs-inspector/Inspector";
  849. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  850. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  851. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  852. export class PhysicsTab extends PropertyTab {
  853. viewer: any;
  854. constructor(tabbar: TabBar, inspector: Inspector);
  855. protected _getTree(): Array<TreeItem>;
  856. }
  857. }
  858. declare module 'babylonjs-inspector/tabs/PropertyTab' {
  859. import { Nullable } from "babylonjs";
  860. import { DetailPanel } from "babylonjs-inspector/details/DetailPanel";
  861. import { SearchBar } from "babylonjs-inspector/gui/SearchBar";
  862. import { Inspector } from "babylonjs-inspector/Inspector";
  863. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  864. import { Tab } from "babylonjs-inspector/tabs/Tab";
  865. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  866. /**
  867. * A Property tab can creates two panels:
  868. * a tree panel and a detail panel,
  869. * in which properties will be displayed.
  870. * Both panels are separated by a resize bar
  871. */
  872. export abstract class PropertyTab extends Tab {
  873. protected _inspector: Inspector;
  874. /** The panel containing a list of items */
  875. protected _treePanel: HTMLDivElement;
  876. /** The panel containing a list if properties corresponding to an item */
  877. protected _detailsPanel: DetailPanel;
  878. protected _treeItems: Array<TreeItem>;
  879. protected _searchBar: SearchBar;
  880. constructor(tabbar: TabBar, name: string, insp: Inspector);
  881. /** Overrides dispose */
  882. dispose(): void;
  883. update(_items?: Array<TreeItem>): void;
  884. /** Display the details of the given item */
  885. displayDetails(item: TreeItem): void;
  886. /** Select an item in the tree */
  887. select(item: TreeItem): void;
  888. /** Set the given item as active in the tree */
  889. activateNode(item: TreeItem): void;
  890. /** Returns the treeitem corersponding to the given obj, null if not found */
  891. getItemFor(_obj: any): Nullable<TreeItem>;
  892. filter(filter: string): void;
  893. /** Builds the tree panel */
  894. protected abstract _getTree(): Array<TreeItem>;
  895. }
  896. }
  897. declare module 'babylonjs-inspector/tabs/SceneTab' {
  898. import { Inspector } from "babylonjs-inspector/Inspector";
  899. import { Tab } from "babylonjs-inspector/tabs/Tab";
  900. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  901. export class SceneTab extends Tab {
  902. constructor(tabbar: TabBar, insp: Inspector);
  903. /** Overrides super.dispose */
  904. dispose(): void;
  905. }
  906. }
  907. declare module 'babylonjs-inspector/tabs/SoundTab' {
  908. import { Inspector } from "babylonjs-inspector/Inspector";
  909. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  910. import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
  911. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  912. export class SoundTab extends PropertyTab {
  913. constructor(tabbar: TabBar, inspector: Inspector);
  914. protected _getTree(): Array<TreeItem>;
  915. }
  916. }
  917. declare module 'babylonjs-inspector/tabs/StatsTab' {
  918. import { Inspector } from "babylonjs-inspector/Inspector";
  919. import { Tab } from "babylonjs-inspector/tabs/Tab";
  920. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  921. export class StatsTab extends Tab {
  922. constructor(tabbar: TabBar, insp: Inspector);
  923. dispose(): void;
  924. active(b: boolean): void;
  925. }
  926. }
  927. declare module 'babylonjs-inspector/tabs/Tab' {
  928. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  929. import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
  930. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  931. export abstract class Tab extends BasicElement {
  932. protected _tabbar: TabBar;
  933. name: string;
  934. protected _isActive: boolean;
  935. protected _panel: HTMLDivElement;
  936. constructor(tabbar: TabBar, name: string);
  937. /** True if the tab is active, false otherwise */
  938. isActive(): boolean;
  939. protected _build(): void;
  940. /** Set this tab as active or not, depending on the current state */
  941. active(b: boolean): void;
  942. update(): void;
  943. /** Creates the tab panel for this tab. */
  944. getPanel(): HTMLElement;
  945. /** Add this in the propertytab with the searchbar */
  946. filter(str: string): void;
  947. /** Dispose properly this tab */
  948. abstract dispose(): void;
  949. /** Select an item in the tree */
  950. select(item: TreeItem): void;
  951. /**
  952. * Returns the total width in pixel of this tab, 0 by default
  953. */
  954. getPixelWidth(): number;
  955. }
  956. }
  957. declare module 'babylonjs-inspector/tabs/TabBar' {
  958. import { AbstractMesh, Nullable } from "babylonjs";
  959. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  960. import { Inspector } from "babylonjs-inspector/Inspector";
  961. import { Tab } from "babylonjs-inspector/tabs/Tab";
  962. /**
  963. * A tab bar will contains each view the inspector can have : Canvas2D, Meshes...
  964. * The default active tab is the first one of the list.
  965. */
  966. export class TabBar extends BasicElement {
  967. constructor(inspector: Inspector, initialTab?: number);
  968. update(): void;
  969. protected _build(): void;
  970. /** Dispose the current tab, set the given tab as active, and refresh the treeview */
  971. switchTab(tab: Tab): void;
  972. /** Display the mesh tab.
  973. * If a parameter is given, the given mesh details are displayed
  974. */
  975. switchMeshTab(mesh?: AbstractMesh): void;
  976. /** Returns the active tab */
  977. getActiveTab(): Nullable<Tab>;
  978. getActiveTabIndex(): number;
  979. readonly inspector: Inspector;
  980. /**
  981. * Returns the total width in pixel of the tabbar,
  982. * that corresponds to the sum of the width of each visible tab + toolbar width
  983. */
  984. getPixelWidth(): number;
  985. /** Display the remaining icon or not depending on the tabbar width.
  986. * This function should be called each time the inspector width is updated
  987. */
  988. updateWidth(): void;
  989. }
  990. }
  991. declare module 'babylonjs-inspector/tabs/TextureTab' {
  992. import { TextureAdapter } from "babylonjs-inspector/adapters/TextureAdapter";
  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. static DDSPreview: DDSPreview;
  999. /** The panel containing a list of items */
  1000. protected _treePanel: HTMLElement;
  1001. protected _treeItems: Array<TreeItem>;
  1002. constructor(tabbar: TabBar, inspector: Inspector);
  1003. dispose(): void;
  1004. update(_items?: Array<TreeItem>): void;
  1005. /** Display the details of the given item */
  1006. displayDetails(item: TreeItem): void;
  1007. /** Select an item in the tree */
  1008. select(item: TreeItem): void;
  1009. /** Set the given item as active in the tree */
  1010. activateNode(item: TreeItem): void;
  1011. }
  1012. class DDSPreview {
  1013. constructor(AdapterItem: TextureAdapter);
  1014. insertPreview(AdapterItem: TextureAdapter): void;
  1015. }
  1016. export {};
  1017. }
  1018. declare module 'babylonjs-inspector/tabs/ToolsTab' {
  1019. import { Inspector } from "babylonjs-inspector/Inspector";
  1020. import { Tab } from "babylonjs-inspector/tabs/Tab";
  1021. import { TabBar } from "babylonjs-inspector/tabs/TabBar";
  1022. export class ToolsTab extends Tab {
  1023. constructor(tabbar: TabBar, insp: Inspector);
  1024. dispose(): void;
  1025. }
  1026. }
  1027. declare module 'babylonjs-inspector/tools/AbstractTool' {
  1028. import { Inspector } from "babylonjs-inspector/Inspector";
  1029. export abstract class AbstractTool {
  1030. protected _inspector: Inspector;
  1031. constructor(iconSet: string, icon: string, parent: HTMLElement, inspector: Inspector, tooltip: string);
  1032. toHtml(): HTMLElement;
  1033. /**
  1034. * Returns the total width in pixel of this tool, 0 by default
  1035. */
  1036. getPixelWidth(): number;
  1037. /**
  1038. * Updates the icon of this tool with the given string
  1039. */
  1040. protected _updateIcon(icon: string): void;
  1041. abstract action(): void;
  1042. }
  1043. }
  1044. declare module 'babylonjs-inspector/tools/DisposeTool' {
  1045. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1046. import { Inspector } from "babylonjs-inspector/Inspector";
  1047. /**
  1048. * Removes the inspector panel
  1049. */
  1050. export class DisposeTool extends AbstractTool {
  1051. constructor(parent: HTMLElement, inspector: Inspector);
  1052. action(): void;
  1053. }
  1054. }
  1055. declare module 'babylonjs-inspector/tools/FullscreenTool' {
  1056. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1057. import { Inspector } from "babylonjs-inspector/Inspector";
  1058. export class FullscreenTool extends AbstractTool {
  1059. constructor(parent: HTMLElement, inspector: Inspector);
  1060. action(): void;
  1061. }
  1062. }
  1063. declare module 'babylonjs-inspector/tools/LabelTool' {
  1064. import { Inspector } from "babylonjs-inspector/Inspector";
  1065. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1066. export class LabelTool extends AbstractTool {
  1067. constructor(parent: HTMLElement, inspector: Inspector);
  1068. dispose(): void;
  1069. action(): void;
  1070. }
  1071. }
  1072. declare module 'babylonjs-inspector/tools/PauseScheduleTool' {
  1073. import { Inspector } from "babylonjs-inspector/Inspector";
  1074. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1075. export class PauseScheduleTool extends AbstractTool {
  1076. constructor(parent: HTMLElement, inspector: Inspector);
  1077. action(): void;
  1078. }
  1079. }
  1080. declare module 'babylonjs-inspector/tools/PickTool' {
  1081. import { Inspector } from "babylonjs-inspector/Inspector";
  1082. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1083. export class PickTool extends AbstractTool {
  1084. constructor(parent: HTMLElement, inspector: Inspector);
  1085. action(): void;
  1086. }
  1087. }
  1088. declare module 'babylonjs-inspector/tools/PopupTool' {
  1089. import { Inspector } from "babylonjs-inspector/Inspector";
  1090. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1091. export class PopupTool extends AbstractTool {
  1092. constructor(parent: HTMLElement, inspector: Inspector);
  1093. action(): void;
  1094. }
  1095. }
  1096. declare module 'babylonjs-inspector/tools/RefreshTool' {
  1097. import { Inspector } from "babylonjs-inspector/Inspector";
  1098. import { AbstractTool } from "babylonjs-inspector/tools/AbstractTool";
  1099. export class RefreshTool extends AbstractTool {
  1100. constructor(parent: HTMLElement, inspector: Inspector);
  1101. action(): void;
  1102. }
  1103. }
  1104. declare module 'babylonjs-inspector/tools/Toolbar' {
  1105. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  1106. import { Inspector } from "babylonjs-inspector/Inspector";
  1107. export class Toolbar extends BasicElement {
  1108. constructor(inspector: Inspector);
  1109. update(): void;
  1110. protected _build(): void;
  1111. /**
  1112. * Returns the total width in pixel of the tabbar,
  1113. * that corresponds to the sum of the width of each tab + toolbar width
  1114. */
  1115. getPixelWidth(): number;
  1116. }
  1117. }
  1118. declare module 'babylonjs-inspector/tree/TreeItem' {
  1119. import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
  1120. import { Tab } from "babylonjs-inspector/tabs/Tab";
  1121. import { Adapter } from "babylonjs-inspector/adapters/Adapter";
  1122. import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
  1123. export class TreeItem extends BasicElement {
  1124. children: Array<TreeItem>;
  1125. constructor(tab: Tab, obj: Adapter);
  1126. /** Returns the item ID == its adapter ID */
  1127. readonly id: string;
  1128. /** Add the given item as a child of this one */
  1129. add(child: TreeItem): void;
  1130. /**
  1131. * Returns the original adapter
  1132. */
  1133. readonly adapter: Adapter;
  1134. /**
  1135. * Function used to compare this item to another tree item.
  1136. * Returns the alphabetical sort of the adapter ID
  1137. */
  1138. compareTo(item: TreeItem): number;
  1139. /** Returns true if the given obj correspond to the adapter linked to this tree item */
  1140. correspondsTo(obj: any): boolean;
  1141. /** hide all children of this item */
  1142. fold(): void;
  1143. /** Show all children of this item */
  1144. unfold(): void;
  1145. /** Build the HTML of this item */
  1146. protected _build(): void;
  1147. /**
  1148. * Returns one HTML element (.details) containing all details of this primitive
  1149. */
  1150. getDetails(): Array<PropertyLine>;
  1151. update(): void;
  1152. /**
  1153. * Add an event listener on the item :
  1154. * - one click display details
  1155. */
  1156. protected _addEvent(): void;
  1157. /** Set this item as active (background lighter) in the tree panel */
  1158. active(b: boolean): void;
  1159. getDiv(): HTMLDivElement;
  1160. }
  1161. }
  1162. declare module 'babylonjs-inspector/treetools/AbstractTreeTool' {
  1163. export abstract class AbstractTreeTool {
  1164. protected _elem: HTMLElement;
  1165. /** Is the tool enabled ? */
  1166. protected _on: boolean;
  1167. constructor();
  1168. toHtml(): HTMLElement;
  1169. protected _addEvents(): void;
  1170. /**
  1171. * Action launched when clicked on this element
  1172. * Should be overrided
  1173. */
  1174. protected action(): void;
  1175. }
  1176. }
  1177. declare module 'babylonjs-inspector/treetools/BoundingBox' {
  1178. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1179. /** Any object implementing this interface should
  1180. * provide methods to toggle its bounding box
  1181. */
  1182. export interface IToolBoundingBox {
  1183. isBoxVisible: () => boolean;
  1184. setBoxVisible: (b: boolean) => void;
  1185. }
  1186. /**
  1187. * Checkbox to display/hide the primitive
  1188. */
  1189. export class BoundingBox extends AbstractTreeTool {
  1190. constructor(obj: IToolBoundingBox);
  1191. protected action(): void;
  1192. }
  1193. }
  1194. declare module 'babylonjs-inspector/treetools/CameraPOV' {
  1195. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1196. export interface ICameraPOV {
  1197. setPOV: () => void;
  1198. getCurrentActiveCamera: () => string;
  1199. id: () => string;
  1200. }
  1201. /**
  1202. *
  1203. */
  1204. export class CameraPOV extends AbstractTreeTool {
  1205. constructor(camera: ICameraPOV);
  1206. protected action(): void;
  1207. }
  1208. }
  1209. declare module 'babylonjs-inspector/treetools/Checkbox' {
  1210. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1211. /** Any object implementing this interface should
  1212. * provide methods to toggle its visibility
  1213. */
  1214. export interface IToolVisible {
  1215. isVisible: () => boolean;
  1216. setVisible: (b: boolean) => void;
  1217. }
  1218. /**
  1219. * Checkbox to display/hide the primitive
  1220. */
  1221. export class Checkbox extends AbstractTreeTool {
  1222. constructor(obj: IToolVisible);
  1223. protected action(): void;
  1224. }
  1225. }
  1226. declare module 'babylonjs-inspector/treetools/DebugArea' {
  1227. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1228. /** Any object implementing this interface should
  1229. * provide methods to toggle a debug area
  1230. */
  1231. export interface IToolDebug {
  1232. debug: (b: boolean) => void;
  1233. }
  1234. export class DebugArea extends AbstractTreeTool {
  1235. constructor(obj: IToolDebug);
  1236. protected action(): void;
  1237. }
  1238. }
  1239. declare module 'babylonjs-inspector/treetools/Info' {
  1240. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1241. /** Any object implementing this interface should
  1242. * provide methods to retrieve its info
  1243. */
  1244. export interface IToolInfo {
  1245. getInfo: () => string;
  1246. }
  1247. /**
  1248. * Checkbox to display/hide the primitive
  1249. */
  1250. export class Info extends AbstractTreeTool {
  1251. constructor(obj: IToolInfo);
  1252. protected action(): void;
  1253. }
  1254. }
  1255. declare module 'babylonjs-inspector/treetools/SoundInteractions' {
  1256. import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
  1257. export interface ISoundInteractions {
  1258. setPlaying: (callback: Function) => void;
  1259. }
  1260. /**
  1261. *
  1262. */
  1263. export class SoundInteractions extends AbstractTreeTool {
  1264. constructor(playSound: ISoundInteractions);
  1265. protected action(): void;
  1266. }
  1267. }
  1268. /*BabylonJS Inspector*/
  1269. // Dependencies for this module:
  1270. // ../../../../Tools/Gulp/babylonjs
  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. }
  1287. declare module INSPECTOR {
  1288. }
  1289. declare module INSPECTOR {
  1290. }
  1291. declare module INSPECTOR {
  1292. export class Inspector {
  1293. /** The HTML document relative to this inspector (the window or the popup depending on its mode) */
  1294. static DOCUMENT: HTMLDocument;
  1295. /** The HTML window. In popup mode, it's the popup itself. Otherwise, it's the current tab */
  1296. static WINDOW: Window;
  1297. onGUILoaded: BABYLON.Observable<any>;
  1298. static GUIObject: any;
  1299. /** The inspector is created with the given engine.
  1300. * If the parameter 'popup' is false, the inspector is created as a right panel on the main window.
  1301. * If the parameter 'popup' is true, the inspector is created in another popup.
  1302. */
  1303. constructor(scene: BABYLON.Scene, popup?: boolean, initialTab?: number, parentElement?: BABYLON.Nullable<HTMLElement>, newColors?: {
  1304. backgroundColor?: string;
  1305. backgroundColorLighter?: string;
  1306. backgroundColorLighter2?: string;
  1307. backgroundColorLighter3?: string;
  1308. color?: string;
  1309. colorTop?: string;
  1310. colorBot?: string;
  1311. });
  1312. readonly scene: BABYLON.Scene;
  1313. readonly popupMode: boolean;
  1314. /**
  1315. * Filter the list of item present in the tree.
  1316. * All item returned should have the given filter contained in the item id.
  1317. */
  1318. filterItem(filter: string): void;
  1319. /** Display the mesh tab on the given object */
  1320. displayObjectDetails(mesh: BABYLON.AbstractMesh): void;
  1321. /** Clean the whole tree of item and rebuilds it */
  1322. refresh(): void;
  1323. /** Remove the inspector panel when it's built as a right panel:
  1324. * remove the right panel and remove the wrapper
  1325. */
  1326. dispose(): void;
  1327. /** Open the inspector in a new popup
  1328. * Set 'firstTime' to true if there is no inspector created beforehands
  1329. */
  1330. openPopup(firstTime?: boolean): void;
  1331. getActiveTabIndex(): number;
  1332. }
  1333. }
  1334. declare module INSPECTOR {
  1335. export const PROPERTIES: {
  1336. /** Format the given object :
  1337. * If a format function exists, returns the result of this function.
  1338. * If this function doesn't exists, return the object type instead
  1339. */
  1340. format: (obj: any) => any;
  1341. 'type_not_defined': {
  1342. properties: any[];
  1343. format: () => string;
  1344. };
  1345. 'Vector2': {
  1346. type: typeof BABYLON.Vector2;
  1347. format: (vec: BABYLON.Vector2) => string;
  1348. };
  1349. 'Vector3': {
  1350. type: typeof BABYLON.Vector3;
  1351. format: (vec: BABYLON.Vector3) => string;
  1352. };
  1353. 'Color3': {
  1354. type: typeof BABYLON.Color3;
  1355. format: (color: BABYLON.Color3) => string;
  1356. slider: {
  1357. r: {
  1358. min: number;
  1359. max: number;
  1360. step: number;
  1361. };
  1362. g: {
  1363. min: number;
  1364. max: number;
  1365. step: number;
  1366. };
  1367. b: {
  1368. min: number;
  1369. max: number;
  1370. step: number;
  1371. };
  1372. };
  1373. };
  1374. 'Color4': {
  1375. type: typeof BABYLON.Color4;
  1376. format: (color: BABYLON.Color4) => string;
  1377. slider: {
  1378. r: {
  1379. min: number;
  1380. max: number;
  1381. step: number;
  1382. };
  1383. g: {
  1384. min: number;
  1385. max: number;
  1386. step: number;
  1387. };
  1388. b: {
  1389. min: number;
  1390. max: number;
  1391. step: number;
  1392. };
  1393. };
  1394. };
  1395. 'Quaternion': {
  1396. type: typeof BABYLON.Quaternion;
  1397. };
  1398. 'Size': {
  1399. type: typeof BABYLON.Size;
  1400. format: (size: BABYLON.Size) => string;
  1401. };
  1402. 'Texture': {
  1403. type: typeof BABYLON.Texture;
  1404. format: (tex: BABYLON.Texture) => string;
  1405. };
  1406. 'RenderTargetTexture': {
  1407. type: typeof BABYLON.RenderTargetTexture;
  1408. };
  1409. 'DynamicTexture': {
  1410. type: typeof BABYLON.DynamicTexture;
  1411. };
  1412. 'BaseTexture': {
  1413. type: typeof BABYLON.BaseTexture;
  1414. };
  1415. 'CubeTexture': {
  1416. type: typeof BABYLON.CubeTexture;
  1417. };
  1418. 'HDRCubeTexture': {
  1419. type: typeof BABYLON.HDRCubeTexture;
  1420. };
  1421. 'Sound': {
  1422. type: typeof BABYLON.Sound;
  1423. };
  1424. 'ArcRotateCamera': {
  1425. type: typeof BABYLON.ArcRotateCamera;
  1426. slider: {
  1427. alpha: {
  1428. min: number;
  1429. max: number;
  1430. step: number;
  1431. };
  1432. beta: {
  1433. min: number;
  1434. max: number;
  1435. step: number;
  1436. };
  1437. fov: {
  1438. min: number;
  1439. max: number;
  1440. step: number;
  1441. };
  1442. };
  1443. };
  1444. 'FreeCamera': {
  1445. type: typeof BABYLON.FreeCamera;
  1446. slider: {
  1447. fov: {
  1448. min: number;
  1449. max: number;
  1450. step: number;
  1451. };
  1452. };
  1453. };
  1454. 'Scene': {
  1455. type: typeof BABYLON.Scene;
  1456. };
  1457. 'TransformNode': {
  1458. type: typeof BABYLON.TransformNode;
  1459. format: (m: BABYLON.TransformNode) => string;
  1460. };
  1461. 'AbstractMesh': {
  1462. type: typeof BABYLON.AbstractMesh;
  1463. format: (m: BABYLON.AbstractMesh) => string;
  1464. };
  1465. 'Mesh': {
  1466. type: typeof BABYLON.Mesh;
  1467. format: (m: BABYLON.Mesh) => string;
  1468. slider: {
  1469. visibility: {
  1470. min: number;
  1471. max: number;
  1472. step: number;
  1473. };
  1474. };
  1475. };
  1476. 'StandardMaterial': {
  1477. type: typeof BABYLON.StandardMaterial;
  1478. format: (mat: BABYLON.StandardMaterial) => string;
  1479. slider: {
  1480. alpha: {
  1481. min: number;
  1482. max: number;
  1483. step: number;
  1484. };
  1485. };
  1486. };
  1487. 'PBRMaterial': {
  1488. type: typeof BABYLON.PBRMaterial;
  1489. slider: {
  1490. alpha: {
  1491. min: number;
  1492. max: number;
  1493. step: number;
  1494. };
  1495. };
  1496. };
  1497. 'PhysicsImpostor': {
  1498. type: typeof BABYLON.PhysicsImpostor;
  1499. };
  1500. 'ImageProcessingConfiguration': {
  1501. type: typeof BABYLON.ImageProcessingConfiguration;
  1502. };
  1503. 'ColorCurves': {
  1504. type: typeof BABYLON.ColorCurves;
  1505. };
  1506. };
  1507. }
  1508. declare module INSPECTOR {
  1509. export type GUITyping = any;
  1510. export let guiLoaded: boolean;
  1511. /**
  1512. * Function that add gui objects properties to the variable PROPERTIES
  1513. */
  1514. export function loadGUIProperties(GUI: GUITyping): void;
  1515. }
  1516. declare module INSPECTOR {
  1517. export abstract class Adapter {
  1518. protected _obj: any;
  1519. constructor(obj: any);
  1520. /** Returns the name displayed in the tree */
  1521. abstract id(): string;
  1522. /** Returns the type of this object - displayed in the tree */
  1523. abstract type(): string;
  1524. /** Returns the list of properties to be displayed for this adapter */
  1525. abstract getProperties(): Array<PropertyLine>;
  1526. /** Returns true if the given object correspond to this */
  1527. correspondsTo(obj: any): boolean;
  1528. /** Returns the adapter unique name */
  1529. readonly name: string;
  1530. /**
  1531. * Returns the actual object used for this adapter
  1532. */
  1533. readonly object: any;
  1534. /** Returns the list of tools available for this adapter */
  1535. abstract getTools(): Array<AbstractTreeTool>;
  1536. }
  1537. }
  1538. declare module INSPECTOR {
  1539. export class CameraAdapter extends Adapter implements ICameraPOV {
  1540. constructor(obj: BABYLON.Camera);
  1541. /** Returns the name displayed in the tree */
  1542. id(): string;
  1543. /** Returns the type of this object - displayed in the tree */
  1544. type(): string;
  1545. /** Returns the list of properties to be displayed for this adapter */
  1546. getProperties(): Array<PropertyLine>;
  1547. getTools(): Array<AbstractTreeTool>;
  1548. setPOV(): void;
  1549. getCurrentActiveCamera(): string;
  1550. }
  1551. }
  1552. declare module INSPECTOR {
  1553. export class GUIAdapter extends Adapter implements IToolVisible {
  1554. constructor(obj: any);
  1555. /** Returns the name displayed in the tree */
  1556. id(): string;
  1557. /** Returns the type of this object - displayed in the tree */
  1558. type(): string;
  1559. /** Returns the list of properties to be displayed for this adapter */
  1560. getProperties(): Array<PropertyLine>;
  1561. getTools(): Array<AbstractTreeTool>;
  1562. setVisible(b: boolean): void;
  1563. isVisible(): boolean;
  1564. }
  1565. }
  1566. declare module INSPECTOR {
  1567. export class LightAdapter extends Adapter implements IToolVisible {
  1568. constructor(obj: BABYLON.Light);
  1569. /** Returns the name displayed in the tree */
  1570. id(): string;
  1571. /** Returns the type of this object - displayed in the tree */
  1572. type(): string;
  1573. /** Returns the list of properties to be displayed for this adapter */
  1574. getProperties(): Array<PropertyLine>;
  1575. getTools(): Array<AbstractTreeTool>;
  1576. setVisible(b: boolean): void;
  1577. isVisible(): boolean;
  1578. }
  1579. }
  1580. declare module INSPECTOR {
  1581. export class MaterialAdapter extends Adapter {
  1582. constructor(obj: BABYLON.Material);
  1583. /** Returns the name displayed in the tree */
  1584. id(): string;
  1585. /** Returns the type of this object - displayed in the tree */
  1586. type(): string;
  1587. /** Returns the list of properties to be displayed for this adapter */
  1588. getProperties(): Array<PropertyLine>;
  1589. /** No tools for a material adapter */
  1590. getTools(): Array<AbstractTreeTool>;
  1591. }
  1592. }
  1593. declare module INSPECTOR {
  1594. export class MeshAdapter extends Adapter implements IToolVisible, IToolDebug, IToolBoundingBox, IToolInfo {
  1595. constructor(mesh: BABYLON.Node);
  1596. /** Returns the name displayed in the tree */
  1597. id(): string;
  1598. /** Returns the type of this object - displayed in the tree */
  1599. type(): string;
  1600. /** Returns the list of properties to be displayed for this adapter */
  1601. getProperties(): Array<PropertyLine>;
  1602. getTools(): Array<AbstractTreeTool>;
  1603. setVisible(b: boolean): void;
  1604. isVisible(): boolean;
  1605. isBoxVisible(): boolean;
  1606. setBoxVisible(b: boolean): boolean;
  1607. debug(enable: boolean): void;
  1608. /** Returns some information about this mesh */
  1609. getInfo(): string;
  1610. }
  1611. }
  1612. declare module INSPECTOR {
  1613. export class PhysicsImpostorAdapter extends Adapter implements IToolVisible {
  1614. constructor(obj: BABYLON.PhysicsImpostor, viewer: any);
  1615. /** Returns the name displayed in the tree */
  1616. id(): string;
  1617. /** Returns the type of this object - displayed in the tree */
  1618. type(): string;
  1619. /** Returns the list of properties to be displayed for this adapter */
  1620. getProperties(): Array<PropertyLine>;
  1621. getTools(): Array<AbstractTreeTool>;
  1622. setVisible(b: boolean): void;
  1623. isVisible(): boolean;
  1624. }
  1625. }
  1626. declare module INSPECTOR {
  1627. export class SoundAdapter extends Adapter implements ISoundInteractions {
  1628. constructor(obj: BABYLON.Sound);
  1629. /** Returns the name displayed in the tree */
  1630. id(): string;
  1631. /** Returns the type of this object - displayed in the tree */
  1632. type(): string;
  1633. /** Returns the list of properties to be displayed for this adapter */
  1634. getProperties(): Array<PropertyLine>;
  1635. getTools(): Array<AbstractTreeTool>;
  1636. setPlaying(callback: Function): void;
  1637. }
  1638. }
  1639. declare module INSPECTOR {
  1640. export class TextureAdapter extends Adapter {
  1641. constructor(obj: BABYLON.BaseTexture);
  1642. /** Returns the name displayed in the tree */
  1643. id(): string;
  1644. /** Returns the type of this object - displayed in the tree */
  1645. type(): string;
  1646. /** Returns the list of properties to be displayed for this adapter */
  1647. getProperties(): Array<PropertyLine>;
  1648. getTools(): Array<AbstractTreeTool>;
  1649. }
  1650. }
  1651. declare module INSPECTOR {
  1652. export interface SortDirection {
  1653. [property: string]: number;
  1654. }
  1655. export class DetailPanel extends BasicElement {
  1656. constructor(dr?: Array<PropertyLine>);
  1657. details: Array<PropertyLine>;
  1658. protected _build(): void;
  1659. /** Updates the HTML of the detail panel */
  1660. update(_items?: Array<PropertyLine>): void;
  1661. /** Search an element by name */
  1662. searchByName(searchName: string): void;
  1663. /**
  1664. * Removes all data in the detail panel but keep the header row
  1665. */
  1666. clean(): void;
  1667. /**
  1668. * Clean the rows only
  1669. */
  1670. cleanRow(): void;
  1671. /** Overrides basicelement.dispose */
  1672. dispose(): void;
  1673. }
  1674. }
  1675. declare module INSPECTOR {
  1676. /**
  1677. * A property is a link between a data (string) and an object.
  1678. */
  1679. export class Property {
  1680. constructor(prop: string, obj: any, parentObj?: any);
  1681. readonly name: string;
  1682. value: any;
  1683. readonly type: string;
  1684. obj: any;
  1685. }
  1686. }
  1687. declare module INSPECTOR {
  1688. export class PropertyFormatter {
  1689. /**
  1690. * Format the value of the given property of the given object.
  1691. */
  1692. static format(obj: any, prop: string): string;
  1693. }
  1694. /**
  1695. * A property line represents a line in the detail panel. This line is composed of :
  1696. * - a name (the property name)
  1697. * - a value if this property is of a type 'simple' : string, number, boolean, color, texture
  1698. * - the type of the value if this property is of a complex type (Vector2, BABYLON.Size, ...)
  1699. * - a ID if defined (otherwise an empty string is displayed)
  1700. * The original object is sent to the value object who will update it at will.
  1701. *
  1702. * A property line can contain OTHER property line objects in the case of a complex type.
  1703. * If this instance has no link to other instances, its type is ALWAYS a simple one (see above).
  1704. *
  1705. */
  1706. export class PropertyLine {
  1707. constructor(prop: Property, parent?: BABYLON.Nullable<PropertyLine>, level?: number);
  1708. validateInput(value: any, forceupdate?: boolean): void;
  1709. /** Retrieve the correct object from its parent.
  1710. * If no parent exists, returns the property value.
  1711. * This method is used at each update in case the property object is removed from the original object
  1712. * (example : mesh.position = new BABYLON.Vector3 ; the original vector3 object is deleted from the mesh).
  1713. */
  1714. updateObject(): any;
  1715. readonly name: string;
  1716. readonly value: any;
  1717. readonly type: string;
  1718. /** Delete properly this property line.
  1719. * Removes itself from the scheduler.
  1720. * Dispose all viewer element (color, texture...)
  1721. */
  1722. dispose(): void;
  1723. /**
  1724. * Update the property division with the new property value.
  1725. * If this property is complex, update its child, otherwise update its text content
  1726. */
  1727. update(): void;
  1728. toHtml(): HTMLElement;
  1729. closeDetails(): void;
  1730. }
  1731. }
  1732. declare module INSPECTOR {
  1733. /**
  1734. * Represents a html div element.
  1735. * The div is built when an instance of BasicElement is created.
  1736. */
  1737. export abstract class BasicElement {
  1738. protected _div: HTMLDivElement;
  1739. constructor();
  1740. /**
  1741. * Returns the div element
  1742. */
  1743. toHtml(): HTMLDivElement;
  1744. /**
  1745. * Build the html element
  1746. */
  1747. protected _build(): void;
  1748. abstract update(data?: any): void;
  1749. /** Default dispose method if needed */
  1750. dispose(): void;
  1751. }
  1752. }
  1753. declare module INSPECTOR {
  1754. /**
  1755. * Display a very small div corresponding to the given color
  1756. */
  1757. export class ColorElement extends BasicElement {
  1758. constructor(color: BABYLON.Color4 | BABYLON.Color3);
  1759. update(color?: BABYLON.Color4 | BABYLON.Color3): void;
  1760. }
  1761. }
  1762. declare module INSPECTOR {
  1763. /**
  1764. * Represents a html div element.
  1765. * The div is built when an instance of BasicElement is created.
  1766. */
  1767. export class ColorPickerElement extends BasicElement {
  1768. protected _input: HTMLInputElement;
  1769. constructor(color: BABYLON.Color4 | BABYLON.Color3, propertyLine: PropertyLine);
  1770. update(color?: BABYLON.Color4 | BABYLON.Color3): void;
  1771. }
  1772. }
  1773. declare module INSPECTOR {
  1774. /**
  1775. * Display a very small div. A new canvas is created, with a new js scene, containing only the
  1776. * cube texture in a cube
  1777. */
  1778. export class CubeTextureElement extends BasicElement {
  1779. protected _scene: BABYLON.Scene;
  1780. protected _cube: BABYLON.Mesh;
  1781. protected _textureUrl: string;
  1782. /** The texture given as a parameter should be cube. */
  1783. constructor(tex: BABYLON.Texture);
  1784. update(tex?: BABYLON.Texture): void;
  1785. /** Creates the box */
  1786. protected _populateScene(): void;
  1787. /** Removes properly the babylon engine */
  1788. dispose(): void;
  1789. }
  1790. }
  1791. declare module INSPECTOR {
  1792. /**
  1793. * Display a very small div. A new canvas is created, with a new js scene, containing only the
  1794. * cube texture in a cube
  1795. */
  1796. export class HDRCubeTextureElement extends CubeTextureElement {
  1797. /** The texture given as a parameter should be cube. */
  1798. constructor(tex: BABYLON.Texture);
  1799. /** Creates the box */
  1800. protected _populateScene(): void;
  1801. }
  1802. }
  1803. declare module INSPECTOR {
  1804. /**
  1805. * A search bar can be used to filter elements in the tree panel.
  1806. * At each keypress on the input, the treepanel will be filtered.
  1807. */
  1808. export class SearchBar extends BasicElement {
  1809. constructor(tab: PropertyTab);
  1810. /** Delete all characters typped in the input element */
  1811. reset(): void;
  1812. update(): void;
  1813. }
  1814. export class SearchBarDetails extends BasicElement {
  1815. constructor(tab: DetailPanel);
  1816. /** Delete all characters typped in the input element */
  1817. reset(): void;
  1818. update(): void;
  1819. }
  1820. }
  1821. declare module INSPECTOR {
  1822. /**
  1823. * Display a very small div corresponding to the given texture. On mouse over, display the full image
  1824. */
  1825. export class TextureElement extends BasicElement {
  1826. constructor(tex: BABYLON.Texture);
  1827. update(tex?: BABYLON.Texture): void;
  1828. }
  1829. }
  1830. declare module INSPECTOR {
  1831. /**
  1832. * Creates a tooltip for the parent of the given html element
  1833. */
  1834. export class Tooltip {
  1835. constructor(elem: HTMLElement, tip: string, attachTo?: BABYLON.Nullable<HTMLElement>);
  1836. }
  1837. }
  1838. declare module INSPECTOR {
  1839. export class Helpers {
  1840. /**
  1841. * Returns the type of the given object. First
  1842. * uses getClassName. If nothing is returned, used the type of the constructor
  1843. */
  1844. static GET_TYPE(obj: any): string;
  1845. /**
  1846. * Returns true if the user browser is edge.
  1847. */
  1848. static IsBrowserEdge(): boolean;
  1849. /**
  1850. * Returns true if the user browser is IE.
  1851. */
  1852. static IsBrowserIE(): boolean;
  1853. /** Send the event which name is given in parameter to the window */
  1854. static SEND_EVENT(eventName: string): void;
  1855. /** Returns the given number with 2 decimal number max if a decimal part exists */
  1856. static Trunc(nb: number): number;
  1857. /**
  1858. * Useful function used to create a div
  1859. */
  1860. static CreateDiv(className?: BABYLON.Nullable<string>, parent?: HTMLElement, tooltip?: string): HTMLDivElement;
  1861. /**
  1862. * Useful function used to create a input
  1863. */
  1864. static CreateInput(className?: string, parent?: HTMLElement, tooltip?: string): HTMLInputElement;
  1865. static CreateElement(element: string, className?: BABYLON.Nullable<string>, parent?: HTMLElement, tooltip?: string): HTMLElement;
  1866. /**
  1867. * Removes all children of the given div.
  1868. */
  1869. static CleanDiv(div: HTMLElement): void;
  1870. /**
  1871. * 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)
  1872. */
  1873. static Css(elem: HTMLElement, cssAttribute: string): string;
  1874. static LoadScript(): void;
  1875. static IsSystemName(name: string): boolean;
  1876. /**
  1877. * Return an array of PropertyLine for an obj
  1878. * @param obj
  1879. */
  1880. static GetAllLinesProperties(obj: any): Array<PropertyLine>;
  1881. /**
  1882. * Returns an array of string corresponding to tjhe list of properties of the object to be displayed
  1883. * @param obj
  1884. */
  1885. static GetAllLinesPropertiesAsString(obj: any, dontTakeThis?: Array<string>): Array<string>;
  1886. static Capitalize(str: string): string;
  1887. }
  1888. }
  1889. declare module INSPECTOR {
  1890. export class Scheduler {
  1891. /** Is this scheduler in pause ? */
  1892. pause: boolean;
  1893. /** All properties are refreshed every 250ms */
  1894. static REFRESH_TIME: number;
  1895. constructor();
  1896. static getInstance(): Scheduler;
  1897. /** Add a property line to be updated every X ms */
  1898. add(prop: PropertyLine): void;
  1899. /** Removes the given property from the list of properties to update */
  1900. remove(prop: PropertyLine): void;
  1901. dispose(): void;
  1902. }
  1903. }
  1904. declare module INSPECTOR {
  1905. export class CameraTab extends PropertyTab {
  1906. constructor(tabbar: TabBar, inspector: Inspector);
  1907. protected _getTree(): Array<TreeItem>;
  1908. }
  1909. }
  1910. declare module INSPECTOR {
  1911. /**
  1912. * The console tab will have two features :
  1913. * - hook all console.log call and display them in this panel (and in the browser console as well)
  1914. * - display all Babylon logs (called with Tools.Log...)
  1915. */
  1916. export class ConsoleTab extends Tab {
  1917. constructor(tabbar: TabBar, insp: Inspector);
  1918. /** Overrides super.dispose */
  1919. dispose(): void;
  1920. active(b: boolean): void;
  1921. }
  1922. }
  1923. declare module INSPECTOR {
  1924. export class GLTFTab extends Tab {
  1925. static readonly IsSupported: boolean;
  1926. /** @hidden */
  1927. static _Initialize(): void;
  1928. constructor(tabbar: TabBar, inspector: Inspector);
  1929. dispose(): void;
  1930. }
  1931. }
  1932. declare module INSPECTOR {
  1933. export class GUITab extends PropertyTab {
  1934. constructor(tabbar: TabBar, inspector: Inspector);
  1935. protected _getTree(): Array<TreeItem>;
  1936. }
  1937. }
  1938. declare module INSPECTOR {
  1939. export class LightTab extends PropertyTab {
  1940. constructor(tabbar: TabBar, inspector: Inspector);
  1941. protected _getTree(): Array<TreeItem>;
  1942. }
  1943. }
  1944. declare module INSPECTOR {
  1945. export class MaterialTab extends PropertyTab {
  1946. constructor(tabbar: TabBar, inspector: Inspector);
  1947. protected _getTree(): Array<TreeItem>;
  1948. }
  1949. }
  1950. declare module INSPECTOR {
  1951. export class MeshTab extends PropertyTab {
  1952. constructor(tabbar: TabBar, inspector: Inspector);
  1953. protected _getTree(): Array<TreeItem>;
  1954. }
  1955. }
  1956. declare module INSPECTOR {
  1957. export class PhysicsTab extends PropertyTab {
  1958. viewer: any;
  1959. constructor(tabbar: TabBar, inspector: Inspector);
  1960. protected _getTree(): Array<TreeItem>;
  1961. }
  1962. }
  1963. declare module INSPECTOR {
  1964. /**
  1965. * A Property tab can creates two panels:
  1966. * a tree panel and a detail panel,
  1967. * in which properties will be displayed.
  1968. * Both panels are separated by a resize bar
  1969. */
  1970. export abstract class PropertyTab extends Tab {
  1971. protected _inspector: Inspector;
  1972. /** The panel containing a list of items */
  1973. protected _treePanel: HTMLDivElement;
  1974. /** The panel containing a list if properties corresponding to an item */
  1975. protected _detailsPanel: DetailPanel;
  1976. protected _treeItems: Array<TreeItem>;
  1977. protected _searchBar: SearchBar;
  1978. constructor(tabbar: TabBar, name: string, insp: Inspector);
  1979. /** Overrides dispose */
  1980. dispose(): void;
  1981. update(_items?: Array<TreeItem>): void;
  1982. /** Display the details of the given item */
  1983. displayDetails(item: TreeItem): void;
  1984. /** Select an item in the tree */
  1985. select(item: TreeItem): void;
  1986. /** Set the given item as active in the tree */
  1987. activateNode(item: TreeItem): void;
  1988. /** Returns the treeitem corersponding to the given obj, null if not found */
  1989. getItemFor(_obj: any): BABYLON.Nullable<TreeItem>;
  1990. filter(filter: string): void;
  1991. /** Builds the tree panel */
  1992. protected abstract _getTree(): Array<TreeItem>;
  1993. }
  1994. }
  1995. declare module INSPECTOR {
  1996. export class SceneTab extends Tab {
  1997. constructor(tabbar: TabBar, insp: Inspector);
  1998. /** Overrides super.dispose */
  1999. dispose(): void;
  2000. }
  2001. }
  2002. declare module INSPECTOR {
  2003. export class SoundTab extends PropertyTab {
  2004. constructor(tabbar: TabBar, inspector: Inspector);
  2005. protected _getTree(): Array<TreeItem>;
  2006. }
  2007. }
  2008. declare module INSPECTOR {
  2009. export class StatsTab extends Tab {
  2010. constructor(tabbar: TabBar, insp: Inspector);
  2011. dispose(): void;
  2012. active(b: boolean): void;
  2013. }
  2014. }
  2015. declare module INSPECTOR {
  2016. export abstract class Tab extends BasicElement {
  2017. protected _tabbar: TabBar;
  2018. name: string;
  2019. protected _isActive: boolean;
  2020. protected _panel: HTMLDivElement;
  2021. constructor(tabbar: TabBar, name: string);
  2022. /** True if the tab is active, false otherwise */
  2023. isActive(): boolean;
  2024. protected _build(): void;
  2025. /** Set this tab as active or not, depending on the current state */
  2026. active(b: boolean): void;
  2027. update(): void;
  2028. /** Creates the tab panel for this tab. */
  2029. getPanel(): HTMLElement;
  2030. /** Add this in the propertytab with the searchbar */
  2031. filter(str: string): void;
  2032. /** Dispose properly this tab */
  2033. abstract dispose(): void;
  2034. /** Select an item in the tree */
  2035. select(item: TreeItem): void;
  2036. /**
  2037. * Returns the total width in pixel of this tab, 0 by default
  2038. */
  2039. getPixelWidth(): number;
  2040. }
  2041. }
  2042. declare module INSPECTOR {
  2043. /**
  2044. * A tab bar will contains each view the inspector can have : Canvas2D, Meshes...
  2045. * The default active tab is the first one of the list.
  2046. */
  2047. export class TabBar extends BasicElement {
  2048. constructor(inspector: Inspector, initialTab?: number);
  2049. update(): void;
  2050. protected _build(): void;
  2051. /** Dispose the current tab, set the given tab as active, and refresh the treeview */
  2052. switchTab(tab: Tab): void;
  2053. /** Display the mesh tab.
  2054. * If a parameter is given, the given mesh details are displayed
  2055. */
  2056. switchMeshTab(mesh?: BABYLON.AbstractMesh): void;
  2057. /** Returns the active tab */
  2058. getActiveTab(): BABYLON.Nullable<Tab>;
  2059. getActiveTabIndex(): number;
  2060. readonly inspector: Inspector;
  2061. /**
  2062. * Returns the total width in pixel of the tabbar,
  2063. * that corresponds to the sum of the width of each visible tab + toolbar width
  2064. */
  2065. getPixelWidth(): number;
  2066. /** Display the remaining icon or not depending on the tabbar width.
  2067. * This function should be called each time the inspector width is updated
  2068. */
  2069. updateWidth(): void;
  2070. }
  2071. }
  2072. declare module INSPECTOR {
  2073. export class TextureTab extends Tab {
  2074. static DDSPreview: DDSPreview;
  2075. /** The panel containing a list of items */
  2076. protected _treePanel: HTMLElement;
  2077. protected _treeItems: Array<TreeItem>;
  2078. constructor(tabbar: TabBar, inspector: Inspector);
  2079. dispose(): void;
  2080. update(_items?: Array<TreeItem>): void;
  2081. /** Display the details of the given item */
  2082. displayDetails(item: TreeItem): void;
  2083. /** Select an item in the tree */
  2084. select(item: TreeItem): void;
  2085. /** Set the given item as active in the tree */
  2086. activateNode(item: TreeItem): void;
  2087. }
  2088. class DDSPreview {
  2089. constructor(AdapterItem: TextureAdapter);
  2090. insertPreview(AdapterItem: TextureAdapter): void;
  2091. }
  2092. }
  2093. declare module INSPECTOR {
  2094. export class ToolsTab extends Tab {
  2095. constructor(tabbar: TabBar, insp: Inspector);
  2096. dispose(): void;
  2097. }
  2098. }
  2099. declare module INSPECTOR {
  2100. export abstract class AbstractTool {
  2101. protected _inspector: Inspector;
  2102. constructor(iconSet: string, icon: string, parent: HTMLElement, inspector: Inspector, tooltip: string);
  2103. toHtml(): HTMLElement;
  2104. /**
  2105. * Returns the total width in pixel of this tool, 0 by default
  2106. */
  2107. getPixelWidth(): number;
  2108. /**
  2109. * Updates the icon of this tool with the given string
  2110. */
  2111. protected _updateIcon(icon: string): void;
  2112. abstract action(): void;
  2113. }
  2114. }
  2115. declare module INSPECTOR {
  2116. /**
  2117. * Removes the inspector panel
  2118. */
  2119. export class DisposeTool extends AbstractTool {
  2120. constructor(parent: HTMLElement, inspector: Inspector);
  2121. action(): void;
  2122. }
  2123. }
  2124. declare module INSPECTOR {
  2125. export class FullscreenTool extends AbstractTool {
  2126. constructor(parent: HTMLElement, inspector: Inspector);
  2127. action(): void;
  2128. }
  2129. }
  2130. declare module INSPECTOR {
  2131. export class LabelTool extends AbstractTool {
  2132. constructor(parent: HTMLElement, inspector: Inspector);
  2133. dispose(): void;
  2134. action(): void;
  2135. }
  2136. }
  2137. declare module INSPECTOR {
  2138. export class PauseScheduleTool extends AbstractTool {
  2139. constructor(parent: HTMLElement, inspector: Inspector);
  2140. action(): void;
  2141. }
  2142. }
  2143. declare module INSPECTOR {
  2144. export class PickTool extends AbstractTool {
  2145. constructor(parent: HTMLElement, inspector: Inspector);
  2146. action(): void;
  2147. }
  2148. }
  2149. declare module INSPECTOR {
  2150. export class PopupTool extends AbstractTool {
  2151. constructor(parent: HTMLElement, inspector: Inspector);
  2152. action(): void;
  2153. }
  2154. }
  2155. declare module INSPECTOR {
  2156. export class RefreshTool extends AbstractTool {
  2157. constructor(parent: HTMLElement, inspector: Inspector);
  2158. action(): void;
  2159. }
  2160. }
  2161. declare module INSPECTOR {
  2162. export class Toolbar extends BasicElement {
  2163. constructor(inspector: Inspector);
  2164. update(): void;
  2165. protected _build(): void;
  2166. /**
  2167. * Returns the total width in pixel of the tabbar,
  2168. * that corresponds to the sum of the width of each tab + toolbar width
  2169. */
  2170. getPixelWidth(): number;
  2171. }
  2172. }
  2173. declare module INSPECTOR {
  2174. export class TreeItem extends BasicElement {
  2175. children: Array<TreeItem>;
  2176. constructor(tab: Tab, obj: Adapter);
  2177. /** Returns the item ID == its adapter ID */
  2178. readonly id: string;
  2179. /** Add the given item as a child of this one */
  2180. add(child: TreeItem): void;
  2181. /**
  2182. * Returns the original adapter
  2183. */
  2184. readonly adapter: Adapter;
  2185. /**
  2186. * Function used to compare this item to another tree item.
  2187. * Returns the alphabetical sort of the adapter ID
  2188. */
  2189. compareTo(item: TreeItem): number;
  2190. /** Returns true if the given obj correspond to the adapter linked to this tree item */
  2191. correspondsTo(obj: any): boolean;
  2192. /** hide all children of this item */
  2193. fold(): void;
  2194. /** Show all children of this item */
  2195. unfold(): void;
  2196. /** Build the HTML of this item */
  2197. protected _build(): void;
  2198. /**
  2199. * Returns one HTML element (.details) containing all details of this primitive
  2200. */
  2201. getDetails(): Array<PropertyLine>;
  2202. update(): void;
  2203. /**
  2204. * Add an event listener on the item :
  2205. * - one click display details
  2206. */
  2207. protected _addEvent(): void;
  2208. /** Set this item as active (background lighter) in the tree panel */
  2209. active(b: boolean): void;
  2210. getDiv(): HTMLDivElement;
  2211. }
  2212. }
  2213. declare module INSPECTOR {
  2214. export abstract class AbstractTreeTool {
  2215. protected _elem: HTMLElement;
  2216. /** Is the tool enabled ? */
  2217. protected _on: boolean;
  2218. constructor();
  2219. toHtml(): HTMLElement;
  2220. protected _addEvents(): void;
  2221. /**
  2222. * Action launched when clicked on this element
  2223. * Should be overrided
  2224. */
  2225. protected action(): void;
  2226. }
  2227. }
  2228. declare module INSPECTOR {
  2229. /** Any object implementing this interface should
  2230. * provide methods to toggle its bounding box
  2231. */
  2232. export interface IToolBoundingBox {
  2233. isBoxVisible: () => boolean;
  2234. setBoxVisible: (b: boolean) => void;
  2235. }
  2236. /**
  2237. * Checkbox to display/hide the primitive
  2238. */
  2239. export class BoundingBox extends AbstractTreeTool {
  2240. constructor(obj: IToolBoundingBox);
  2241. protected action(): void;
  2242. }
  2243. }
  2244. declare module INSPECTOR {
  2245. export interface ICameraPOV {
  2246. setPOV: () => void;
  2247. getCurrentActiveCamera: () => string;
  2248. id: () => string;
  2249. }
  2250. /**
  2251. *
  2252. */
  2253. export class CameraPOV extends AbstractTreeTool {
  2254. constructor(camera: ICameraPOV);
  2255. protected action(): void;
  2256. }
  2257. }
  2258. declare module INSPECTOR {
  2259. /** Any object implementing this interface should
  2260. * provide methods to toggle its visibility
  2261. */
  2262. export interface IToolVisible {
  2263. isVisible: () => boolean;
  2264. setVisible: (b: boolean) => void;
  2265. }
  2266. /**
  2267. * Checkbox to display/hide the primitive
  2268. */
  2269. export class Checkbox extends AbstractTreeTool {
  2270. constructor(obj: IToolVisible);
  2271. protected action(): void;
  2272. }
  2273. }
  2274. declare module INSPECTOR {
  2275. /** Any object implementing this interface should
  2276. * provide methods to toggle a debug area
  2277. */
  2278. export interface IToolDebug {
  2279. debug: (b: boolean) => void;
  2280. }
  2281. export class DebugArea extends AbstractTreeTool {
  2282. constructor(obj: IToolDebug);
  2283. protected action(): void;
  2284. }
  2285. }
  2286. declare module INSPECTOR {
  2287. /** Any object implementing this interface should
  2288. * provide methods to retrieve its info
  2289. */
  2290. export interface IToolInfo {
  2291. getInfo: () => string;
  2292. }
  2293. /**
  2294. * Checkbox to display/hide the primitive
  2295. */
  2296. export class Info extends AbstractTreeTool {
  2297. constructor(obj: IToolInfo);
  2298. protected action(): void;
  2299. }
  2300. }
  2301. declare module INSPECTOR {
  2302. export interface ISoundInteractions {
  2303. setPlaying: (callback: Function) => void;
  2304. }
  2305. /**
  2306. *
  2307. */
  2308. export class SoundInteractions extends AbstractTreeTool {
  2309. constructor(playSound: ISoundInteractions);
  2310. protected action(): void;
  2311. }
  2312. }