babylon.inspector.module.d.ts 91 KB

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