babylon.inspector.module.d.ts 92 KB

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