123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214 |
- /*BabylonJS Inspector*/
- // Dependencies for this module:
- // ../../../../Tools/Gulp/babylonjs
- declare module 'babylonjs-inspector' {
- export * from 'babylonjs-inspector/adapters';
- export * from 'babylonjs-inspector/details';
- export * from 'babylonjs-inspector/gui';
- export * from 'babylonjs-inspector/helpers';
- export * from 'babylonjs-inspector/scheduler';
- export * from 'babylonjs-inspector/tabs';
- export * from 'babylonjs-inspector/tools';
- export * from 'babylonjs-inspector/tree';
- export * from 'babylonjs-inspector/treetools';
- export * from 'babylonjs-inspector/Inspector';
- export * from 'babylonjs-inspector/properties';
- export * from 'babylonjs-inspector/properties_gui';
- }
- declare module 'babylonjs-inspector/adapters' {
- export * from 'babylonjs-inspector/adapters/Adapter';
- export * from 'babylonjs-inspector/adapters/CameraAdapter';
- export * from 'babylonjs-inspector/adapters/GUIAdapter';
- export * from 'babylonjs-inspector/adapters/LightAdapter';
- export * from 'babylonjs-inspector/adapters/MaterialAdapter';
- export * from 'babylonjs-inspector/adapters/MeshAdapter';
- export * from 'babylonjs-inspector/adapters/PhysicsImpostorAdapter';
- export * from 'babylonjs-inspector/adapters/SoundAdapter';
- export * from 'babylonjs-inspector/adapters/TextureAdapter';
- }
- declare module 'babylonjs-inspector/details' {
- export * from 'babylonjs-inspector/details/DetailPanel';
- export * from 'babylonjs-inspector/details/Property';
- export * from 'babylonjs-inspector/details/PropertyLine';
- }
- declare module 'babylonjs-inspector/gui' {
- export * from 'babylonjs-inspector/gui/BasicElement';
- export * from 'babylonjs-inspector/gui/ColorElement';
- export * from 'babylonjs-inspector/gui/ColorPickerElement';
- export * from 'babylonjs-inspector/gui/CubeTextureElement';
- export * from 'babylonjs-inspector/gui/HDRCubeTextureElement';
- export * from 'babylonjs-inspector/gui/SearchBar';
- export * from 'babylonjs-inspector/gui/TextureElement';
- export * from 'babylonjs-inspector/gui/Tooltip';
- }
- declare module 'babylonjs-inspector/helpers' {
- export * from 'babylonjs-inspector/helpers/Helpers';
- }
- declare module 'babylonjs-inspector/scheduler' {
- export * from 'babylonjs-inspector/scheduler/Scheduler';
- }
- declare module 'babylonjs-inspector/tabs' {
- export * from 'babylonjs-inspector/tabs/CameraTab';
- export * from 'babylonjs-inspector/tabs/ConsoleTab';
- export * from 'babylonjs-inspector/tabs/GLTFTab';
- export * from 'babylonjs-inspector/tabs/GUITab';
- export * from 'babylonjs-inspector/tabs/LightTab';
- export * from 'babylonjs-inspector/tabs/MaterialTab';
- export * from 'babylonjs-inspector/tabs/MeshTab';
- export * from 'babylonjs-inspector/tabs/PhysicsTab';
- export * from 'babylonjs-inspector/tabs/PropertyTab';
- export * from 'babylonjs-inspector/tabs/SceneTab';
- export * from 'babylonjs-inspector/tabs/SoundTab';
- export * from 'babylonjs-inspector/tabs/StatsTab';
- export * from 'babylonjs-inspector/tabs/Tab';
- export * from 'babylonjs-inspector/tabs/TabBar';
- export * from 'babylonjs-inspector/tabs/TextureTab';
- export * from 'babylonjs-inspector/tabs/ToolsTab';
- }
- declare module 'babylonjs-inspector/tools' {
- export class Tools {
- static LookForItem(item: any, selectedEntity: any): boolean;
- static SortAndFilter(items: any[]): any[];
- }
- }
- declare module 'babylonjs-inspector/tree' {
- export * from 'babylonjs-inspector/tree/TreeItem';
- }
- declare module 'babylonjs-inspector/treetools' {
- export * from 'babylonjs-inspector/treetools/AbstractTreeTool';
- export * from 'babylonjs-inspector/treetools/BoundingBox';
- export * from 'babylonjs-inspector/treetools/CameraPOV';
- export * from 'babylonjs-inspector/treetools/Checkbox';
- export * from 'babylonjs-inspector/treetools/DebugArea';
- export * from 'babylonjs-inspector/treetools/Info';
- export * from 'babylonjs-inspector/treetools/SoundInteractions';
- }
- import { AbstractMesh, Nullable, Scene, Observable } from "babylonjs";
- export declare class Inspector {
- /** The HTML document relative to this inspector (the window or the popup depending on its mode) */
- static DOCUMENT: HTMLDocument;
- /** The HTML window. In popup mode, it's the popup itself. Otherwise, it's the current tab */
- static WINDOW: Window;
- onGUILoaded: Observable<any>;
- static GUIObject: any;
- /** The inspector is created with the given engine.
- * If the parameter 'popup' is false, the inspector is created as a right panel on the main window.
- * If the parameter 'popup' is true, the inspector is created in another popup.
- */
- constructor(scene: Scene, popup?: boolean, initialTab?: number | string, parentElement?: Nullable<HTMLElement>, newColors?: {
- backgroundColor?: string;
- backgroundColorLighter?: string;
- backgroundColorLighter2?: string;
- backgroundColorLighter3?: string;
- color?: string;
- colorTop?: string;
- colorBot?: string;
- });
- readonly scene: Scene;
- readonly popupMode: boolean;
- /**
- * Filter the list of item present in the tree.
- * All item returned should have the given filter contained in the item id.
- */
- filterItem(filter: string): void;
- /** Display the mesh tab on the given object */
- displayObjectDetails(mesh: AbstractMesh): void;
- /** Clean the whole tree of item and rebuilds it */
- refresh(): void;
- /** Remove the inspector panel when it's built as a right panel:
- * remove the right panel and remove the wrapper
- */
- dispose(): void;
- /** Open the inspector in a new popup
- * Set 'firstTime' to true if there is no inspector created beforehands
- */
- openPopup(firstTime?: boolean): void;
- getActiveTabIndex(): number;
- }
- declare module 'babylonjs-inspector/properties' {
- 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";
- export const PROPERTIES: {
- /** Format the given object :
- * If a format function exists, returns the result of this function.
- * If this function doesn't exists, return the object type instead
- */
- format: (obj: any) => any;
- 'type_not_defined': {
- properties: any[];
- format: () => string;
- };
- 'Vector2': {
- type: typeof Vector2;
- format: (vec: Vector2) => string;
- };
- 'Vector3': {
- type: typeof Vector3;
- format: (vec: Vector3) => string;
- };
- 'Color3': {
- type: typeof Color3;
- format: (color: Color3) => string;
- slider: {
- r: {
- min: number;
- max: number;
- step: number;
- };
- g: {
- min: number;
- max: number;
- step: number;
- };
- b: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'Color4': {
- type: typeof Color4;
- format: (color: Color4) => string;
- slider: {
- r: {
- min: number;
- max: number;
- step: number;
- };
- g: {
- min: number;
- max: number;
- step: number;
- };
- b: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'Quaternion': {
- type: typeof Quaternion;
- };
- 'Size': {
- type: typeof Size;
- format: (size: Size) => string;
- };
- 'Texture': {
- type: typeof Texture;
- format: (tex: Texture) => string;
- };
- 'RenderTargetTexture': {
- type: typeof RenderTargetTexture;
- };
- 'DynamicTexture': {
- type: typeof DynamicTexture;
- };
- 'BaseTexture': {
- type: typeof BaseTexture;
- };
- 'CubeTexture': {
- type: typeof CubeTexture;
- };
- 'HDRCubeTexture': {
- type: typeof HDRCubeTexture;
- };
- 'Sound': {
- type: typeof Sound;
- };
- 'ArcRotateCamera': {
- type: typeof ArcRotateCamera;
- slider: {
- alpha: {
- min: number;
- max: number;
- step: number;
- };
- beta: {
- min: number;
- max: number;
- step: number;
- };
- fov: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'FreeCamera': {
- type: typeof FreeCamera;
- slider: {
- fov: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'Scene': {
- type: typeof Scene;
- };
- 'TransformNode': {
- type: typeof TransformNode;
- format: (m: TransformNode) => string;
- };
- 'AbstractMesh': {
- type: typeof AbstractMesh;
- format: (m: AbstractMesh) => string;
- };
- 'Mesh': {
- type: typeof Mesh;
- format: (m: Mesh) => string;
- slider: {
- visibility: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'StandardMaterial': {
- type: typeof StandardMaterial;
- format: (mat: StandardMaterial) => string;
- slider: {
- alpha: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'PBRMaterial': {
- type: typeof PBRMaterial;
- slider: {
- alpha: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'PhysicsImpostor': {
- type: typeof PhysicsImpostor;
- };
- 'ImageProcessingConfiguration': {
- type: typeof ImageProcessingConfiguration;
- };
- 'ColorCurves': {
- type: typeof ColorCurves;
- };
- };
- }
- declare module 'babylonjs-inspector/properties_gui' {
- export type GUITyping = any;
- export let guiLoaded: boolean;
- /**
- * Function that add gui objects properties to the variable PROPERTIES
- */
- export function loadGUIProperties(GUI: GUITyping): void;
- }
- declare module 'babylonjs-inspector/adapters/Adapter' {
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- export abstract class Adapter {
- protected _obj: any;
- constructor(obj: any);
- /** Returns the name displayed in the tree */
- abstract id(): string;
- /** Returns the type of this object - displayed in the tree */
- abstract type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- abstract getProperties(): Array<PropertyLine>;
- /** Returns true if the given object correspond to this */
- correspondsTo(obj: any): boolean;
- /** Returns the adapter unique name */
- readonly name: string;
- /**
- * Returns the actual object used for this adapter
- */
- readonly object: any;
- /** Returns the list of tools available for this adapter */
- abstract getTools(): Array<AbstractTreeTool>;
- }
- }
- declare module 'babylonjs-inspector/adapters/CameraAdapter' {
- import { Camera } from "babylonjs";
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- import { ICameraPOV } from "babylonjs-inspector/treetools/CameraPOV";
- import { Adapter } from "babylonjs-inspector/adapters/Adapter";
- export class CameraAdapter extends Adapter implements ICameraPOV {
- constructor(obj: Camera);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setPOV(): void;
- getCurrentActiveCamera(): string;
- }
- }
- declare module 'babylonjs-inspector/adapters/GUIAdapter' {
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
- import { Adapter } from "babylonjs-inspector/adapters/Adapter";
- export class GUIAdapter extends Adapter implements IToolVisible {
- constructor(obj: any);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setVisible(b: boolean): void;
- isVisible(): boolean;
- }
- }
- declare module 'babylonjs-inspector/adapters/LightAdapter' {
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
- import { Adapter } from "babylonjs-inspector/adapters/Adapter";
- export class LightAdapter extends Adapter implements IToolVisible {
- constructor(obj: BABYLON.Light);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setVisible(b: boolean): void;
- isVisible(): boolean;
- }
- }
- declare module 'babylonjs-inspector/adapters/MaterialAdapter' {
- import { Material } from "babylonjs";
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- import { Adapter } from "babylonjs-inspector/adapters/Adapter";
- export class MaterialAdapter extends Adapter {
- constructor(obj: Material);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- /** No tools for a material adapter */
- getTools(): Array<AbstractTreeTool>;
- }
- }
- declare module 'babylonjs-inspector/adapters/MeshAdapter' {
- import { Node } from "babylonjs";
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- import { IToolBoundingBox } from "babylonjs-inspector/treetools/BoundingBox";
- import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
- import { IToolDebug } from "babylonjs-inspector/treetools/DebugArea";
- import { IToolInfo } from "babylonjs-inspector/treetools/Info";
- import { Adapter } from "babylonjs-inspector/adapters/Adapter";
- export class MeshAdapter extends Adapter implements IToolVisible, IToolDebug, IToolBoundingBox, IToolInfo {
- constructor(mesh: Node);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setVisible(b: boolean): void;
- isVisible(): boolean;
- isBoxVisible(): boolean;
- setBoxVisible(b: boolean): boolean;
- debug(enable: boolean): void;
- /** Returns some information about this mesh */
- getInfo(): string;
- }
- }
- declare module 'babylonjs-inspector/adapters/PhysicsImpostorAdapter' {
- import { PhysicsImpostor } from "babylonjs";
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
- import { Adapter } from "babylonjs-inspector/adapters/Adapter";
- export class PhysicsImpostorAdapter extends Adapter implements IToolVisible {
- constructor(obj: PhysicsImpostor, viewer: any);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setVisible(b: boolean): void;
- isVisible(): boolean;
- }
- }
- declare module 'babylonjs-inspector/adapters/SoundAdapter' {
- import { Sound } from "babylonjs";
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- import { ISoundInteractions } from "babylonjs-inspector/treetools/SoundInteractions";
- import { Adapter } from "babylonjs-inspector/adapters/Adapter";
- export class SoundAdapter extends Adapter implements ISoundInteractions {
- constructor(obj: Sound);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setPlaying(callback: Function): void;
- }
- }
- declare module 'babylonjs-inspector/adapters/TextureAdapter' {
- import { Adapter } from "babylonjs-inspector/adapters/Adapter";
- import { BaseTexture } from "babylonjs";
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- export class TextureAdapter extends Adapter {
- constructor(obj: BaseTexture);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- }
- }
- declare module 'babylonjs-inspector/details/DetailPanel' {
- import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- export interface SortDirection {
- [property: string]: number;
- }
- export class DetailPanel extends BasicElement {
- constructor(dr?: Array<PropertyLine>);
- details: Array<PropertyLine>;
- protected _build(): void;
- /** Updates the HTML of the detail panel */
- update(_items?: Array<PropertyLine>): void;
- /** Search an element by name */
- searchByName(searchName: string): void;
- /**
- * Removes all data in the detail panel but keep the header row
- */
- clean(): void;
- /**
- * Clean the rows only
- */
- cleanRow(): void;
- /** Overrides basicelement.dispose */
- dispose(): void;
- }
- }
- declare module 'babylonjs-inspector/details/Property' {
- /**
- * A property is a link between a data (string) and an object.
- */
- export class Property {
- constructor(prop: string, obj: any, parentObj?: any);
- readonly name: string;
- value: any;
- readonly type: string;
- obj: any;
- }
- }
- declare module 'babylonjs-inspector/details/PropertyLine' {
- import { Nullable } from "babylonjs";
- import { Property } from "babylonjs-inspector/details/Property";
- export class PropertyFormatter {
- /**
- * Format the value of the given property of the given object.
- */
- static format(obj: any, prop: string): string;
- }
- /**
- * A property line represents a line in the detail panel. This line is composed of :
- * - a name (the property name)
- * - a value if this property is of a type 'simple' : string, number, boolean, color, texture
- * - the type of the value if this property is of a complex type (Vector2, Size, ...)
- * - a ID if defined (otherwise an empty string is displayed)
- * The original object is sent to the value object who will update it at will.
- *
- * A property line can contain OTHER property line objects in the case of a complex type.
- * If this instance has no link to other instances, its type is ALWAYS a simple one (see above).
- *
- */
- export class PropertyLine {
- constructor(prop: Property, parent?: Nullable<PropertyLine>, level?: number);
- validateInput(value: any, forceupdate?: boolean): void;
- /** Retrieve the correct object from its parent.
- * If no parent exists, returns the property value.
- * This method is used at each update in case the property object is removed from the original object
- * (example : mesh.position = new Vector3 ; the original vector3 object is deleted from the mesh).
- */
- updateObject(): any;
- readonly name: string;
- readonly value: any;
- readonly type: string;
- /** Delete properly this property line.
- * Removes itself from the scheduler.
- * Dispose all viewer element (color, texture...)
- */
- dispose(): void;
- /**
- * Update the property division with the new property value.
- * If this property is complex, update its child, otherwise update its text content
- */
- update(): void;
- toHtml(): HTMLElement;
- closeDetails(): void;
- }
- }
- declare module 'babylonjs-inspector/gui/BasicElement' {
- /**
- * Represents a html div element.
- * The div is built when an instance of BasicElement is created.
- */
- export abstract class BasicElement {
- protected _div: HTMLDivElement;
- constructor();
- /**
- * Returns the div element
- */
- toHtml(): HTMLDivElement;
- /**
- * Build the html element
- */
- protected _build(): void;
- abstract update(data?: any): void;
- /** Default dispose method if needed */
- dispose(): void;
- }
- }
- declare module 'babylonjs-inspector/gui/ColorElement' {
- import { Color3, Color4 } from "babylonjs";
- import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
- /**
- * Display a very small div corresponding to the given color
- */
- export class ColorElement extends BasicElement {
- constructor(color: Color4 | Color3);
- update(color?: Color4 | Color3): void;
- }
- }
- declare module 'babylonjs-inspector/gui/ColorPickerElement' {
- import { Color3, Color4 } from "babylonjs";
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
- /**
- * Represents a html div element.
- * The div is built when an instance of BasicElement is created.
- */
- export class ColorPickerElement extends BasicElement {
- protected _input: HTMLInputElement;
- constructor(color: Color4 | Color3, propertyLine: PropertyLine);
- update(color?: Color4 | Color3): void;
- }
- }
- declare module 'babylonjs-inspector/gui/CubeTextureElement' {
- import { Mesh, Scene, Texture } from "babylonjs";
- import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
- /**
- * Display a very small div. A new canvas is created, with a new js scene, containing only the
- * cube texture in a cube
- */
- export class CubeTextureElement extends BasicElement {
- protected _scene: Scene;
- protected _cube: Mesh;
- protected _textureUrl: string;
- /** The texture given as a parameter should be cube. */
- constructor(tex: Texture);
- update(tex?: Texture): void;
- /** Creates the box */
- protected _populateScene(): void;
- /** Removes properly the babylon engine */
- dispose(): void;
- }
- }
- declare module 'babylonjs-inspector/gui/HDRCubeTextureElement' {
- import { Texture } from "babylonjs";
- import { CubeTextureElement } from "babylonjs-inspector/gui/CubeTextureElement";
- /**
- * Display a very small div. A new canvas is created, with a new js scene, containing only the
- * cube texture in a cube
- */
- export class HDRCubeTextureElement extends CubeTextureElement {
- /** The texture given as a parameter should be cube. */
- constructor(tex: Texture);
- /** Creates the box */
- protected _populateScene(): void;
- }
- }
- declare module 'babylonjs-inspector/gui/SearchBar' {
- import { DetailPanel } from "babylonjs-inspector/details/DetailPanel";
- import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
- import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
- /**
- * A search bar can be used to filter elements in the tree panel.
- * At each keypress on the input, the treepanel will be filtered.
- */
- export class SearchBar extends BasicElement {
- constructor(tab: PropertyTab);
- /** Delete all characters typped in the input element */
- reset(): void;
- update(): void;
- }
- export class SearchBarDetails extends BasicElement {
- constructor(tab: DetailPanel);
- /** Delete all characters typped in the input element */
- reset(): void;
- update(): void;
- }
- }
- declare module 'babylonjs-inspector/gui/TextureElement' {
- import { Texture } from "babylonjs";
- import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
- /**
- * Display a very small div corresponding to the given texture. On mouse over, display the full image
- */
- export class TextureElement extends BasicElement {
- constructor(tex: Texture);
- update(tex?: Texture): void;
- }
- }
- declare module 'babylonjs-inspector/gui/Tooltip' {
- import { Nullable } from "babylonjs";
- /**
- * Creates a tooltip for the parent of the given html element
- */
- export class Tooltip {
- constructor(elem: HTMLElement, tip: string, attachTo?: Nullable<HTMLElement>);
- }
- }
- declare module 'babylonjs-inspector/helpers/Helpers' {
- import { Nullable } from "babylonjs";
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- export class Helpers {
- /**
- * Returns the type of the given object. First
- * uses getClassName. If nothing is returned, used the type of the constructor
- */
- static GET_TYPE(obj: any): string;
- /**
- * Returns true if the user browser is edge.
- */
- static IsBrowserEdge(): boolean;
- /**
- * Returns true if the user browser is IE.
- */
- static IsBrowserIE(): boolean;
- /** Send the event which name is given in parameter to the window */
- static SEND_EVENT(eventName: string): void;
- /** Returns the given number with 2 decimal number max if a decimal part exists */
- static Trunc(nb: number): number;
- /**
- * Useful function used to create a div
- */
- static CreateDiv(className?: Nullable<string>, parent?: HTMLElement, tooltip?: string): HTMLDivElement;
- /**
- * Useful function used to create a input
- */
- static CreateInput(className?: string, parent?: HTMLElement, tooltip?: string): HTMLInputElement;
- static CreateElement(element: string, className?: Nullable<string>, parent?: HTMLElement, tooltip?: string): HTMLElement;
- /**
- * Removes all children of the given div.
- */
- static CleanDiv(div: HTMLElement): void;
- /**
- * 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)
- */
- static Css(elem: HTMLElement, cssAttribute: string): string;
- static LoadScript(): void;
- static IsSystemName(name: string): boolean;
- /**
- * Return an array of PropertyLine for an obj
- * @param obj
- */
- static GetAllLinesProperties(obj: any): Array<PropertyLine>;
- /**
- * Returns an array of string corresponding to tjhe list of properties of the object to be displayed
- * @param obj
- */
- static GetAllLinesPropertiesAsString(obj: any, dontTakeThis?: Array<string>): Array<string>;
- static Capitalize(str: string): string;
- }
- }
- declare module 'babylonjs-inspector/scheduler/Scheduler' {
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- export class Scheduler {
- /** Is this scheduler in pause ? */
- pause: boolean;
- /** All properties are refreshed every 250ms */
- static REFRESH_TIME: number;
- constructor();
- static getInstance(): Scheduler;
- /** Add a property line to be updated every X ms */
- add(prop: PropertyLine): void;
- /** Removes the given property from the list of properties to update */
- remove(prop: PropertyLine): void;
- dispose(): void;
- }
- }
- declare module 'babylonjs-inspector/tabs/CameraTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
- import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class CameraTab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module 'babylonjs-inspector/tabs/ConsoleTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { Tab } from "babylonjs-inspector/tabs/Tab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- /**
- * The console tab will have two features :
- * - hook all console.log call and display them in this panel (and in the browser console as well)
- * - display all Babylon logs (called with Tools.Log...)
- */
- export class ConsoleTab extends Tab {
- constructor(tabbar: TabBar, insp: Inspector);
- /** Overrides super.dispose */
- dispose(): void;
- active(b: boolean): void;
- }
- }
- declare module 'babylonjs-inspector/tabs/GLTFTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { Tab } from "babylonjs-inspector/tabs/Tab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class GLTFTab extends Tab {
- static readonly IsSupported: boolean;
- /** @hidden */
- static _Initialize(): void;
- constructor(tabbar: TabBar, inspector: Inspector);
- dispose(): void;
- /** @hidden */
- static _GetLoaderDefaultsAsync(): Promise<any>;
- }
- }
- declare module 'babylonjs-inspector/tabs/GUITab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
- import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class GUITab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module 'babylonjs-inspector/tabs/LightTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
- import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class LightTab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module 'babylonjs-inspector/tabs/MaterialTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
- import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class MaterialTab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module 'babylonjs-inspector/tabs/MeshTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
- import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class MeshTab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module 'babylonjs-inspector/tabs/PhysicsTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
- import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class PhysicsTab extends PropertyTab {
- viewer: any;
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module 'babylonjs-inspector/tabs/PropertyTab' {
- import { Nullable } from "babylonjs";
- import { DetailPanel } from "babylonjs-inspector/details/DetailPanel";
- import { SearchBar } from "babylonjs-inspector/gui/SearchBar";
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
- import { Tab } from "babylonjs-inspector/tabs/Tab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- /**
- * A Property tab can creates two panels:
- * a tree panel and a detail panel,
- * in which properties will be displayed.
- * Both panels are separated by a resize bar
- */
- export abstract class PropertyTab extends Tab {
- protected _inspector: Inspector;
- /** The panel containing a list of items */
- protected _treePanel: HTMLDivElement;
- /** The panel containing a list if properties corresponding to an item */
- protected _detailsPanel: DetailPanel;
- protected _treeItems: Array<TreeItem>;
- protected _searchBar: SearchBar;
- constructor(tabbar: TabBar, name: string, insp: Inspector);
- /** Overrides dispose */
- dispose(): void;
- update(_items?: Array<TreeItem>): void;
- /** Display the details of the given item */
- displayDetails(item: TreeItem): void;
- /** Select an item in the tree */
- select(item: TreeItem): void;
- /** Set the given item as active in the tree */
- activateNode(item: TreeItem): void;
- /** Returns the treeitem corersponding to the given obj, null if not found */
- getItemFor(_obj: any): Nullable<TreeItem>;
- filter(filter: string): void;
- /** Builds the tree panel */
- protected abstract _getTree(): Array<TreeItem>;
- }
- }
- declare module 'babylonjs-inspector/tabs/SceneTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { Tab } from "babylonjs-inspector/tabs/Tab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class SceneTab extends Tab {
- constructor(tabbar: TabBar, insp: Inspector);
- /** Overrides super.dispose */
- dispose(): void;
- }
- }
- declare module 'babylonjs-inspector/tabs/SoundTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
- import { PropertyTab } from "babylonjs-inspector/tabs/PropertyTab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class SoundTab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module 'babylonjs-inspector/tabs/StatsTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { Tab } from "babylonjs-inspector/tabs/Tab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class StatsTab extends Tab {
- constructor(tabbar: TabBar, insp: Inspector);
- dispose(): void;
- active(b: boolean): void;
- }
- }
- declare module 'babylonjs-inspector/tabs/Tab' {
- import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
- import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export abstract class Tab extends BasicElement {
- protected _tabbar: TabBar;
- name: string;
- protected _isActive: boolean;
- protected _panel: HTMLDivElement;
- constructor(tabbar: TabBar, name: string);
- /** True if the tab is active, false otherwise */
- isActive(): boolean;
- protected _build(): void;
- /** Set this tab as active or not, depending on the current state */
- active(b: boolean): void;
- update(): void;
- /** Creates the tab panel for this tab. */
- getPanel(): HTMLElement;
- /** Add this in the propertytab with the searchbar */
- filter(str: string): void;
- /** Dispose properly this tab */
- abstract dispose(): void;
- /** Select an item in the tree */
- select(item: TreeItem): void;
- /**
- * Returns the total width in pixel of this tab, 0 by default
- */
- getPixelWidth(): number;
- }
- }
- declare module 'babylonjs-inspector/tabs/TabBar' {
- import { AbstractMesh, Nullable } from "babylonjs";
- import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { Tab } from "babylonjs-inspector/tabs/Tab";
- /**
- * A tab bar will contains each view the inspector can have : Canvas2D, Meshes...
- * The default active tab is the first one of the list.
- */
- export class TabBar extends BasicElement {
- constructor(inspector: Inspector, initialTab?: number | string);
- update(): void;
- protected _build(): void;
- /** Dispose the current tab, set the given tab as active, and refresh the treeview */
- switchTab(tab: Tab): void;
- /** Display the mesh tab.
- * If a parameter is given, the given mesh details are displayed
- */
- switchMeshTab(mesh?: AbstractMesh): void;
- /** Returns the active tab */
- getActiveTab(): Nullable<Tab>;
- getActiveTabIndex(): number;
- getTabIndex(name: string): number;
- readonly inspector: Inspector;
- /**
- * Returns the total width in pixel of the tabbar,
- * that corresponds to the sum of the width of each visible tab + toolbar width
- */
- getPixelWidth(): number;
- /** Display the remaining icon or not depending on the tabbar width.
- * This function should be called each time the inspector width is updated
- */
- updateWidth(): void;
- }
- }
- declare module 'babylonjs-inspector/tabs/TextureTab' {
- import { TextureAdapter } from "babylonjs-inspector/adapters/TextureAdapter";
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { TreeItem } from "babylonjs-inspector/tree/TreeItem";
- import { Tab } from "babylonjs-inspector/tabs/Tab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class TextureTab extends Tab {
- static DDSPreview: DDSPreview;
- /** The panel containing a list of items */
- protected _treePanel: HTMLElement;
- protected _treeItems: Array<TreeItem>;
- constructor(tabbar: TabBar, inspector: Inspector);
- dispose(): void;
- update(_items?: Array<TreeItem>): void;
- /** Display the details of the given item */
- displayDetails(item: TreeItem): void;
- /** Select an item in the tree */
- select(item: TreeItem): void;
- /** Set the given item as active in the tree */
- activateNode(item: TreeItem): void;
- }
- class DDSPreview {
- canvas: HTMLCanvasElement | null;
- constructor(AdapterItem: TextureAdapter);
- insertPreview(AdapterItem: TextureAdapter): void;
- dispose(): void;
- }
- export {};
- }
- declare module 'babylonjs-inspector/tabs/ToolsTab' {
- import { Inspector } from "babylonjs-inspector/Inspector";
- import { Tab } from "babylonjs-inspector/tabs/Tab";
- import { TabBar } from "babylonjs-inspector/tabs/TabBar";
- export class ToolsTab extends Tab {
- constructor(tabbar: TabBar, insp: Inspector);
- dispose(): void;
- }
- }
- declare module 'babylonjs-inspector/tree/TreeItem' {
- import { BasicElement } from "babylonjs-inspector/gui/BasicElement";
- import { Tab } from "babylonjs-inspector/tabs/Tab";
- import { Adapter } from "babylonjs-inspector/adapters/Adapter";
- import { PropertyLine } from "babylonjs-inspector/details/PropertyLine";
- export class TreeItem extends BasicElement {
- children: Array<TreeItem>;
- constructor(tab: Tab, obj: Adapter);
- /** Returns the item ID == its adapter ID */
- readonly id: string;
- /** Add the given item as a child of this one */
- add(child: TreeItem): void;
- /**
- * Returns the original adapter
- */
- readonly adapter: Adapter;
- /**
- * Function used to compare this item to another tree item.
- * Returns the alphabetical sort of the adapter ID
- */
- compareTo(item: TreeItem): number;
- /** Returns true if the given obj correspond to the adapter linked to this tree item */
- correspondsTo(obj: any): boolean;
- /** hide all children of this item */
- fold(): void;
- /** Show all children of this item */
- unfold(): void;
- /** Build the HTML of this item */
- protected _build(): void;
- /**
- * Returns one HTML element (.details) containing all details of this primitive
- */
- getDetails(): Array<PropertyLine>;
- update(): void;
- /**
- * Add an event listener on the item :
- * - one click display details
- */
- protected _addEvent(): void;
- /** Set this item as active (background lighter) in the tree panel */
- active(b: boolean): void;
- getDiv(): HTMLDivElement;
- }
- }
- declare module 'babylonjs-inspector/treetools/AbstractTreeTool' {
- export abstract class AbstractTreeTool {
- protected _elem: HTMLElement;
- /** Is the tool enabled ? */
- protected _on: boolean;
- constructor();
- toHtml(): HTMLElement;
- protected _addEvents(): void;
- /**
- * Action launched when clicked on this element
- * Should be overrided
- */
- protected action(): void;
- }
- }
- declare module 'babylonjs-inspector/treetools/BoundingBox' {
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- /** Any object implementing this interface should
- * provide methods to toggle its bounding box
- */
- export interface IToolBoundingBox {
- isBoxVisible: () => boolean;
- setBoxVisible: (b: boolean) => void;
- }
- /**
- * Checkbox to display/hide the primitive
- */
- export class BoundingBox extends AbstractTreeTool {
- constructor(obj: IToolBoundingBox);
- protected action(): void;
- }
- }
- declare module 'babylonjs-inspector/treetools/CameraPOV' {
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- export interface ICameraPOV {
- setPOV: () => void;
- getCurrentActiveCamera: () => string;
- id: () => string;
- }
- /**
- *
- */
- export class CameraPOV extends AbstractTreeTool {
- constructor(camera: ICameraPOV);
- protected action(): void;
- }
- }
- declare module 'babylonjs-inspector/treetools/Checkbox' {
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- /** Any object implementing this interface should
- * provide methods to toggle its visibility
- */
- export interface IToolVisible {
- isVisible: () => boolean;
- setVisible: (b: boolean) => void;
- }
- /**
- * Checkbox to display/hide the primitive
- */
- export class Checkbox extends AbstractTreeTool {
- constructor(obj: IToolVisible);
- protected action(): void;
- }
- }
- declare module 'babylonjs-inspector/treetools/DebugArea' {
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- /** Any object implementing this interface should
- * provide methods to toggle a debug area
- */
- export interface IToolDebug {
- debug: (b: boolean) => void;
- }
- export class DebugArea extends AbstractTreeTool {
- constructor(obj: IToolDebug);
- protected action(): void;
- }
- }
- declare module 'babylonjs-inspector/treetools/Info' {
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- /** Any object implementing this interface should
- * provide methods to retrieve its info
- */
- export interface IToolInfo {
- getInfo: () => string;
- }
- /**
- * Checkbox to display/hide the primitive
- */
- export class Info extends AbstractTreeTool {
- constructor(obj: IToolInfo);
- protected action(): void;
- }
- }
- declare module 'babylonjs-inspector/treetools/SoundInteractions' {
- import { AbstractTreeTool } from "babylonjs-inspector/treetools/AbstractTreeTool";
- export interface ISoundInteractions {
- setPlaying: (callback: Function) => void;
- }
- /**
- *
- */
- export class SoundInteractions extends AbstractTreeTool {
- constructor(playSound: ISoundInteractions);
- protected action(): void;
- }
- }
- /*BabylonJS Inspector*/
- // Dependencies for this module:
- // ../../../../Tools/Gulp/babylonjs
- declare module INSPECTOR {
- }
- declare module INSPECTOR {
- }
- declare module INSPECTOR {
- }
- declare module INSPECTOR {
- }
- declare module INSPECTOR {
- }
- declare module INSPECTOR {
- }
- declare module INSPECTOR {
- }
- declare module INSPECTOR {
- export class Tools {
- static LookForItem(item: any, selectedEntity: any): boolean;
- static SortAndFilter(items: any[]): any[];
- }
- }
- declare module INSPECTOR {
- }
- declare module INSPECTOR {
- }
- export declare class Inspector {
- /** The HTML document relative to this inspector (the window or the popup depending on its mode) */
- static DOCUMENT: HTMLDocument;
- /** The HTML window. In popup mode, it's the popup itself. Otherwise, it's the current tab */
- static WINDOW: Window;
- onGUILoaded: BABYLON.Observable<any>;
- static GUIObject: any;
- /** The inspector is created with the given engine.
- * If the parameter 'popup' is false, the inspector is created as a right panel on the main window.
- * If the parameter 'popup' is true, the inspector is created in another popup.
- */
- constructor(scene: BABYLON.Scene, popup?: boolean, initialTab?: number | string, parentElement?: BABYLON.Nullable<HTMLElement>, newColors?: {
- backgroundColor?: string;
- backgroundColorLighter?: string;
- backgroundColorLighter2?: string;
- backgroundColorLighter3?: string;
- color?: string;
- colorTop?: string;
- colorBot?: string;
- });
- readonly scene: BABYLON.Scene;
- readonly popupMode: boolean;
- /**
- * Filter the list of item present in the tree.
- * All item returned should have the given filter contained in the item id.
- */
- filterItem(filter: string): void;
- /** Display the mesh tab on the given object */
- displayObjectDetails(mesh: BABYLON.AbstractMesh): void;
- /** Clean the whole tree of item and rebuilds it */
- refresh(): void;
- /** Remove the inspector panel when it's built as a right panel:
- * remove the right panel and remove the wrapper
- */
- dispose(): void;
- /** Open the inspector in a new popup
- * Set 'firstTime' to true if there is no inspector created beforehands
- */
- openPopup(firstTime?: boolean): void;
- getActiveTabIndex(): number;
- }
- declare module INSPECTOR {
- export const PROPERTIES: {
- /** Format the given object :
- * If a format function exists, returns the result of this function.
- * If this function doesn't exists, return the object type instead
- */
- format: (obj: any) => any;
- 'type_not_defined': {
- properties: any[];
- format: () => string;
- };
- 'Vector2': {
- type: typeof BABYLON.Vector2;
- format: (vec: BABYLON.Vector2) => string;
- };
- 'Vector3': {
- type: typeof BABYLON.Vector3;
- format: (vec: BABYLON.Vector3) => string;
- };
- 'Color3': {
- type: typeof BABYLON.Color3;
- format: (color: BABYLON.Color3) => string;
- slider: {
- r: {
- min: number;
- max: number;
- step: number;
- };
- g: {
- min: number;
- max: number;
- step: number;
- };
- b: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'Color4': {
- type: typeof BABYLON.Color4;
- format: (color: BABYLON.Color4) => string;
- slider: {
- r: {
- min: number;
- max: number;
- step: number;
- };
- g: {
- min: number;
- max: number;
- step: number;
- };
- b: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'Quaternion': {
- type: typeof BABYLON.Quaternion;
- };
- 'Size': {
- type: typeof BABYLON.Size;
- format: (size: BABYLON.Size) => string;
- };
- 'Texture': {
- type: typeof BABYLON.Texture;
- format: (tex: BABYLON.Texture) => string;
- };
- 'RenderTargetTexture': {
- type: typeof BABYLON.RenderTargetTexture;
- };
- 'DynamicTexture': {
- type: typeof BABYLON.DynamicTexture;
- };
- 'BaseTexture': {
- type: typeof BABYLON.BaseTexture;
- };
- 'CubeTexture': {
- type: typeof BABYLON.CubeTexture;
- };
- 'HDRCubeTexture': {
- type: typeof BABYLON.HDRCubeTexture;
- };
- 'Sound': {
- type: typeof BABYLON.Sound;
- };
- 'ArcRotateCamera': {
- type: typeof BABYLON.ArcRotateCamera;
- slider: {
- alpha: {
- min: number;
- max: number;
- step: number;
- };
- beta: {
- min: number;
- max: number;
- step: number;
- };
- fov: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'FreeCamera': {
- type: typeof BABYLON.FreeCamera;
- slider: {
- fov: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'Scene': {
- type: typeof BABYLON.Scene;
- };
- 'TransformNode': {
- type: typeof BABYLON.TransformNode;
- format: (m: BABYLON.TransformNode) => string;
- };
- 'AbstractMesh': {
- type: typeof BABYLON.AbstractMesh;
- format: (m: BABYLON.AbstractMesh) => string;
- };
- 'Mesh': {
- type: typeof BABYLON.Mesh;
- format: (m: BABYLON.Mesh) => string;
- slider: {
- visibility: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'StandardMaterial': {
- type: typeof BABYLON.StandardMaterial;
- format: (mat: BABYLON.StandardMaterial) => string;
- slider: {
- alpha: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'PBRMaterial': {
- type: typeof BABYLON.PBRMaterial;
- slider: {
- alpha: {
- min: number;
- max: number;
- step: number;
- };
- };
- };
- 'PhysicsImpostor': {
- type: typeof BABYLON.PhysicsImpostor;
- };
- 'ImageProcessingConfiguration': {
- type: typeof BABYLON.ImageProcessingConfiguration;
- };
- 'ColorCurves': {
- type: typeof BABYLON.ColorCurves;
- };
- };
- }
- declare module INSPECTOR {
- export type GUITyping = any;
- export let guiLoaded: boolean;
- /**
- * Function that add gui objects properties to the variable PROPERTIES
- */
- export function loadGUIProperties(GUI: GUITyping): void;
- }
- declare module INSPECTOR {
- export abstract class Adapter {
- protected _obj: any;
- constructor(obj: any);
- /** Returns the name displayed in the tree */
- abstract id(): string;
- /** Returns the type of this object - displayed in the tree */
- abstract type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- abstract getProperties(): Array<PropertyLine>;
- /** Returns true if the given object correspond to this */
- correspondsTo(obj: any): boolean;
- /** Returns the adapter unique name */
- readonly name: string;
- /**
- * Returns the actual object used for this adapter
- */
- readonly object: any;
- /** Returns the list of tools available for this adapter */
- abstract getTools(): Array<AbstractTreeTool>;
- }
- }
- declare module INSPECTOR {
- export class CameraAdapter extends Adapter implements ICameraPOV {
- constructor(obj: BABYLON.Camera);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setPOV(): void;
- getCurrentActiveCamera(): string;
- }
- }
- declare module INSPECTOR {
- export class GUIAdapter extends Adapter implements IToolVisible {
- constructor(obj: any);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setVisible(b: boolean): void;
- isVisible(): boolean;
- }
- }
- declare module INSPECTOR {
- export class LightAdapter extends Adapter implements IToolVisible {
- constructor(obj: BABYLON.Light);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setVisible(b: boolean): void;
- isVisible(): boolean;
- }
- }
- declare module INSPECTOR {
- export class MaterialAdapter extends Adapter {
- constructor(obj: BABYLON.Material);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- /** No tools for a material adapter */
- getTools(): Array<AbstractTreeTool>;
- }
- }
- declare module INSPECTOR {
- export class MeshAdapter extends Adapter implements IToolVisible, IToolDebug, IToolBoundingBox, IToolInfo {
- constructor(mesh: BABYLON.Node);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setVisible(b: boolean): void;
- isVisible(): boolean;
- isBoxVisible(): boolean;
- setBoxVisible(b: boolean): boolean;
- debug(enable: boolean): void;
- /** Returns some information about this mesh */
- getInfo(): string;
- }
- }
- declare module INSPECTOR {
- export class PhysicsImpostorAdapter extends Adapter implements IToolVisible {
- constructor(obj: BABYLON.PhysicsImpostor, viewer: any);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setVisible(b: boolean): void;
- isVisible(): boolean;
- }
- }
- declare module INSPECTOR {
- export class SoundAdapter extends Adapter implements ISoundInteractions {
- constructor(obj: BABYLON.Sound);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- setPlaying(callback: Function): void;
- }
- }
- declare module INSPECTOR {
- export class TextureAdapter extends Adapter {
- constructor(obj: BABYLON.BaseTexture);
- /** Returns the name displayed in the tree */
- id(): string;
- /** Returns the type of this object - displayed in the tree */
- type(): string;
- /** Returns the list of properties to be displayed for this adapter */
- getProperties(): Array<PropertyLine>;
- getTools(): Array<AbstractTreeTool>;
- }
- }
- declare module INSPECTOR {
- export interface SortDirection {
- [property: string]: number;
- }
- export class DetailPanel extends BasicElement {
- constructor(dr?: Array<PropertyLine>);
- details: Array<PropertyLine>;
- protected _build(): void;
- /** Updates the HTML of the detail panel */
- update(_items?: Array<PropertyLine>): void;
- /** Search an element by name */
- searchByName(searchName: string): void;
- /**
- * Removes all data in the detail panel but keep the header row
- */
- clean(): void;
- /**
- * Clean the rows only
- */
- cleanRow(): void;
- /** Overrides basicelement.dispose */
- dispose(): void;
- }
- }
- declare module INSPECTOR {
- /**
- * A property is a link between a data (string) and an object.
- */
- export class Property {
- constructor(prop: string, obj: any, parentObj?: any);
- readonly name: string;
- value: any;
- readonly type: string;
- obj: any;
- }
- }
- declare module INSPECTOR {
- export class PropertyFormatter {
- /**
- * Format the value of the given property of the given object.
- */
- static format(obj: any, prop: string): string;
- }
- /**
- * A property line represents a line in the detail panel. This line is composed of :
- * - a name (the property name)
- * - a value if this property is of a type 'simple' : string, number, boolean, color, texture
- * - the type of the value if this property is of a complex type (Vector2, BABYLON.Size, ...)
- * - a ID if defined (otherwise an empty string is displayed)
- * The original object is sent to the value object who will update it at will.
- *
- * A property line can contain OTHER property line objects in the case of a complex type.
- * If this instance has no link to other instances, its type is ALWAYS a simple one (see above).
- *
- */
- export class PropertyLine {
- constructor(prop: Property, parent?: BABYLON.Nullable<PropertyLine>, level?: number);
- validateInput(value: any, forceupdate?: boolean): void;
- /** Retrieve the correct object from its parent.
- * If no parent exists, returns the property value.
- * This method is used at each update in case the property object is removed from the original object
- * (example : mesh.position = new BABYLON.Vector3 ; the original vector3 object is deleted from the mesh).
- */
- updateObject(): any;
- readonly name: string;
- readonly value: any;
- readonly type: string;
- /** Delete properly this property line.
- * Removes itself from the scheduler.
- * Dispose all viewer element (color, texture...)
- */
- dispose(): void;
- /**
- * Update the property division with the new property value.
- * If this property is complex, update its child, otherwise update its text content
- */
- update(): void;
- toHtml(): HTMLElement;
- closeDetails(): void;
- }
- }
- declare module INSPECTOR {
- /**
- * Represents a html div element.
- * The div is built when an instance of BasicElement is created.
- */
- export abstract class BasicElement {
- protected _div: HTMLDivElement;
- constructor();
- /**
- * Returns the div element
- */
- toHtml(): HTMLDivElement;
- /**
- * Build the html element
- */
- protected _build(): void;
- abstract update(data?: any): void;
- /** Default dispose method if needed */
- dispose(): void;
- }
- }
- declare module INSPECTOR {
- /**
- * Display a very small div corresponding to the given color
- */
- export class ColorElement extends BasicElement {
- constructor(color: BABYLON.Color4 | BABYLON.Color3);
- update(color?: BABYLON.Color4 | BABYLON.Color3): void;
- }
- }
- declare module INSPECTOR {
- /**
- * Represents a html div element.
- * The div is built when an instance of BasicElement is created.
- */
- export class ColorPickerElement extends BasicElement {
- protected _input: HTMLInputElement;
- constructor(color: BABYLON.Color4 | BABYLON.Color3, propertyLine: PropertyLine);
- update(color?: BABYLON.Color4 | BABYLON.Color3): void;
- }
- }
- declare module INSPECTOR {
- /**
- * Display a very small div. A new canvas is created, with a new js scene, containing only the
- * cube texture in a cube
- */
- export class CubeTextureElement extends BasicElement {
- protected _scene: BABYLON.Scene;
- protected _cube: BABYLON.Mesh;
- protected _textureUrl: string;
- /** The texture given as a parameter should be cube. */
- constructor(tex: BABYLON.Texture);
- update(tex?: BABYLON.Texture): void;
- /** Creates the box */
- protected _populateScene(): void;
- /** Removes properly the babylon engine */
- dispose(): void;
- }
- }
- declare module INSPECTOR {
- /**
- * Display a very small div. A new canvas is created, with a new js scene, containing only the
- * cube texture in a cube
- */
- export class HDRCubeTextureElement extends CubeTextureElement {
- /** The texture given as a parameter should be cube. */
- constructor(tex: BABYLON.Texture);
- /** Creates the box */
- protected _populateScene(): void;
- }
- }
- declare module INSPECTOR {
- /**
- * A search bar can be used to filter elements in the tree panel.
- * At each keypress on the input, the treepanel will be filtered.
- */
- export class SearchBar extends BasicElement {
- constructor(tab: PropertyTab);
- /** Delete all characters typped in the input element */
- reset(): void;
- update(): void;
- }
- export class SearchBarDetails extends BasicElement {
- constructor(tab: DetailPanel);
- /** Delete all characters typped in the input element */
- reset(): void;
- update(): void;
- }
- }
- declare module INSPECTOR {
- /**
- * Display a very small div corresponding to the given texture. On mouse over, display the full image
- */
- export class TextureElement extends BasicElement {
- constructor(tex: BABYLON.Texture);
- update(tex?: BABYLON.Texture): void;
- }
- }
- declare module INSPECTOR {
- /**
- * Creates a tooltip for the parent of the given html element
- */
- export class Tooltip {
- constructor(elem: HTMLElement, tip: string, attachTo?: BABYLON.Nullable<HTMLElement>);
- }
- }
- declare module INSPECTOR {
- export class Helpers {
- /**
- * Returns the type of the given object. First
- * uses getClassName. If nothing is returned, used the type of the constructor
- */
- static GET_TYPE(obj: any): string;
- /**
- * Returns true if the user browser is edge.
- */
- static IsBrowserEdge(): boolean;
- /**
- * Returns true if the user browser is IE.
- */
- static IsBrowserIE(): boolean;
- /** Send the event which name is given in parameter to the window */
- static SEND_EVENT(eventName: string): void;
- /** Returns the given number with 2 decimal number max if a decimal part exists */
- static Trunc(nb: number): number;
- /**
- * Useful function used to create a div
- */
- static CreateDiv(className?: BABYLON.Nullable<string>, parent?: HTMLElement, tooltip?: string): HTMLDivElement;
- /**
- * Useful function used to create a input
- */
- static CreateInput(className?: string, parent?: HTMLElement, tooltip?: string): HTMLInputElement;
- static CreateElement(element: string, className?: BABYLON.Nullable<string>, parent?: HTMLElement, tooltip?: string): HTMLElement;
- /**
- * Removes all children of the given div.
- */
- static CleanDiv(div: HTMLElement): void;
- /**
- * 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)
- */
- static Css(elem: HTMLElement, cssAttribute: string): string;
- static LoadScript(): void;
- static IsSystemName(name: string): boolean;
- /**
- * Return an array of PropertyLine for an obj
- * @param obj
- */
- static GetAllLinesProperties(obj: any): Array<PropertyLine>;
- /**
- * Returns an array of string corresponding to tjhe list of properties of the object to be displayed
- * @param obj
- */
- static GetAllLinesPropertiesAsString(obj: any, dontTakeThis?: Array<string>): Array<string>;
- static Capitalize(str: string): string;
- }
- }
- declare module INSPECTOR {
- export class Scheduler {
- /** Is this scheduler in pause ? */
- pause: boolean;
- /** All properties are refreshed every 250ms */
- static REFRESH_TIME: number;
- constructor();
- static getInstance(): Scheduler;
- /** Add a property line to be updated every X ms */
- add(prop: PropertyLine): void;
- /** Removes the given property from the list of properties to update */
- remove(prop: PropertyLine): void;
- dispose(): void;
- }
- }
- declare module INSPECTOR {
- export class CameraTab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module INSPECTOR {
- /**
- * The console tab will have two features :
- * - hook all console.log call and display them in this panel (and in the browser console as well)
- * - display all Babylon logs (called with Tools.Log...)
- */
- export class ConsoleTab extends Tab {
- constructor(tabbar: TabBar, insp: Inspector);
- /** Overrides super.dispose */
- dispose(): void;
- active(b: boolean): void;
- }
- }
- declare module INSPECTOR {
- export class GLTFTab extends Tab {
- static readonly IsSupported: boolean;
- /** @hidden */
- static _Initialize(): void;
- constructor(tabbar: TabBar, inspector: Inspector);
- dispose(): void;
- /** @hidden */
- static _GetLoaderDefaultsAsync(): Promise<any>;
- }
- }
- declare module INSPECTOR {
- export class GUITab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module INSPECTOR {
- export class LightTab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module INSPECTOR {
- export class MaterialTab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module INSPECTOR {
- export class MeshTab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module INSPECTOR {
- export class PhysicsTab extends PropertyTab {
- viewer: any;
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module INSPECTOR {
- /**
- * A Property tab can creates two panels:
- * a tree panel and a detail panel,
- * in which properties will be displayed.
- * Both panels are separated by a resize bar
- */
- export abstract class PropertyTab extends Tab {
- protected _inspector: Inspector;
- /** The panel containing a list of items */
- protected _treePanel: HTMLDivElement;
- /** The panel containing a list if properties corresponding to an item */
- protected _detailsPanel: DetailPanel;
- protected _treeItems: Array<TreeItem>;
- protected _searchBar: SearchBar;
- constructor(tabbar: TabBar, name: string, insp: Inspector);
- /** Overrides dispose */
- dispose(): void;
- update(_items?: Array<TreeItem>): void;
- /** Display the details of the given item */
- displayDetails(item: TreeItem): void;
- /** Select an item in the tree */
- select(item: TreeItem): void;
- /** Set the given item as active in the tree */
- activateNode(item: TreeItem): void;
- /** Returns the treeitem corersponding to the given obj, null if not found */
- getItemFor(_obj: any): BABYLON.Nullable<TreeItem>;
- filter(filter: string): void;
- /** Builds the tree panel */
- protected abstract _getTree(): Array<TreeItem>;
- }
- }
- declare module INSPECTOR {
- export class SceneTab extends Tab {
- constructor(tabbar: TabBar, insp: Inspector);
- /** Overrides super.dispose */
- dispose(): void;
- }
- }
- declare module INSPECTOR {
- export class SoundTab extends PropertyTab {
- constructor(tabbar: TabBar, inspector: Inspector);
- protected _getTree(): Array<TreeItem>;
- }
- }
- declare module INSPECTOR {
- export class StatsTab extends Tab {
- constructor(tabbar: TabBar, insp: Inspector);
- dispose(): void;
- active(b: boolean): void;
- }
- }
- declare module INSPECTOR {
- export abstract class Tab extends BasicElement {
- protected _tabbar: TabBar;
- name: string;
- protected _isActive: boolean;
- protected _panel: HTMLDivElement;
- constructor(tabbar: TabBar, name: string);
- /** True if the tab is active, false otherwise */
- isActive(): boolean;
- protected _build(): void;
- /** Set this tab as active or not, depending on the current state */
- active(b: boolean): void;
- update(): void;
- /** Creates the tab panel for this tab. */
- getPanel(): HTMLElement;
- /** Add this in the propertytab with the searchbar */
- filter(str: string): void;
- /** Dispose properly this tab */
- abstract dispose(): void;
- /** Select an item in the tree */
- select(item: TreeItem): void;
- /**
- * Returns the total width in pixel of this tab, 0 by default
- */
- getPixelWidth(): number;
- }
- }
- declare module INSPECTOR {
- /**
- * A tab bar will contains each view the inspector can have : Canvas2D, Meshes...
- * The default active tab is the first one of the list.
- */
- export class TabBar extends BasicElement {
- constructor(inspector: Inspector, initialTab?: number | string);
- update(): void;
- protected _build(): void;
- /** Dispose the current tab, set the given tab as active, and refresh the treeview */
- switchTab(tab: Tab): void;
- /** Display the mesh tab.
- * If a parameter is given, the given mesh details are displayed
- */
- switchMeshTab(mesh?: BABYLON.AbstractMesh): void;
- /** Returns the active tab */
- getActiveTab(): BABYLON.Nullable<Tab>;
- getActiveTabIndex(): number;
- getTabIndex(name: string): number;
- readonly inspector: Inspector;
- /**
- * Returns the total width in pixel of the tabbar,
- * that corresponds to the sum of the width of each visible tab + toolbar width
- */
- getPixelWidth(): number;
- /** Display the remaining icon or not depending on the tabbar width.
- * This function should be called each time the inspector width is updated
- */
- updateWidth(): void;
- }
- }
- declare module INSPECTOR {
- export class TextureTab extends Tab {
- static DDSPreview: DDSPreview;
- /** The panel containing a list of items */
- protected _treePanel: HTMLElement;
- protected _treeItems: Array<TreeItem>;
- constructor(tabbar: TabBar, inspector: Inspector);
- dispose(): void;
- update(_items?: Array<TreeItem>): void;
- /** Display the details of the given item */
- displayDetails(item: TreeItem): void;
- /** Select an item in the tree */
- select(item: TreeItem): void;
- /** Set the given item as active in the tree */
- activateNode(item: TreeItem): void;
- }
- class DDSPreview {
- canvas: HTMLCanvasElement | null;
- constructor(AdapterItem: TextureAdapter);
- insertPreview(AdapterItem: TextureAdapter): void;
- dispose(): void;
- }
- }
- declare module INSPECTOR {
- export class ToolsTab extends Tab {
- constructor(tabbar: TabBar, insp: Inspector);
- dispose(): void;
- }
- }
- declare module INSPECTOR {
- export class TreeItem extends BasicElement {
- children: Array<TreeItem>;
- constructor(tab: Tab, obj: Adapter);
- /** Returns the item ID == its adapter ID */
- readonly id: string;
- /** Add the given item as a child of this one */
- add(child: TreeItem): void;
- /**
- * Returns the original adapter
- */
- readonly adapter: Adapter;
- /**
- * Function used to compare this item to another tree item.
- * Returns the alphabetical sort of the adapter ID
- */
- compareTo(item: TreeItem): number;
- /** Returns true if the given obj correspond to the adapter linked to this tree item */
- correspondsTo(obj: any): boolean;
- /** hide all children of this item */
- fold(): void;
- /** Show all children of this item */
- unfold(): void;
- /** Build the HTML of this item */
- protected _build(): void;
- /**
- * Returns one HTML element (.details) containing all details of this primitive
- */
- getDetails(): Array<PropertyLine>;
- update(): void;
- /**
- * Add an event listener on the item :
- * - one click display details
- */
- protected _addEvent(): void;
- /** Set this item as active (background lighter) in the tree panel */
- active(b: boolean): void;
- getDiv(): HTMLDivElement;
- }
- }
- declare module INSPECTOR {
- export abstract class AbstractTreeTool {
- protected _elem: HTMLElement;
- /** Is the tool enabled ? */
- protected _on: boolean;
- constructor();
- toHtml(): HTMLElement;
- protected _addEvents(): void;
- /**
- * Action launched when clicked on this element
- * Should be overrided
- */
- protected action(): void;
- }
- }
- declare module INSPECTOR {
- /** Any object implementing this interface should
- * provide methods to toggle its bounding box
- */
- export interface IToolBoundingBox {
- isBoxVisible: () => boolean;
- setBoxVisible: (b: boolean) => void;
- }
- /**
- * Checkbox to display/hide the primitive
- */
- export class BoundingBox extends AbstractTreeTool {
- constructor(obj: IToolBoundingBox);
- protected action(): void;
- }
- }
- declare module INSPECTOR {
- export interface ICameraPOV {
- setPOV: () => void;
- getCurrentActiveCamera: () => string;
- id: () => string;
- }
- /**
- *
- */
- export class CameraPOV extends AbstractTreeTool {
- constructor(camera: ICameraPOV);
- protected action(): void;
- }
- }
- declare module INSPECTOR {
- /** Any object implementing this interface should
- * provide methods to toggle its visibility
- */
- export interface IToolVisible {
- isVisible: () => boolean;
- setVisible: (b: boolean) => void;
- }
- /**
- * Checkbox to display/hide the primitive
- */
- export class Checkbox extends AbstractTreeTool {
- constructor(obj: IToolVisible);
- protected action(): void;
- }
- }
- declare module INSPECTOR {
- /** Any object implementing this interface should
- * provide methods to toggle a debug area
- */
- export interface IToolDebug {
- debug: (b: boolean) => void;
- }
- export class DebugArea extends AbstractTreeTool {
- constructor(obj: IToolDebug);
- protected action(): void;
- }
- }
- declare module INSPECTOR {
- /** Any object implementing this interface should
- * provide methods to retrieve its info
- */
- export interface IToolInfo {
- getInfo: () => string;
- }
- /**
- * Checkbox to display/hide the primitive
- */
- export class Info extends AbstractTreeTool {
- constructor(obj: IToolInfo);
- protected action(): void;
- }
- }
- declare module INSPECTOR {
- export interface ISoundInteractions {
- setPlaying: (callback: Function) => void;
- }
- /**
- *
- */
- export class SoundInteractions extends AbstractTreeTool {
- constructor(playSound: ISoundInteractions);
- protected action(): void;
- }
- }
|