babylon.inspector.module.d.ts 90 KB

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