babylon.inspector.module.d.ts 91 KB

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