babylon.inspector.module.d.ts 91 KB

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