babylon.inspector.d.ts 169 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409
  1. /// <reference types="react" />
  2. declare module INSPECTOR {
  3. export class PropertyChangedEvent {
  4. object: any;
  5. property: string;
  6. value: any;
  7. initialValue: any;
  8. allowNullValue?: boolean;
  9. }
  10. }
  11. declare module INSPECTOR {
  12. export class ReplayRecorder {
  13. private _sceneRecorder;
  14. private _isRecording;
  15. get isRecording(): boolean;
  16. cancel(): void;
  17. trackScene(scene: BABYLON.Scene): void;
  18. applyDelta(json: any, scene: BABYLON.Scene): void;
  19. export(): void;
  20. }
  21. }
  22. declare module INSPECTOR {
  23. export class GlobalState {
  24. onSelectionChangedObservable: BABYLON.Observable<any>;
  25. onPropertyChangedObservable: BABYLON.Observable<PropertyChangedEvent>;
  26. onInspectorClosedObservable: BABYLON.Observable<BABYLON.Scene>;
  27. onTabChangedObservable: BABYLON.Observable<number>;
  28. onSelectionRenamedObservable: BABYLON.Observable<void>;
  29. onPluginActivatedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync>>;
  30. onNewSceneObservable: BABYLON.Observable<BABYLON.Scene>;
  31. sceneImportDefaults: {
  32. [key: string]: any;
  33. };
  34. validationResults: BABYLON.Nullable<BABYLON.GLTF2.IGLTFValidationResults>;
  35. onValidationResultsUpdatedObservable: BABYLON.Observable<BABYLON.Nullable<BABYLON.GLTF2.IGLTFValidationResults>>;
  36. onExtensionLoadedObservable: BABYLON.Observable<import("babylonjs-loaders/glTF/index").IGLTFLoaderExtension>;
  37. glTFLoaderExtensionDefaults: {
  38. [name: string]: {
  39. [key: string]: any;
  40. };
  41. };
  42. glTFLoaderDefaults: {
  43. [key: string]: any;
  44. };
  45. glTFLoaderExtensions: {
  46. [key: string]: import("babylonjs-loaders/glTF/index").IGLTFLoaderExtension;
  47. };
  48. blockMutationUpdates: boolean;
  49. selectedLineContainerTitles: Array<string>;
  50. selectedLineContainerTitlesNoFocus: Array<string>;
  51. recorder: ReplayRecorder;
  52. private _onlyUseEulers;
  53. get onlyUseEulers(): boolean;
  54. set onlyUseEulers(value: boolean);
  55. private _ignoreBackfacesForPicking;
  56. get ignoreBackfacesForPicking(): boolean;
  57. set ignoreBackfacesForPicking(value: boolean);
  58. init(propertyChangedObservable: BABYLON.Observable<PropertyChangedEvent>): void;
  59. prepareGLTFPlugin(loader: import("babylonjs-loaders/glTF/index").GLTFFileLoader): void;
  60. resetGLTFValidationResults(): void;
  61. lightGizmos: Array<BABYLON.LightGizmo>;
  62. enableLightGizmo(light: BABYLON.Light, enable?: boolean): void;
  63. cameraGizmos: Array<BABYLON.CameraGizmo>;
  64. enableCameraGizmo(camera: BABYLON.Camera, enable?: boolean): void;
  65. }
  66. }
  67. declare module INSPECTOR {
  68. export interface IPaneComponentProps {
  69. title: string;
  70. scene: BABYLON.Scene;
  71. selectedEntity?: any;
  72. onSelectionChangedObservable?: BABYLON.Observable<any>;
  73. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  74. globalState: GlobalState;
  75. }
  76. export class PaneComponent extends React.Component<IPaneComponentProps, {
  77. tag: any;
  78. }> {
  79. constructor(props: IPaneComponentProps);
  80. render(): JSX.Element | null;
  81. }
  82. }
  83. declare module INSPECTOR {
  84. interface ITabsComponentProps {
  85. children: any[];
  86. selectedIndex: number;
  87. onSelectedIndexChange: (value: number) => void;
  88. }
  89. export class TabsComponent extends React.Component<ITabsComponentProps> {
  90. constructor(props: ITabsComponentProps);
  91. onSelect(index: number): void;
  92. renderLabel(child: PaneComponent, index: number): JSX.Element;
  93. render(): JSX.Element;
  94. }
  95. }
  96. declare module INSPECTOR {
  97. interface ITextLineComponentProps {
  98. label?: string;
  99. value?: string;
  100. color?: string;
  101. underline?: boolean;
  102. onLink?: () => void;
  103. url?: string;
  104. ignoreValue?: boolean;
  105. additionalClass?: string;
  106. }
  107. export class TextLineComponent extends React.Component<ITextLineComponentProps> {
  108. constructor(props: ITextLineComponentProps);
  109. onLink(): void;
  110. renderContent(): JSX.Element | null;
  111. render(): JSX.Element;
  112. }
  113. }
  114. declare module INSPECTOR {
  115. interface ILineContainerComponentProps {
  116. title: string;
  117. children: any[] | any;
  118. closed?: boolean;
  119. }
  120. export class LineContainerComponent extends React.Component<ILineContainerComponentProps, {
  121. isExpanded: boolean;
  122. }> {
  123. constructor(props: ILineContainerComponentProps);
  124. switchExpandedState(): void;
  125. renderHeader(): JSX.Element;
  126. render(): JSX.Element;
  127. }
  128. }
  129. declare module INSPECTOR {
  130. interface IValueLineComponentProps {
  131. label: string;
  132. value: number;
  133. color?: string;
  134. fractionDigits?: number;
  135. units?: string;
  136. }
  137. export class ValueLineComponent extends React.Component<IValueLineComponentProps> {
  138. constructor(props: IValueLineComponentProps);
  139. render(): JSX.Element;
  140. }
  141. }
  142. declare module INSPECTOR {
  143. export interface IBooleanLineComponentProps {
  144. label: string;
  145. value: boolean;
  146. }
  147. export class BooleanLineComponent extends React.Component<IBooleanLineComponentProps> {
  148. constructor(props: IBooleanLineComponentProps);
  149. render(): JSX.Element;
  150. }
  151. }
  152. declare module INSPECTOR {
  153. export class StatisticsTabComponent extends PaneComponent {
  154. private _sceneInstrumentation;
  155. private _engineInstrumentation;
  156. private _timerIntervalId;
  157. constructor(props: IPaneComponentProps);
  158. componentWillUnmount(): void;
  159. render(): JSX.Element | null;
  160. }
  161. }
  162. declare module INSPECTOR {
  163. export class PropertyChangedEvent {
  164. object: any;
  165. property: string;
  166. value: any;
  167. initialValue: any;
  168. allowNullValue?: boolean;
  169. }
  170. }
  171. declare module INSPECTOR {
  172. export interface ICheckBoxLineComponentProps {
  173. label: string;
  174. target?: any;
  175. propertyName?: string;
  176. isSelected?: () => boolean;
  177. onSelect?: (value: boolean) => void;
  178. onValueChanged?: () => void;
  179. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  180. disabled?: boolean;
  181. }
  182. export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponentProps, {
  183. isSelected: boolean;
  184. isDisabled?: boolean;
  185. }> {
  186. private static _UniqueIdSeed;
  187. private _uniqueId;
  188. private _localChange;
  189. constructor(props: ICheckBoxLineComponentProps);
  190. shouldComponentUpdate(nextProps: ICheckBoxLineComponentProps, nextState: {
  191. isSelected: boolean;
  192. isDisabled: boolean;
  193. }): boolean;
  194. onChange(): void;
  195. render(): JSX.Element;
  196. }
  197. }
  198. declare module INSPECTOR {
  199. interface IRenderGridPropertyGridComponentProps {
  200. globalState: GlobalState;
  201. scene: BABYLON.Scene;
  202. }
  203. export class RenderGridPropertyGridComponent extends React.Component<IRenderGridPropertyGridComponentProps, {
  204. isEnabled: boolean;
  205. }> {
  206. private _gridMesh;
  207. constructor(props: IRenderGridPropertyGridComponentProps);
  208. componentDidMount(): void;
  209. addOrRemoveGrid(): void;
  210. render(): JSX.Element;
  211. }
  212. }
  213. declare module INSPECTOR {
  214. export class DebugTabComponent extends PaneComponent {
  215. private _physicsViewersEnabled;
  216. constructor(props: IPaneComponentProps);
  217. switchPhysicsViewers(): void;
  218. render(): JSX.Element | null;
  219. }
  220. }
  221. declare module INSPECTOR {
  222. /**
  223. * Class used to provide lock mechanism
  224. */
  225. export class LockObject {
  226. /**
  227. * Gets or set if the lock is engaged
  228. */
  229. lock: boolean;
  230. }
  231. }
  232. declare module INSPECTOR {
  233. interface IFloatLineComponentProps {
  234. label: string;
  235. target: any;
  236. propertyName: string;
  237. lockObject?: LockObject;
  238. onChange?: (newValue: number) => void;
  239. isInteger?: boolean;
  240. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  241. additionalClass?: string;
  242. step?: string;
  243. digits?: number;
  244. useEuler?: boolean;
  245. min?: number;
  246. max?: number;
  247. smallUI?: boolean;
  248. onEnter?: (newValue: number) => void;
  249. }
  250. export class FloatLineComponent extends React.Component<IFloatLineComponentProps, {
  251. value: string;
  252. }> {
  253. private _localChange;
  254. private _store;
  255. constructor(props: IFloatLineComponentProps);
  256. componentWillUnmount(): void;
  257. shouldComponentUpdate(nextProps: IFloatLineComponentProps, nextState: {
  258. value: string;
  259. }): boolean;
  260. raiseOnPropertyChanged(newValue: number, previousValue: number): void;
  261. updateValue(valueString: string): void;
  262. lock(): void;
  263. unlock(): void;
  264. render(): JSX.Element;
  265. }
  266. }
  267. declare module INSPECTOR {
  268. interface ISliderLineComponentProps {
  269. label: string;
  270. target?: any;
  271. propertyName?: string;
  272. minimum: number;
  273. maximum: number;
  274. step: number;
  275. directValue?: number;
  276. useEuler?: boolean;
  277. onChange?: (value: number) => void;
  278. onInput?: (value: number) => void;
  279. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  280. decimalCount?: number;
  281. margin?: boolean;
  282. }
  283. export class SliderLineComponent extends React.Component<ISliderLineComponentProps, {
  284. value: number;
  285. }> {
  286. private _localChange;
  287. constructor(props: ISliderLineComponentProps);
  288. shouldComponentUpdate(nextProps: ISliderLineComponentProps, nextState: {
  289. value: number;
  290. }): boolean;
  291. onChange(newValueString: any): void;
  292. onInput(newValueString: any): void;
  293. prepareDataToRead(value: number): number;
  294. render(): JSX.Element;
  295. }
  296. }
  297. declare module INSPECTOR {
  298. export const Null_Value: number;
  299. export class ListLineOption {
  300. label: string;
  301. value: number;
  302. selected?: boolean;
  303. }
  304. export interface IOptionsLineComponentProps {
  305. label: string;
  306. target: any;
  307. propertyName: string;
  308. options: ListLineOption[];
  309. noDirectUpdate?: boolean;
  310. onSelect?: (value: number) => void;
  311. extractValue?: () => number;
  312. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  313. allowNullValue?: boolean;
  314. }
  315. export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
  316. value: number;
  317. }> {
  318. private _localChange;
  319. private remapValueIn;
  320. private remapValueOut;
  321. constructor(props: IOptionsLineComponentProps);
  322. shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
  323. value: number;
  324. }): boolean;
  325. raiseOnPropertyChanged(newValue: number, previousValue: number): void;
  326. updateValue(valueString: string): void;
  327. render(): JSX.Element;
  328. }
  329. }
  330. declare module INSPECTOR {
  331. interface INumericInputComponentProps {
  332. label: string;
  333. value: number;
  334. step?: number;
  335. onChange: (value: number) => void;
  336. precision?: number;
  337. }
  338. export class NumericInputComponent extends React.Component<INumericInputComponentProps, {
  339. value: string;
  340. }> {
  341. static defaultProps: {
  342. step: number;
  343. };
  344. private _localChange;
  345. constructor(props: INumericInputComponentProps);
  346. shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
  347. value: string;
  348. }): boolean;
  349. updateValue(evt: any): void;
  350. onBlur(): void;
  351. render(): JSX.Element;
  352. }
  353. }
  354. declare module INSPECTOR {
  355. export interface IColorComponentEntryProps {
  356. value: number;
  357. label: string;
  358. max?: number;
  359. min?: number;
  360. onChange: (value: number) => void;
  361. }
  362. export class ColorComponentEntry extends React.Component<IColorComponentEntryProps> {
  363. constructor(props: IColorComponentEntryProps);
  364. updateValue(valueString: string): void;
  365. render(): JSX.Element;
  366. }
  367. }
  368. declare module INSPECTOR {
  369. export interface IHexColorProps {
  370. value: string;
  371. expectedLength: number;
  372. onChange: (value: string) => void;
  373. }
  374. export class HexColor extends React.Component<IHexColorProps, {
  375. hex: string;
  376. }> {
  377. constructor(props: IHexColorProps);
  378. shouldComponentUpdate(nextProps: IHexColorProps, nextState: {
  379. hex: string;
  380. }): boolean;
  381. updateHexValue(valueString: string): void;
  382. render(): JSX.Element;
  383. }
  384. }
  385. declare module INSPECTOR {
  386. /**
  387. * Interface used to specify creation options for color picker
  388. */
  389. export interface IColorPickerProps {
  390. color: BABYLON.Color3 | BABYLON.Color4;
  391. debugMode?: boolean;
  392. onColorChanged?: (color: BABYLON.Color3 | BABYLON.Color4) => void;
  393. }
  394. /**
  395. * Interface used to specify creation options for color picker
  396. */
  397. export interface IColorPickerState {
  398. color: BABYLON.Color3;
  399. alpha: number;
  400. }
  401. /**
  402. * Class used to create a color picker
  403. */
  404. export class BABYLON.GUI.ColorPicker extends React.Component<IColorPickerProps, IColorPickerState> {
  405. private _saturationRef;
  406. private _hueRef;
  407. private _isSaturationPointerDown;
  408. private _isHuePointerDown;
  409. constructor(props: IColorPickerProps);
  410. onSaturationPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
  411. onSaturationPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
  412. onSaturationPointerMove(evt: React.PointerEvent<HTMLDivElement>): void;
  413. onHuePointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
  414. onHuePointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
  415. onHuePointerMove(evt: React.PointerEvent<HTMLDivElement>): void;
  416. private _evaluateSaturation;
  417. private _evaluateHue;
  418. componentDidUpdate(): void;
  419. raiseOnColorChanged(): void;
  420. render(): JSX.Element;
  421. }
  422. }
  423. declare module INSPECTOR {
  424. export interface IColorPickerComponentProps {
  425. value: BABYLON.Color4 | BABYLON.Color3;
  426. onColorChanged: (newOne: string) => void;
  427. }
  428. interface IColorPickerComponentState {
  429. pickerEnabled: boolean;
  430. color: BABYLON.Color3 | BABYLON.Color4;
  431. hex: string;
  432. }
  433. export class ColorPickerLineComponent extends React.Component<IColorPickerComponentProps, IColorPickerComponentState> {
  434. private _floatRef;
  435. private _floatHostRef;
  436. constructor(props: IColorPickerComponentProps);
  437. syncPositions(): void;
  438. shouldComponentUpdate(nextProps: IColorPickerComponentProps, nextState: IColorPickerComponentState): boolean;
  439. componentDidUpdate(): void;
  440. componentDidMount(): void;
  441. render(): JSX.Element;
  442. }
  443. }
  444. declare module INSPECTOR {
  445. export interface IColor3LineComponentProps {
  446. label: string;
  447. target: any;
  448. propertyName: string;
  449. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  450. isLinear?: boolean;
  451. }
  452. export class Color3LineComponent extends React.Component<IColor3LineComponentProps, {
  453. isExpanded: boolean;
  454. color: BABYLON.Color3;
  455. }> {
  456. private _localChange;
  457. constructor(props: IColor3LineComponentProps);
  458. shouldComponentUpdate(nextProps: IColor3LineComponentProps, nextState: {
  459. color: BABYLON.Color3;
  460. }): boolean;
  461. setPropertyValue(newColor: BABYLON.Color3): void;
  462. onChange(newValue: string): void;
  463. switchExpandState(): void;
  464. raiseOnPropertyChanged(previousValue: BABYLON.Color3): void;
  465. updateStateR(value: number): void;
  466. updateStateG(value: number): void;
  467. updateStateB(value: number): void;
  468. copyToClipboard(): void;
  469. render(): JSX.Element;
  470. }
  471. }
  472. declare module INSPECTOR {
  473. interface IVector3LineComponentProps {
  474. label: string;
  475. target: any;
  476. propertyName: string;
  477. step?: number;
  478. onChange?: (newvalue: BABYLON.Vector3) => void;
  479. useEuler?: boolean;
  480. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  481. noSlider?: boolean;
  482. }
  483. export class Vector3LineComponent extends React.Component<IVector3LineComponentProps, {
  484. isExpanded: boolean;
  485. value: BABYLON.Vector3;
  486. }> {
  487. static defaultProps: {
  488. step: number;
  489. };
  490. private _localChange;
  491. constructor(props: IVector3LineComponentProps);
  492. getCurrentValue(): any;
  493. shouldComponentUpdate(nextProps: IVector3LineComponentProps, nextState: {
  494. isExpanded: boolean;
  495. value: BABYLON.Vector3;
  496. }): boolean;
  497. switchExpandState(): void;
  498. raiseOnPropertyChanged(previousValue: BABYLON.Vector3): void;
  499. updateVector3(): void;
  500. updateStateX(value: number): void;
  501. updateStateY(value: number): void;
  502. updateStateZ(value: number): void;
  503. render(): JSX.Element;
  504. }
  505. }
  506. declare module INSPECTOR {
  507. interface IQuaternionLineComponentProps {
  508. label: string;
  509. target: any;
  510. useEuler?: boolean;
  511. propertyName: string;
  512. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  513. }
  514. export class QuaternionLineComponent extends React.Component<IQuaternionLineComponentProps, {
  515. isExpanded: boolean;
  516. value: BABYLON.Quaternion;
  517. eulerValue: BABYLON.Vector3;
  518. }> {
  519. private _localChange;
  520. constructor(props: IQuaternionLineComponentProps);
  521. _checkRoundCircle(a: number, b: number): boolean;
  522. shouldComponentUpdate(nextProps: IQuaternionLineComponentProps, nextState: {
  523. isExpanded: boolean;
  524. value: BABYLON.Quaternion;
  525. eulerValue: BABYLON.Vector3;
  526. }): boolean;
  527. switchExpandState(): void;
  528. raiseOnPropertyChanged(currentValue: BABYLON.Quaternion, previousValue: BABYLON.Quaternion): void;
  529. updateQuaternion(): void;
  530. updateStateX(value: number): void;
  531. updateStateY(value: number): void;
  532. updateStateZ(value: number): void;
  533. updateStateW(value: number): void;
  534. updateQuaternionFromEuler(): void;
  535. updateStateEulerX(value: number): void;
  536. updateStateEulerY(value: number): void;
  537. updateStateEulerZ(value: number): void;
  538. render(): JSX.Element;
  539. }
  540. }
  541. declare module INSPECTOR {
  542. interface ITextInputLineComponentProps {
  543. label: string;
  544. lockObject: LockObject;
  545. target?: any;
  546. propertyName?: string;
  547. value?: string;
  548. onChange?: (value: string) => void;
  549. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  550. }
  551. export class TextInputLineComponent extends React.Component<ITextInputLineComponentProps, {
  552. value: string;
  553. }> {
  554. private _localChange;
  555. constructor(props: ITextInputLineComponentProps);
  556. componentWillUnmount(): void;
  557. shouldComponentUpdate(nextProps: ITextInputLineComponentProps, nextState: {
  558. value: string;
  559. }): boolean;
  560. raiseOnPropertyChanged(newValue: string, previousValue: string): void;
  561. updateValue(value: string): void;
  562. render(): JSX.Element;
  563. }
  564. }
  565. declare module INSPECTOR {
  566. interface ICustomPropertyGridComponentProps {
  567. globalState: GlobalState;
  568. target: any;
  569. lockObject: LockObject;
  570. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  571. }
  572. export class CustomPropertyGridComponent extends React.Component<ICustomPropertyGridComponentProps, {
  573. mode: number;
  574. }> {
  575. constructor(props: ICustomPropertyGridComponentProps);
  576. renderInspectable(inspectable: BABYLON.IInspectable): JSX.Element | null;
  577. render(): JSX.Element | null;
  578. }
  579. }
  580. declare module INSPECTOR {
  581. export interface IButtonLineComponentProps {
  582. label: string;
  583. onClick: () => void;
  584. }
  585. export class ButtonLineComponent extends React.Component<IButtonLineComponentProps> {
  586. constructor(props: IButtonLineComponentProps);
  587. render(): JSX.Element;
  588. }
  589. }
  590. declare module INSPECTOR {
  591. interface IAnimationGridComponentProps {
  592. globalState: GlobalState;
  593. animatable: BABYLON.IAnimatable;
  594. scene: BABYLON.Scene;
  595. lockObject: LockObject;
  596. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  597. }
  598. export class AnimationGridComponent extends React.Component<IAnimationGridComponentProps, {
  599. currentFrame: number;
  600. }> {
  601. private _animations;
  602. private _ranges;
  603. private _mainAnimatable;
  604. private _onBeforeRenderObserver;
  605. private _isPlaying;
  606. private timelineRef;
  607. private _animationControl;
  608. constructor(props: IAnimationGridComponentProps);
  609. playOrPause(): void;
  610. componentDidMount(): void;
  611. componentWillUnmount(): void;
  612. onCurrentFrameChange(value: number): void;
  613. onChangeFromOrTo(): void;
  614. render(): JSX.Element;
  615. }
  616. }
  617. declare module INSPECTOR {
  618. interface ICommonMaterialPropertyGridComponentProps {
  619. globalState: GlobalState;
  620. material: BABYLON.Material;
  621. lockObject: LockObject;
  622. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  623. }
  624. export class CommonMaterialPropertyGridComponent extends React.Component<ICommonMaterialPropertyGridComponentProps> {
  625. constructor(props: ICommonMaterialPropertyGridComponentProps);
  626. render(): JSX.Element;
  627. }
  628. }
  629. declare module INSPECTOR {
  630. interface IMaterialPropertyGridComponentProps {
  631. globalState: GlobalState;
  632. material: BABYLON.Material;
  633. lockObject: LockObject;
  634. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  635. }
  636. export class MaterialPropertyGridComponent extends React.Component<IMaterialPropertyGridComponentProps> {
  637. constructor(props: IMaterialPropertyGridComponentProps);
  638. render(): JSX.Element;
  639. }
  640. }
  641. declare module INSPECTOR {
  642. interface IFileButtonLineComponentProps {
  643. label: string;
  644. onClick: (file: File) => void;
  645. accept: string;
  646. }
  647. export class FileButtonLineComponent extends React.Component<IFileButtonLineComponentProps> {
  648. private static _IDGenerator;
  649. private _id;
  650. private uploadInputRef;
  651. constructor(props: IFileButtonLineComponentProps);
  652. onChange(evt: any): void;
  653. render(): JSX.Element;
  654. }
  655. }
  656. declare module INSPECTOR {
  657. export interface ITextureLinkLineComponentProps {
  658. label: string;
  659. texture: BABYLON.Nullable<BABYLON.BaseTexture>;
  660. material?: BABYLON.Material;
  661. onSelectionChangedObservable?: BABYLON.Observable<any>;
  662. onDebugSelectionChangeObservable?: BABYLON.Observable<TextureLinkLineComponent>;
  663. propertyName?: string;
  664. onTextureCreated?: (texture: BABYLON.BaseTexture) => void;
  665. customDebugAction?: (state: boolean) => void;
  666. onTextureRemoved?: () => void;
  667. }
  668. export class TextureLinkLineComponent extends React.Component<ITextureLinkLineComponentProps, {
  669. isDebugSelected: boolean;
  670. }> {
  671. private _onDebugSelectionChangeObserver;
  672. constructor(props: ITextureLinkLineComponentProps);
  673. componentDidMount(): void;
  674. componentWillUnmount(): void;
  675. debugTexture(): void;
  676. onLink(): void;
  677. updateTexture(file: File): void;
  678. removeTexture(): void;
  679. render(): JSX.Element | null;
  680. }
  681. }
  682. declare module INSPECTOR {
  683. interface IStandardMaterialPropertyGridComponentProps {
  684. globalState: GlobalState;
  685. material: BABYLON.StandardMaterial;
  686. lockObject: LockObject;
  687. onSelectionChangedObservable?: BABYLON.Observable<any>;
  688. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  689. }
  690. export class StandardMaterialPropertyGridComponent extends React.Component<IStandardMaterialPropertyGridComponentProps> {
  691. private _onDebugSelectionChangeObservable;
  692. constructor(props: IStandardMaterialPropertyGridComponentProps);
  693. renderTextures(): JSX.Element;
  694. render(): JSX.Element;
  695. }
  696. }
  697. declare module INSPECTOR {
  698. /** @hidden */
  699. export var lodPixelShader: {
  700. name: string;
  701. shader: string;
  702. };
  703. }
  704. declare module INSPECTOR {
  705. /** @hidden */
  706. export var lodCubePixelShader: {
  707. name: string;
  708. shader: string;
  709. };
  710. }
  711. declare module INSPECTOR {
  712. export interface TextureChannelsToDisplay {
  713. R: boolean;
  714. G: boolean;
  715. B: boolean;
  716. A: boolean;
  717. }
  718. export class TextureHelper {
  719. private static _ProcessAsync;
  720. static GetTextureDataAsync(texture: BABYLON.BaseTexture, width: number, height: number, face: number, channels: TextureChannelsToDisplay, globalState?: GlobalState, lod?: number): Promise<Uint8Array>;
  721. }
  722. }
  723. declare module INSPECTOR {
  724. interface ITextureLineComponentProps {
  725. texture: BABYLON.BaseTexture;
  726. width: number;
  727. height: number;
  728. globalState?: GlobalState;
  729. hideChannelSelect?: boolean;
  730. }
  731. export class TextureLineComponent extends React.Component<ITextureLineComponentProps, {
  732. channels: TextureChannelsToDisplay;
  733. face: number;
  734. }> {
  735. private canvasRef;
  736. private static TextureChannelStates;
  737. constructor(props: ITextureLineComponentProps);
  738. shouldComponentUpdate(nextProps: ITextureLineComponentProps, nextState: {
  739. channels: TextureChannelsToDisplay;
  740. face: number;
  741. }): boolean;
  742. componentDidMount(): void;
  743. componentDidUpdate(): void;
  744. updatePreview(): Promise<void>;
  745. render(): JSX.Element;
  746. }
  747. }
  748. declare module INSPECTOR {
  749. interface IPopupComponentProps {
  750. id: string;
  751. title: string;
  752. size: {
  753. width: number;
  754. height: number;
  755. };
  756. onOpen: (window: Window) => void;
  757. onClose: (window: Window) => void;
  758. }
  759. export class PopupComponent extends React.Component<IPopupComponentProps, {
  760. isComponentMounted: boolean;
  761. blockedByBrowser: boolean;
  762. }> {
  763. private _container;
  764. private _window;
  765. private _curveEditorHost;
  766. constructor(props: IPopupComponentProps);
  767. componentDidMount(): void;
  768. openPopup(): void;
  769. componentWillUnmount(): void;
  770. getWindow(): Window | null;
  771. render(): React.ReactPortal | null;
  772. }
  773. }
  774. declare module INSPECTOR {
  775. export interface ITool extends IToolData {
  776. instance: IToolType;
  777. }
  778. interface IToolBarProps {
  779. tools: ITool[];
  780. addTool(url: string): void;
  781. changeTool(toolIndex: number): void;
  782. activeToolIndex: number;
  783. metadata: IMetadata;
  784. setMetadata(data: any): void;
  785. pickerOpen: boolean;
  786. setPickerOpen(open: boolean): void;
  787. pickerRef: React.RefObject<HTMLDivElement>;
  788. hasAlpha: boolean;
  789. }
  790. interface IToolBarState {
  791. toolURL: string;
  792. addOpen: boolean;
  793. }
  794. export class ToolBar extends React.Component<IToolBarProps, IToolBarState> {
  795. constructor(props: IToolBarProps);
  796. computeRGBAColor(): BABYLON.Color4;
  797. shouldComponentUpdate(nextProps: IToolBarProps): boolean;
  798. render(): JSX.Element;
  799. }
  800. }
  801. declare module INSPECTOR {
  802. export interface IChannel {
  803. visible: boolean;
  804. editable: boolean;
  805. name: string;
  806. id: 'R' | 'G' | 'B' | 'A';
  807. icon: any;
  808. }
  809. interface IChannelsBarProps {
  810. channels: IChannel[];
  811. setChannels(channelState: IChannel[]): void;
  812. }
  813. export class ChannelsBar extends React.PureComponent<IChannelsBarProps> {
  814. render(): JSX.Element;
  815. }
  816. }
  817. declare module INSPECTOR {
  818. export const canvasShader: {
  819. path: {
  820. vertexSource: string;
  821. fragmentSource: string;
  822. };
  823. options: {
  824. attributes: string[];
  825. uniforms: string[];
  826. };
  827. };
  828. }
  829. declare module INSPECTOR {
  830. export interface IPixelData {
  831. x?: number;
  832. y?: number;
  833. r?: number;
  834. g?: number;
  835. b?: number;
  836. a?: number;
  837. }
  838. export class TextureCanvasManager {
  839. private _engine;
  840. private _scene;
  841. private _camera;
  842. private _cameraPos;
  843. private _scale;
  844. private _isPanning;
  845. private _mouseX;
  846. private _mouseY;
  847. private _UICanvas;
  848. private _size;
  849. /** The canvas we paint onto using the canvas API */
  850. private _2DCanvas;
  851. /** The canvas we apply post processes to */
  852. private _3DCanvas;
  853. /** The canvas which handles channel filtering */
  854. private _channelsTexture;
  855. private _3DEngine;
  856. private _3DPlane;
  857. private _3DCanvasTexture;
  858. private _3DScene;
  859. private _channels;
  860. private _face;
  861. private _mipLevel;
  862. /** The texture from the original engine that we invoked the editor on */
  863. private _originalTexture;
  864. /** This is a hidden texture which is only responsible for holding the actual texture memory in the original engine */
  865. private _target;
  866. /** The internal texture representation of the original texture */
  867. private _originalInternalTexture;
  868. /** Keeps track of whether we have modified the texture */
  869. private _didEdit;
  870. private _plane;
  871. private _planeMaterial;
  872. /** Tracks which keys are currently pressed */
  873. private _keyMap;
  874. private readonly ZOOM_MOUSE_SPEED;
  875. private readonly ZOOM_KEYBOARD_SPEED;
  876. private readonly ZOOM_IN_KEY;
  877. private readonly ZOOM_OUT_KEY;
  878. private readonly PAN_SPEED;
  879. private readonly PAN_MOUSE_BUTTON;
  880. private readonly MIN_SCALE;
  881. private readonly GRID_SCALE;
  882. private readonly MAX_SCALE;
  883. private readonly SELECT_ALL_KEY;
  884. private readonly SAVE_KEY;
  885. private readonly RESET_KEY;
  886. private readonly DESELECT_KEY;
  887. /** The number of milliseconds between texture updates */
  888. private readonly PUSH_FREQUENCY;
  889. private _tool;
  890. private _setPixelData;
  891. private _setMipLevel;
  892. private _window;
  893. private _metadata;
  894. private _editing3D;
  895. private _onUpdate;
  896. private _setMetadata;
  897. private _imageData;
  898. private _canPush;
  899. private _shouldPush;
  900. private _paintCanvas;
  901. constructor(texture: BABYLON.BaseTexture, window: Window, canvasUI: HTMLCanvasElement, canvas2D: HTMLCanvasElement, canvas3D: HTMLCanvasElement, setPixelData: (pixelData: IPixelData) => void, metadata: IMetadata, onUpdate: () => void, setMetadata: (metadata: any) => void, setMipLevel: (level: number) => void);
  902. updateTexture(): Promise<void>;
  903. private pushTexture;
  904. startPainting(): Promise<CanvasRenderingContext2D>;
  905. updatePainting(): void;
  906. stopPainting(): void;
  907. private updateDisplay;
  908. set channels(channels: IChannel[]);
  909. paintPixelsOnCanvas(pixelData: Uint8Array, canvas: HTMLCanvasElement): void;
  910. grabOriginalTexture(): Promise<Uint8Array>;
  911. getMouseCoordinates(pointerInfo: BABYLON.PointerInfo): BABYLON.Vector2;
  912. get scene(): BABYLON.Scene;
  913. get canvas2D(): HTMLCanvasElement;
  914. get size(): BABYLON.ISize;
  915. set tool(tool: BABYLON.Nullable<ITool>);
  916. get tool(): BABYLON.Nullable<ITool>;
  917. set face(face: number);
  918. set mipLevel(mipLevel: number);
  919. /** Returns the 3D scene used for postprocesses */
  920. get scene3D(): BABYLON.Scene;
  921. set metadata(metadata: IMetadata);
  922. private makePlane;
  923. reset(): void;
  924. resize(newSize: BABYLON.ISize): Promise<void>;
  925. setSize(size: BABYLON.ISize): void;
  926. upload(file: File): void;
  927. saveTexture(): void;
  928. dispose(): void;
  929. }
  930. }
  931. declare module INSPECTOR {
  932. interface IPropertiesBarProps {
  933. texture: BABYLON.BaseTexture;
  934. size: BABYLON.ISize;
  935. saveTexture(): void;
  936. pixelData: IPixelData;
  937. face: number;
  938. setFace(face: number): void;
  939. resetTexture(): void;
  940. resizeTexture(width: number, height: number): void;
  941. uploadTexture(file: File): void;
  942. mipLevel: number;
  943. setMipLevel: (mipLevel: number) => void;
  944. }
  945. interface IPropertiesBarState {
  946. width: number;
  947. height: number;
  948. }
  949. export class PropertiesBar extends React.PureComponent<IPropertiesBarProps, IPropertiesBarState> {
  950. private _resetButton;
  951. private _uploadButton;
  952. private _saveButton;
  953. private _babylonLogo;
  954. private _resizeButton;
  955. private _mipUp;
  956. private _mipDown;
  957. private _faces;
  958. constructor(props: IPropertiesBarProps);
  959. private pixelData;
  960. private getNewDimension;
  961. componentWillUpdate(nextProps: IPropertiesBarProps): void;
  962. render(): JSX.Element;
  963. }
  964. }
  965. declare module INSPECTOR {
  966. interface IBottomBarProps {
  967. texture: BABYLON.BaseTexture;
  968. mipLevel: number;
  969. }
  970. export class BottomBar extends React.PureComponent<IBottomBarProps> {
  971. render(): JSX.Element;
  972. }
  973. }
  974. declare module INSPECTOR {
  975. interface ITextureCanvasComponentProps {
  976. canvasUI: React.RefObject<HTMLCanvasElement>;
  977. canvas2D: React.RefObject<HTMLCanvasElement>;
  978. canvas3D: React.RefObject<HTMLCanvasElement>;
  979. texture: BABYLON.BaseTexture;
  980. }
  981. export class TextureCanvasComponent extends React.Component<ITextureCanvasComponentProps> {
  982. render(): JSX.Element;
  983. }
  984. }
  985. declare module INSPECTOR {
  986. export const Paintbrush: IToolData;
  987. }
  988. declare module INSPECTOR {
  989. export const Eyedropper: IToolData;
  990. }
  991. declare module INSPECTOR {
  992. export const Floodfill: IToolData;
  993. }
  994. declare module INSPECTOR {
  995. export const RectangleSelect: IToolData;
  996. }
  997. declare module INSPECTOR {
  998. const _default: import("babylonjs-inspector/components/actionTabs/tabs/propertyGrids/materials/textures/textureEditorComponent").IToolData[];
  999. export default _default;
  1000. }
  1001. declare module INSPECTOR {
  1002. interface IToolSettingsProps {
  1003. tool: ITool | undefined;
  1004. }
  1005. export class ToolSettings extends React.Component<IToolSettingsProps> {
  1006. render(): JSX.Element;
  1007. }
  1008. }
  1009. declare module INSPECTOR {
  1010. interface ITextureEditorComponentProps {
  1011. texture: BABYLON.BaseTexture;
  1012. url: string;
  1013. window: React.RefObject<PopupComponent>;
  1014. onUpdate: () => void;
  1015. }
  1016. interface ITextureEditorComponentState {
  1017. tools: ITool[];
  1018. activeToolIndex: number;
  1019. metadata: IMetadata;
  1020. channels: IChannel[];
  1021. pixelData: IPixelData;
  1022. face: number;
  1023. mipLevel: number;
  1024. pickerOpen: boolean;
  1025. }
  1026. export interface IToolParameters {
  1027. /** The visible scene in the editor. Useful for adding pointer and keyboard events. */
  1028. scene: BABYLON.Scene;
  1029. /** The 2D canvas which you can sample pixel data from. Tools should not paint directly on this canvas. */
  1030. canvas2D: HTMLCanvasElement;
  1031. /** The 3D scene which tools can add post processes to. */
  1032. scene3D: BABYLON.Scene;
  1033. /** The size of the texture. */
  1034. size: BABYLON.ISize;
  1035. /** Pushes the editor texture back to the original scene. This should be called every time a tool makes any modification to a texture. */
  1036. updateTexture: () => void;
  1037. /** The metadata object which is shared between all tools. Feel free to store any information here. Do not set this directly: instead call setMetadata. */
  1038. metadata: IMetadata;
  1039. /** Call this when you want to mutate the metadata. */
  1040. setMetadata: (data: any) => void;
  1041. /** Returns the texture coordinates under the cursor */
  1042. getMouseCoordinates: (pointerInfo: BABYLON.PointerInfo) => BABYLON.Vector2;
  1043. /** Provides access to the BABYLON namespace */
  1044. BABYLON: any;
  1045. /** Provides a canvas that you can use the canvas API to paint on. */
  1046. startPainting: () => Promise<CanvasRenderingContext2D>;
  1047. /** After you have painted on your canvas, call this method to push the updates back to the texture. */
  1048. updatePainting: () => void;
  1049. /** Call this when you are finished painting. */
  1050. stopPainting: () => void;
  1051. }
  1052. export interface IToolGUIProps {
  1053. instance: IToolType;
  1054. }
  1055. /** An interface representing the definition of a tool */
  1056. export interface IToolData {
  1057. /** Name to display on the toolbar */
  1058. name: string;
  1059. /** A class definition for the tool including setup and cleanup methods */
  1060. type: IToolConstructable;
  1061. /** An SVG icon encoded in Base64 */
  1062. icon: string;
  1063. /** Whether the tool uses postprocesses */
  1064. is3D?: boolean;
  1065. cursor?: string;
  1066. settingsComponent?: React.ComponentType<IToolGUIProps>;
  1067. }
  1068. export interface IToolType {
  1069. /** Called when the tool is selected. */
  1070. setup: () => void;
  1071. /** Called when the tool is deselected. */
  1072. cleanup: () => void;
  1073. /** Optional. Called when the user resets the texture or uploads a new texture. Tools may want to reset their state when this happens. */
  1074. onReset?: () => void;
  1075. }
  1076. /** For constructable types, TS requires that you define a seperate interface which constructs your actual interface */
  1077. interface IToolConstructable {
  1078. new (getParameters: () => IToolParameters): IToolType;
  1079. }
  1080. export interface IMetadata {
  1081. color: string;
  1082. alpha: number;
  1083. select: {
  1084. x1: number;
  1085. y1: number;
  1086. x2: number;
  1087. y2: number;
  1088. };
  1089. [key: string]: any;
  1090. }
  1091. global {
  1092. var _TOOL_DATA_: IToolData;
  1093. }
  1094. export class TextureEditorComponent extends React.Component<ITextureEditorComponentProps, ITextureEditorComponentState> {
  1095. private _textureCanvasManager;
  1096. private _UICanvas;
  1097. private _2DCanvas;
  1098. private _3DCanvas;
  1099. private _pickerRef;
  1100. private _timer;
  1101. private static PREVIEW_UPDATE_DELAY_MS;
  1102. constructor(props: ITextureEditorComponentProps);
  1103. componentDidMount(): void;
  1104. componentDidUpdate(): void;
  1105. componentWillUnmount(): void;
  1106. textureDidUpdate(): void;
  1107. loadToolFromURL(url: string): void;
  1108. addTools(tools: IToolData[]): void;
  1109. getToolParameters(): IToolParameters;
  1110. changeTool(index: number): void;
  1111. setMetadata(newMetadata: any): void;
  1112. setPickerOpen(open: boolean): void;
  1113. onPointerDown(evt: React.PointerEvent): void;
  1114. saveTexture(): void;
  1115. resetTexture(): void;
  1116. resizeTexture(width: number, height: number): void;
  1117. uploadTexture(file: File): void;
  1118. render(): JSX.Element;
  1119. }
  1120. }
  1121. declare module INSPECTOR {
  1122. interface ITexturePropertyGridComponentProps {
  1123. texture: BABYLON.BaseTexture;
  1124. lockObject: LockObject;
  1125. globalState: GlobalState;
  1126. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1127. }
  1128. interface ITexturePropertyGridComponentState {
  1129. isTextureEditorOpen: boolean;
  1130. textureEditing: BABYLON.Nullable<BABYLON.BaseTexture>;
  1131. }
  1132. export class TexturePropertyGridComponent extends React.Component<ITexturePropertyGridComponentProps, ITexturePropertyGridComponentState> {
  1133. private _adtInstrumentation;
  1134. private popoutWindowRef;
  1135. private textureLineRef;
  1136. private _textureInspectorSize;
  1137. constructor(props: ITexturePropertyGridComponentProps);
  1138. componentWillUnmount(): void;
  1139. updateTexture(file: File): void;
  1140. openTextureEditor(): void;
  1141. onOpenTextureEditor(window: Window): void;
  1142. onCloseTextureEditor(callback?: {
  1143. (): void;
  1144. }): void;
  1145. forceRefresh(): void;
  1146. render(): JSX.Element;
  1147. }
  1148. }
  1149. declare module INSPECTOR {
  1150. interface IVector2LineComponentProps {
  1151. label: string;
  1152. target: any;
  1153. propertyName: string;
  1154. step?: number;
  1155. onChange?: (newvalue: BABYLON.Vector2) => void;
  1156. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1157. }
  1158. export class Vector2LineComponent extends React.Component<IVector2LineComponentProps, {
  1159. isExpanded: boolean;
  1160. value: BABYLON.Vector2;
  1161. }> {
  1162. static defaultProps: {
  1163. step: number;
  1164. };
  1165. private _localChange;
  1166. constructor(props: IVector2LineComponentProps);
  1167. shouldComponentUpdate(nextProps: IVector2LineComponentProps, nextState: {
  1168. isExpanded: boolean;
  1169. value: BABYLON.Vector2;
  1170. }): boolean;
  1171. switchExpandState(): void;
  1172. raiseOnPropertyChanged(previousValue: BABYLON.Vector2): void;
  1173. updateStateX(value: number): void;
  1174. updateStateY(value: number): void;
  1175. render(): JSX.Element;
  1176. }
  1177. }
  1178. declare module INSPECTOR {
  1179. interface IPBRMaterialPropertyGridComponentProps {
  1180. globalState: GlobalState;
  1181. material: BABYLON.PBRMaterial;
  1182. lockObject: LockObject;
  1183. onSelectionChangedObservable?: BABYLON.Observable<any>;
  1184. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1185. }
  1186. export class PBRMaterialPropertyGridComponent extends React.Component<IPBRMaterialPropertyGridComponentProps> {
  1187. private _onDebugSelectionChangeObservable;
  1188. constructor(props: IPBRMaterialPropertyGridComponentProps);
  1189. switchAmbientMode(state: boolean): void;
  1190. renderTextures(onDebugSelectionChangeObservable: BABYLON.Observable<TextureLinkLineComponent>): JSX.Element;
  1191. render(): JSX.Element;
  1192. }
  1193. }
  1194. declare module INSPECTOR {
  1195. interface IRadioButtonLineComponentProps {
  1196. onSelectionChangedObservable: BABYLON.Observable<RadioButtonLineComponent>;
  1197. label: string;
  1198. isSelected: () => boolean;
  1199. onSelect: () => void;
  1200. }
  1201. export class RadioButtonLineComponent extends React.Component<IRadioButtonLineComponentProps, {
  1202. isSelected: boolean;
  1203. }> {
  1204. private _onSelectionChangedObserver;
  1205. constructor(props: IRadioButtonLineComponentProps);
  1206. componentDidMount(): void;
  1207. componentWillUnmount(): void;
  1208. onChange(): void;
  1209. render(): JSX.Element;
  1210. }
  1211. }
  1212. declare module INSPECTOR {
  1213. interface IFogPropertyGridComponentProps {
  1214. globalState: GlobalState;
  1215. scene: BABYLON.Scene;
  1216. lockObject: LockObject;
  1217. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1218. }
  1219. export class FogPropertyGridComponent extends React.Component<IFogPropertyGridComponentProps, {
  1220. mode: number;
  1221. }> {
  1222. constructor(props: IFogPropertyGridComponentProps);
  1223. render(): JSX.Element;
  1224. }
  1225. }
  1226. declare module INSPECTOR {
  1227. interface IScenePropertyGridComponentProps {
  1228. globalState: GlobalState;
  1229. scene: BABYLON.Scene;
  1230. lockObject: LockObject;
  1231. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1232. onSelectionChangedObservable?: BABYLON.Observable<any>;
  1233. }
  1234. export class ScenePropertyGridComponent extends React.Component<IScenePropertyGridComponentProps> {
  1235. private _storedEnvironmentTexture;
  1236. private _renderingModeGroupObservable;
  1237. constructor(props: IScenePropertyGridComponentProps);
  1238. setRenderingModes(point: boolean, wireframe: boolean): void;
  1239. switchIBL(): void;
  1240. updateEnvironmentTexture(file: File): void;
  1241. updateGravity(newValue: BABYLON.Vector3): void;
  1242. updateTimeStep(newValue: number): void;
  1243. normalizeScene(): void;
  1244. render(): JSX.Element;
  1245. }
  1246. }
  1247. declare module INSPECTOR {
  1248. interface ICommonLightPropertyGridComponentProps {
  1249. globalState: GlobalState;
  1250. light: BABYLON.Light;
  1251. lockObject: LockObject;
  1252. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1253. }
  1254. export class CommonLightPropertyGridComponent extends React.Component<ICommonLightPropertyGridComponentProps> {
  1255. constructor(props: ICommonLightPropertyGridComponentProps);
  1256. render(): JSX.Element;
  1257. }
  1258. }
  1259. declare module INSPECTOR {
  1260. interface IHemisphericLightPropertyGridComponentProps {
  1261. globalState: GlobalState;
  1262. light: BABYLON.HemisphericLight;
  1263. lockObject: LockObject;
  1264. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1265. }
  1266. export class HemisphericLightPropertyGridComponent extends React.Component<IHemisphericLightPropertyGridComponentProps> {
  1267. constructor(props: IHemisphericLightPropertyGridComponentProps);
  1268. render(): JSX.Element;
  1269. }
  1270. }
  1271. declare module INSPECTOR {
  1272. interface ICommonShadowLightPropertyGridComponentProps {
  1273. globalState: GlobalState;
  1274. light: BABYLON.IShadowLight;
  1275. lockObject: LockObject;
  1276. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1277. }
  1278. export class CommonShadowLightPropertyGridComponent extends React.Component<ICommonShadowLightPropertyGridComponentProps> {
  1279. private _internals;
  1280. constructor(props: ICommonShadowLightPropertyGridComponentProps);
  1281. createShadowGenerator(): void;
  1282. disposeShadowGenerator(): void;
  1283. render(): JSX.Element;
  1284. }
  1285. }
  1286. declare module INSPECTOR {
  1287. interface IPointLightPropertyGridComponentProps {
  1288. globalState: GlobalState;
  1289. light: BABYLON.PointLight;
  1290. lockObject: LockObject;
  1291. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1292. }
  1293. export class PointLightPropertyGridComponent extends React.Component<IPointLightPropertyGridComponentProps> {
  1294. constructor(props: IPointLightPropertyGridComponentProps);
  1295. render(): JSX.Element;
  1296. }
  1297. }
  1298. declare module INSPECTOR {
  1299. interface IHexLineComponentProps {
  1300. label: string;
  1301. target: any;
  1302. propertyName: string;
  1303. lockObject?: LockObject;
  1304. onChange?: (newValue: number) => void;
  1305. isInteger?: boolean;
  1306. replaySourceReplacement?: string;
  1307. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1308. additionalClass?: string;
  1309. step?: string;
  1310. digits?: number;
  1311. useEuler?: boolean;
  1312. min?: number;
  1313. }
  1314. export class HexLineComponent extends React.Component<IHexLineComponentProps, {
  1315. value: string;
  1316. }> {
  1317. private _localChange;
  1318. private _store;
  1319. private _propertyChange;
  1320. constructor(props: IHexLineComponentProps);
  1321. componentWillUnmount(): void;
  1322. shouldComponentUpdate(nextProps: IHexLineComponentProps, nextState: {
  1323. value: string;
  1324. }): boolean;
  1325. raiseOnPropertyChanged(newValue: number, previousValue: number): void;
  1326. convertToHexString(valueString: string): string;
  1327. updateValue(valueString: string, raisePropertyChanged: boolean): void;
  1328. lock(): void;
  1329. unlock(): void;
  1330. render(): JSX.Element;
  1331. }
  1332. }
  1333. declare module INSPECTOR {
  1334. interface ICommonCameraPropertyGridComponentProps {
  1335. globalState: GlobalState;
  1336. camera: BABYLON.Camera;
  1337. lockObject: LockObject;
  1338. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1339. }
  1340. export class CommonCameraPropertyGridComponent extends React.Component<ICommonCameraPropertyGridComponentProps, {
  1341. mode: number;
  1342. }> {
  1343. constructor(props: ICommonCameraPropertyGridComponentProps);
  1344. render(): JSX.Element;
  1345. }
  1346. }
  1347. declare module INSPECTOR {
  1348. interface IFreeCameraPropertyGridComponentProps {
  1349. globalState: GlobalState;
  1350. camera: BABYLON.FreeCamera;
  1351. lockObject: LockObject;
  1352. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1353. }
  1354. export class FreeCameraPropertyGridComponent extends React.Component<IFreeCameraPropertyGridComponentProps> {
  1355. constructor(props: IFreeCameraPropertyGridComponentProps);
  1356. render(): JSX.Element;
  1357. }
  1358. }
  1359. declare module INSPECTOR {
  1360. interface IArcRotateCameraPropertyGridComponentProps {
  1361. globalState: GlobalState;
  1362. camera: BABYLON.ArcRotateCamera;
  1363. lockObject: LockObject;
  1364. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1365. }
  1366. export class ArcRotateCameraPropertyGridComponent extends React.Component<IArcRotateCameraPropertyGridComponentProps> {
  1367. constructor(props: IArcRotateCameraPropertyGridComponentProps);
  1368. render(): JSX.Element;
  1369. }
  1370. }
  1371. declare module INSPECTOR {
  1372. interface IIndentedTextLineComponentProps {
  1373. value?: string;
  1374. color?: string;
  1375. underline?: boolean;
  1376. onLink?: () => void;
  1377. url?: string;
  1378. additionalClass?: string;
  1379. }
  1380. export class IndentedTextLineComponent extends React.Component<IIndentedTextLineComponentProps> {
  1381. constructor(props: IIndentedTextLineComponentProps);
  1382. onLink(): void;
  1383. renderContent(): JSX.Element;
  1384. render(): JSX.Element;
  1385. }
  1386. }
  1387. declare module INSPECTOR {
  1388. interface ICommonPropertyGridComponentProps {
  1389. globalState: GlobalState;
  1390. host: {
  1391. metadata: any;
  1392. };
  1393. lockObject: LockObject;
  1394. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1395. }
  1396. export class CommonPropertyGridComponent extends React.Component<ICommonPropertyGridComponentProps> {
  1397. constructor(props: ICommonPropertyGridComponentProps);
  1398. renderLevel(jsonObject: any): JSX.Element[];
  1399. render(): JSX.Element | null;
  1400. }
  1401. }
  1402. declare module INSPECTOR {
  1403. interface IVariantsPropertyGridComponentProps {
  1404. globalState: GlobalState;
  1405. host: any;
  1406. lockObject: LockObject;
  1407. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1408. }
  1409. export class VariantsPropertyGridComponent extends React.Component<IVariantsPropertyGridComponentProps> {
  1410. constructor(props: IVariantsPropertyGridComponentProps);
  1411. private _getVariantsExtension;
  1412. render(): JSX.Element | null;
  1413. }
  1414. }
  1415. declare module INSPECTOR {
  1416. interface IMeshPropertyGridComponentProps {
  1417. globalState: GlobalState;
  1418. mesh: BABYLON.Mesh;
  1419. lockObject: LockObject;
  1420. onSelectionChangedObservable?: BABYLON.Observable<any>;
  1421. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1422. }
  1423. export class MeshPropertyGridComponent extends React.Component<IMeshPropertyGridComponentProps, {
  1424. displayNormals: boolean;
  1425. displayVertexColors: boolean;
  1426. displayBoneWeights: boolean;
  1427. displayBoneIndex: number;
  1428. displaySkeletonMap: boolean;
  1429. }> {
  1430. constructor(props: IMeshPropertyGridComponentProps);
  1431. renderWireframeOver(): void;
  1432. renderNormalVectors(): void;
  1433. displayNormals(): void;
  1434. displayVertexColors(): void;
  1435. displayBoneWeights(): void;
  1436. displaySkeletonMap(): void;
  1437. onBoneDisplayIndexChange(value: number): void;
  1438. onMaterialLink(): void;
  1439. onSourceMeshLink(): void;
  1440. onSkeletonLink(): void;
  1441. convertPhysicsTypeToString(): string;
  1442. render(): JSX.Element;
  1443. }
  1444. }
  1445. declare module INSPECTOR {
  1446. interface ITransformNodePropertyGridComponentProps {
  1447. globalState: GlobalState;
  1448. transformNode: BABYLON.TransformNode;
  1449. lockObject: LockObject;
  1450. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1451. }
  1452. export class TransformNodePropertyGridComponent extends React.Component<ITransformNodePropertyGridComponentProps> {
  1453. constructor(props: ITransformNodePropertyGridComponentProps);
  1454. render(): JSX.Element;
  1455. }
  1456. }
  1457. declare module INSPECTOR {
  1458. interface IBackgroundMaterialPropertyGridComponentProps {
  1459. globalState: GlobalState;
  1460. material: BABYLON.BackgroundMaterial;
  1461. lockObject: LockObject;
  1462. onSelectionChangedObservable?: BABYLON.Observable<any>;
  1463. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1464. }
  1465. export class BackgroundMaterialPropertyGridComponent extends React.Component<IBackgroundMaterialPropertyGridComponentProps> {
  1466. private _onDebugSelectionChangeObservable;
  1467. constructor(props: IBackgroundMaterialPropertyGridComponentProps);
  1468. renderTextures(): JSX.Element;
  1469. render(): JSX.Element;
  1470. }
  1471. }
  1472. declare module INSPECTOR {
  1473. interface ICommonControlPropertyGridComponentProps {
  1474. control: BABYLON.GUI.Control;
  1475. lockObject: LockObject;
  1476. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1477. }
  1478. export class CommonControlPropertyGridComponent extends React.Component<ICommonControlPropertyGridComponentProps> {
  1479. constructor(props: ICommonControlPropertyGridComponentProps);
  1480. renderGridInformation(): JSX.Element | null;
  1481. render(): JSX.Element;
  1482. }
  1483. }
  1484. declare module INSPECTOR {
  1485. interface IControlPropertyGridComponentProps {
  1486. control: BABYLON.GUI.Control;
  1487. lockObject: LockObject;
  1488. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1489. }
  1490. export class ControlPropertyGridComponent extends React.Component<IControlPropertyGridComponentProps> {
  1491. constructor(props: IControlPropertyGridComponentProps);
  1492. render(): JSX.Element;
  1493. }
  1494. }
  1495. declare module INSPECTOR {
  1496. interface ITextBlockPropertyGridComponentProps {
  1497. textBlock: BABYLON.GUI.TextBlock;
  1498. lockObject: LockObject;
  1499. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1500. }
  1501. export class TextBlockPropertyGridComponent extends React.Component<ITextBlockPropertyGridComponentProps> {
  1502. constructor(props: ITextBlockPropertyGridComponentProps);
  1503. render(): JSX.Element;
  1504. }
  1505. }
  1506. declare module INSPECTOR {
  1507. interface IInputTextPropertyGridComponentProps {
  1508. inputText: BABYLON.GUI.InputText;
  1509. lockObject: LockObject;
  1510. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1511. }
  1512. export class InputTextPropertyGridComponent extends React.Component<IInputTextPropertyGridComponentProps> {
  1513. constructor(props: IInputTextPropertyGridComponentProps);
  1514. render(): JSX.Element;
  1515. }
  1516. }
  1517. declare module INSPECTOR {
  1518. interface IColorPickerPropertyGridComponentProps {
  1519. colorPicker: BABYLON.GUI.ColorPicker;
  1520. lockObject: LockObject;
  1521. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1522. }
  1523. export class ColorPickerPropertyGridComponent extends React.Component<IColorPickerPropertyGridComponentProps> {
  1524. constructor(props: IColorPickerPropertyGridComponentProps);
  1525. render(): JSX.Element;
  1526. }
  1527. }
  1528. declare module INSPECTOR {
  1529. interface IAnimationGroupGridComponentProps {
  1530. globalState: GlobalState;
  1531. animationGroup: BABYLON.AnimationGroup;
  1532. scene: BABYLON.Scene;
  1533. lockObject: LockObject;
  1534. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1535. }
  1536. export class AnimationGroupGridComponent extends React.Component<IAnimationGroupGridComponentProps, {
  1537. playButtonText: string;
  1538. currentFrame: number;
  1539. }> {
  1540. private _onAnimationGroupPlayObserver;
  1541. private _onAnimationGroupPauseObserver;
  1542. private _onBeforeRenderObserver;
  1543. private timelineRef;
  1544. constructor(props: IAnimationGroupGridComponentProps);
  1545. disconnect(animationGroup: BABYLON.AnimationGroup): void;
  1546. connect(animationGroup: BABYLON.AnimationGroup): void;
  1547. updateCurrentFrame(animationGroup: BABYLON.AnimationGroup): void;
  1548. shouldComponentUpdate(nextProps: IAnimationGroupGridComponentProps): boolean;
  1549. componentWillUnmount(): void;
  1550. playOrPause(): void;
  1551. onCurrentFrameChange(value: number): void;
  1552. render(): JSX.Element;
  1553. }
  1554. }
  1555. declare module INSPECTOR {
  1556. interface IImagePropertyGridComponentProps {
  1557. image: BABYLON.GUI.Image;
  1558. lockObject: LockObject;
  1559. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1560. }
  1561. export class ImagePropertyGridComponent extends React.Component<IImagePropertyGridComponentProps> {
  1562. constructor(props: IImagePropertyGridComponentProps);
  1563. render(): JSX.Element;
  1564. }
  1565. }
  1566. declare module INSPECTOR {
  1567. interface ISliderPropertyGridComponentProps {
  1568. slider: BABYLON.GUI.Slider;
  1569. lockObject: LockObject;
  1570. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1571. }
  1572. export class SliderPropertyGridComponent extends React.Component<ISliderPropertyGridComponentProps> {
  1573. constructor(props: ISliderPropertyGridComponentProps);
  1574. render(): JSX.Element;
  1575. }
  1576. }
  1577. declare module INSPECTOR {
  1578. interface IImageBasedSliderPropertyGridComponentProps {
  1579. imageBasedSlider: BABYLON.GUI.ImageBasedSlider;
  1580. lockObject: LockObject;
  1581. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1582. }
  1583. export class ImageBasedSliderPropertyGridComponent extends React.Component<IImageBasedSliderPropertyGridComponentProps> {
  1584. constructor(props: IImageBasedSliderPropertyGridComponentProps);
  1585. render(): JSX.Element;
  1586. }
  1587. }
  1588. declare module INSPECTOR {
  1589. interface IRectanglePropertyGridComponentProps {
  1590. rectangle: BABYLON.GUI.Rectangle;
  1591. lockObject: LockObject;
  1592. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1593. }
  1594. export class RectanglePropertyGridComponent extends React.Component<IRectanglePropertyGridComponentProps> {
  1595. constructor(props: IRectanglePropertyGridComponentProps);
  1596. render(): JSX.Element;
  1597. }
  1598. }
  1599. declare module INSPECTOR {
  1600. interface IEllipsePropertyGridComponentProps {
  1601. ellipse: BABYLON.GUI.Ellipse;
  1602. lockObject: LockObject;
  1603. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1604. }
  1605. export class EllipsePropertyGridComponent extends React.Component<IEllipsePropertyGridComponentProps> {
  1606. constructor(props: IEllipsePropertyGridComponentProps);
  1607. render(): JSX.Element;
  1608. }
  1609. }
  1610. declare module INSPECTOR {
  1611. interface ICheckboxPropertyGridComponentProps {
  1612. checkbox: BABYLON.GUI.Checkbox;
  1613. lockObject: LockObject;
  1614. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1615. }
  1616. export class CheckboxPropertyGridComponent extends React.Component<ICheckboxPropertyGridComponentProps> {
  1617. constructor(props: ICheckboxPropertyGridComponentProps);
  1618. render(): JSX.Element;
  1619. }
  1620. }
  1621. declare module INSPECTOR {
  1622. interface IRadioButtonPropertyGridComponentProps {
  1623. radioButton: BABYLON.GUI.RadioButton;
  1624. lockObject: LockObject;
  1625. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1626. }
  1627. export class RadioButtonPropertyGridComponent extends React.Component<IRadioButtonPropertyGridComponentProps> {
  1628. constructor(props: IRadioButtonPropertyGridComponentProps);
  1629. render(): JSX.Element;
  1630. }
  1631. }
  1632. declare module INSPECTOR {
  1633. interface ILinePropertyGridComponentProps {
  1634. line: BABYLON.GUI.Line;
  1635. lockObject: LockObject;
  1636. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1637. }
  1638. export class LinePropertyGridComponent extends React.Component<ILinePropertyGridComponentProps> {
  1639. constructor(props: ILinePropertyGridComponentProps);
  1640. onDashChange(value: string): void;
  1641. render(): JSX.Element;
  1642. }
  1643. }
  1644. declare module INSPECTOR {
  1645. interface IScrollViewerPropertyGridComponentProps {
  1646. scrollViewer: BABYLON.GUI.ScrollViewer;
  1647. lockObject: LockObject;
  1648. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1649. }
  1650. export class ScrollViewerPropertyGridComponent extends React.Component<IScrollViewerPropertyGridComponentProps> {
  1651. constructor(props: IScrollViewerPropertyGridComponentProps);
  1652. render(): JSX.Element;
  1653. }
  1654. }
  1655. declare module INSPECTOR {
  1656. interface IGridPropertyGridComponentProps {
  1657. grid: BABYLON.GUI.Grid;
  1658. lockObject: LockObject;
  1659. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1660. }
  1661. export class GridPropertyGridComponent extends React.Component<IGridPropertyGridComponentProps> {
  1662. constructor(props: IGridPropertyGridComponentProps);
  1663. renderRows(): JSX.Element[];
  1664. renderColumns(): JSX.Element[];
  1665. render(): JSX.Element;
  1666. }
  1667. }
  1668. declare module INSPECTOR {
  1669. interface IPBRMetallicRoughnessMaterialPropertyGridComponentProps {
  1670. globalState: GlobalState;
  1671. material: BABYLON.PBRMetallicRoughnessMaterial;
  1672. lockObject: LockObject;
  1673. onSelectionChangedObservable?: BABYLON.Observable<any>;
  1674. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1675. }
  1676. export class PBRMetallicRoughnessMaterialPropertyGridComponent extends React.Component<IPBRMetallicRoughnessMaterialPropertyGridComponentProps> {
  1677. private _onDebugSelectionChangeObservable;
  1678. constructor(props: IPBRMetallicRoughnessMaterialPropertyGridComponentProps);
  1679. renderTextures(): JSX.Element;
  1680. render(): JSX.Element;
  1681. }
  1682. }
  1683. declare module INSPECTOR {
  1684. interface IPBRSpecularGlossinessMaterialPropertyGridComponentProps {
  1685. globalState: GlobalState;
  1686. material: BABYLON.PBRSpecularGlossinessMaterial;
  1687. lockObject: LockObject;
  1688. onSelectionChangedObservable?: BABYLON.Observable<any>;
  1689. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1690. }
  1691. export class PBRSpecularGlossinessMaterialPropertyGridComponent extends React.Component<IPBRSpecularGlossinessMaterialPropertyGridComponentProps> {
  1692. private _onDebugSelectionChangeObservable;
  1693. constructor(props: IPBRSpecularGlossinessMaterialPropertyGridComponentProps);
  1694. renderTextures(): JSX.Element;
  1695. render(): JSX.Element;
  1696. }
  1697. }
  1698. declare module INSPECTOR {
  1699. interface IStackPanelPropertyGridComponentProps {
  1700. stackPanel: BABYLON.GUI.StackPanel;
  1701. lockObject: LockObject;
  1702. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1703. }
  1704. export class StackPanelPropertyGridComponent extends React.Component<IStackPanelPropertyGridComponentProps> {
  1705. constructor(props: IStackPanelPropertyGridComponentProps);
  1706. render(): JSX.Element;
  1707. }
  1708. }
  1709. declare module INSPECTOR {
  1710. interface ICommonPostProcessPropertyGridComponentProps {
  1711. globalState: GlobalState;
  1712. postProcess: BABYLON.PostProcess;
  1713. lockObject: LockObject;
  1714. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1715. }
  1716. export class CommonPostProcessPropertyGridComponent extends React.Component<ICommonPostProcessPropertyGridComponentProps> {
  1717. constructor(props: ICommonPostProcessPropertyGridComponentProps);
  1718. render(): JSX.Element;
  1719. }
  1720. }
  1721. declare module INSPECTOR {
  1722. interface IPostProcessPropertyGridComponentProps {
  1723. globalState: GlobalState;
  1724. postProcess: BABYLON.PostProcess;
  1725. lockObject: LockObject;
  1726. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1727. }
  1728. export class PostProcessPropertyGridComponent extends React.Component<IPostProcessPropertyGridComponentProps> {
  1729. constructor(props: IPostProcessPropertyGridComponentProps);
  1730. edit(): void;
  1731. render(): JSX.Element;
  1732. }
  1733. }
  1734. declare module INSPECTOR {
  1735. interface ICommonRenderingPipelinePropertyGridComponentProps {
  1736. globalState: GlobalState;
  1737. renderPipeline: BABYLON.PostProcessRenderPipeline;
  1738. lockObject: LockObject;
  1739. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1740. }
  1741. export class CommonRenderingPipelinePropertyGridComponent extends React.Component<ICommonRenderingPipelinePropertyGridComponentProps> {
  1742. constructor(props: ICommonRenderingPipelinePropertyGridComponentProps);
  1743. render(): JSX.Element;
  1744. }
  1745. }
  1746. declare module INSPECTOR {
  1747. interface IRenderingPipelinePropertyGridComponentProps {
  1748. globalState: GlobalState;
  1749. renderPipeline: BABYLON.PostProcessRenderPipeline;
  1750. lockObject: LockObject;
  1751. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1752. }
  1753. export class RenderingPipelinePropertyGridComponent extends React.Component<IRenderingPipelinePropertyGridComponentProps> {
  1754. constructor(props: IRenderingPipelinePropertyGridComponentProps);
  1755. render(): JSX.Element;
  1756. }
  1757. }
  1758. declare module INSPECTOR {
  1759. interface IDefaultRenderingPipelinePropertyGridComponentProps {
  1760. globalState: GlobalState;
  1761. renderPipeline: BABYLON.DefaultRenderingPipeline;
  1762. lockObject: LockObject;
  1763. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1764. }
  1765. export class DefaultRenderingPipelinePropertyGridComponent extends React.Component<IDefaultRenderingPipelinePropertyGridComponentProps> {
  1766. constructor(props: IDefaultRenderingPipelinePropertyGridComponentProps);
  1767. render(): JSX.Element;
  1768. }
  1769. }
  1770. declare module INSPECTOR {
  1771. interface ISSAORenderingPipelinePropertyGridComponentProps {
  1772. globalState: GlobalState;
  1773. renderPipeline: BABYLON.SSAORenderingPipeline;
  1774. lockObject: LockObject;
  1775. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1776. }
  1777. export class SSAORenderingPipelinePropertyGridComponent extends React.Component<ISSAORenderingPipelinePropertyGridComponentProps> {
  1778. constructor(props: ISSAORenderingPipelinePropertyGridComponentProps);
  1779. render(): JSX.Element;
  1780. }
  1781. }
  1782. declare module INSPECTOR {
  1783. interface ISSAO2RenderingPipelinePropertyGridComponentProps {
  1784. globalState: GlobalState;
  1785. renderPipeline: BABYLON.SSAO2RenderingPipeline;
  1786. lockObject: LockObject;
  1787. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1788. }
  1789. export class SSAO2RenderingPipelinePropertyGridComponent extends React.Component<ISSAO2RenderingPipelinePropertyGridComponentProps> {
  1790. constructor(props: ISSAO2RenderingPipelinePropertyGridComponentProps);
  1791. render(): JSX.Element;
  1792. }
  1793. }
  1794. declare module INSPECTOR {
  1795. interface ISkeletonPropertyGridComponentProps {
  1796. globalState: GlobalState;
  1797. skeleton: BABYLON.Skeleton;
  1798. lockObject: LockObject;
  1799. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1800. }
  1801. export class SkeletonPropertyGridComponent extends React.Component<ISkeletonPropertyGridComponentProps> {
  1802. private _skeletonViewersEnabled;
  1803. private _skeletonViewerDisplayOptions;
  1804. private _skeletonViewers;
  1805. constructor(props: ISkeletonPropertyGridComponentProps);
  1806. switchSkeletonViewers(): void;
  1807. checkSkeletonViewerState(props: ISkeletonPropertyGridComponentProps): void;
  1808. changeDisplayMode(): void;
  1809. changeDisplayOptions(option: string, value: number): void;
  1810. shouldComponentUpdate(nextProps: ISkeletonPropertyGridComponentProps): boolean;
  1811. onOverrideMeshLink(): void;
  1812. render(): JSX.Element;
  1813. }
  1814. }
  1815. declare module INSPECTOR {
  1816. interface IBonePropertyGridComponentProps {
  1817. globalState: GlobalState;
  1818. bone: BABYLON.Bone;
  1819. lockObject: LockObject;
  1820. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1821. }
  1822. export class BonePropertyGridComponent extends React.Component<IBonePropertyGridComponentProps> {
  1823. constructor(props: IBonePropertyGridComponentProps);
  1824. onTransformNodeLink(): void;
  1825. render(): JSX.Element;
  1826. }
  1827. }
  1828. declare module INSPECTOR {
  1829. interface IDirectionalLightPropertyGridComponentProps {
  1830. globalState: GlobalState;
  1831. light: BABYLON.DirectionalLight;
  1832. lockObject: LockObject;
  1833. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1834. }
  1835. export class DirectionalLightPropertyGridComponent extends React.Component<IDirectionalLightPropertyGridComponentProps> {
  1836. constructor(props: IDirectionalLightPropertyGridComponentProps);
  1837. render(): JSX.Element;
  1838. }
  1839. }
  1840. declare module INSPECTOR {
  1841. interface ISpotLightPropertyGridComponentProps {
  1842. globalState: GlobalState;
  1843. light: BABYLON.SpotLight;
  1844. lockObject: LockObject;
  1845. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1846. }
  1847. export class SpotLightPropertyGridComponent extends React.Component<ISpotLightPropertyGridComponentProps> {
  1848. constructor(props: ISpotLightPropertyGridComponentProps);
  1849. render(): JSX.Element;
  1850. }
  1851. }
  1852. declare module INSPECTOR {
  1853. interface ILenstRenderingPipelinePropertyGridComponentProps {
  1854. globalState: GlobalState;
  1855. renderPipeline: BABYLON.LensRenderingPipeline;
  1856. lockObject: LockObject;
  1857. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1858. }
  1859. export class LensRenderingPipelinePropertyGridComponent extends React.Component<ILenstRenderingPipelinePropertyGridComponentProps> {
  1860. constructor(props: ILenstRenderingPipelinePropertyGridComponentProps);
  1861. render(): JSX.Element;
  1862. }
  1863. }
  1864. declare module INSPECTOR {
  1865. interface IVector4LineComponentProps {
  1866. label: string;
  1867. target: any;
  1868. propertyName: string;
  1869. step?: number;
  1870. onChange?: (newvalue: BABYLON.Vector4) => void;
  1871. useEuler?: boolean;
  1872. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1873. }
  1874. export class Vector4LineComponent extends React.Component<IVector4LineComponentProps, {
  1875. isExpanded: boolean;
  1876. value: BABYLON.Vector4;
  1877. }> {
  1878. static defaultProps: {
  1879. step: number;
  1880. };
  1881. private _localChange;
  1882. constructor(props: IVector4LineComponentProps);
  1883. getCurrentValue(): any;
  1884. shouldComponentUpdate(nextProps: IVector4LineComponentProps, nextState: {
  1885. isExpanded: boolean;
  1886. value: BABYLON.Vector4;
  1887. }): boolean;
  1888. switchExpandState(): void;
  1889. raiseOnPropertyChanged(previousValue: BABYLON.Vector4): void;
  1890. updateVector4(): void;
  1891. updateStateX(value: number): void;
  1892. updateStateY(value: number): void;
  1893. updateStateZ(value: number): void;
  1894. updateStateW(value: number): void;
  1895. render(): JSX.Element;
  1896. }
  1897. }
  1898. declare module INSPECTOR {
  1899. interface IGradientStepComponentProps {
  1900. globalState: GlobalState;
  1901. step: BABYLON.GradientBlockColorStep;
  1902. lineIndex: number;
  1903. onDelete: () => void;
  1904. onUpdateStep: () => void;
  1905. onCheckForReOrder: () => void;
  1906. onCopy?: () => void;
  1907. }
  1908. export class GradientStepComponent extends React.Component<IGradientStepComponentProps, {
  1909. gradient: number;
  1910. }> {
  1911. constructor(props: IGradientStepComponentProps);
  1912. updateColor(color: string): void;
  1913. updateStep(gradient: number): void;
  1914. onPointerUp(): void;
  1915. render(): JSX.Element;
  1916. }
  1917. }
  1918. declare module INSPECTOR {
  1919. export interface IPropertyComponentProps {
  1920. globalState: GlobalState;
  1921. block: BABYLON.NodeMaterialBlock;
  1922. }
  1923. }
  1924. declare module INSPECTOR {
  1925. export class GradientPropertyTabComponent extends React.Component<IPropertyComponentProps> {
  1926. private _gradientBlock;
  1927. constructor(props: IPropertyComponentProps);
  1928. forceRebuild(): void;
  1929. deleteStep(step: BABYLON.GradientBlockColorStep): void;
  1930. copyStep(step: BABYLON.GradientBlockColorStep): void;
  1931. addNewStep(): void;
  1932. checkForReOrder(): void;
  1933. render(): JSX.Element;
  1934. }
  1935. }
  1936. declare module INSPECTOR {
  1937. export interface IColor4LineComponentProps {
  1938. label: string;
  1939. target: any;
  1940. propertyName: string;
  1941. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1942. onChange?: () => void;
  1943. isLinear?: boolean;
  1944. }
  1945. export class Color4LineComponent extends React.Component<IColor4LineComponentProps, {
  1946. isExpanded: boolean;
  1947. color: BABYLON.Color4;
  1948. }> {
  1949. private _localChange;
  1950. constructor(props: IColor4LineComponentProps);
  1951. shouldComponentUpdate(nextProps: IColor4LineComponentProps, nextState: {
  1952. color: BABYLON.Color4;
  1953. }): boolean;
  1954. setPropertyValue(newColor: BABYLON.Color4): void;
  1955. onChange(newValue: string): void;
  1956. switchExpandState(): void;
  1957. raiseOnPropertyChanged(previousValue: BABYLON.Color4): void;
  1958. updateStateR(value: number): void;
  1959. updateStateG(value: number): void;
  1960. updateStateB(value: number): void;
  1961. updateStateA(value: number): void;
  1962. copyToClipboard(): void;
  1963. render(): JSX.Element;
  1964. }
  1965. }
  1966. declare module INSPECTOR {
  1967. interface INodeMaterialPropertyGridComponentProps {
  1968. globalState: GlobalState;
  1969. material: BABYLON.NodeMaterial;
  1970. lockObject: LockObject;
  1971. onSelectionChangedObservable?: BABYLON.Observable<any>;
  1972. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1973. }
  1974. export class NodeMaterialPropertyGridComponent extends React.Component<INodeMaterialPropertyGridComponentProps> {
  1975. private _onDebugSelectionChangeObservable;
  1976. constructor(props: INodeMaterialPropertyGridComponentProps);
  1977. edit(): void;
  1978. renderTextures(): JSX.Element | null;
  1979. renderInputBlock(block: BABYLON.InputBlock): JSX.Element | null;
  1980. renderInputValues(): JSX.Element;
  1981. render(): JSX.Element;
  1982. }
  1983. }
  1984. declare module INSPECTOR {
  1985. interface IMultiMaterialPropertyGridComponentProps {
  1986. globalState: GlobalState;
  1987. material: BABYLON.MultiMaterial;
  1988. lockObject: LockObject;
  1989. onSelectionChangedObservable?: BABYLON.Observable<any>;
  1990. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  1991. }
  1992. export class MultiMaterialPropertyGridComponent extends React.Component<IMultiMaterialPropertyGridComponentProps> {
  1993. constructor(props: IMultiMaterialPropertyGridComponentProps);
  1994. onMaterialLink(mat: BABYLON.Material): void;
  1995. renderChildMaterial(): JSX.Element;
  1996. render(): JSX.Element;
  1997. }
  1998. }
  1999. declare module INSPECTOR {
  2000. interface IBoxEmitterGridComponentProps {
  2001. globalState: GlobalState;
  2002. emitter: BABYLON.BoxParticleEmitter;
  2003. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2004. }
  2005. export class BoxEmitterGridComponent extends React.Component<IBoxEmitterGridComponentProps> {
  2006. constructor(props: IBoxEmitterGridComponentProps);
  2007. render(): JSX.Element;
  2008. }
  2009. }
  2010. declare module INSPECTOR {
  2011. interface IConeEmitterGridComponentProps {
  2012. globalState: GlobalState;
  2013. emitter: BABYLON.ConeParticleEmitter;
  2014. onSelectionChangedObservable?: BABYLON.Observable<any>;
  2015. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2016. }
  2017. export class ConeEmitterGridComponent extends React.Component<IConeEmitterGridComponentProps> {
  2018. constructor(props: IConeEmitterGridComponentProps);
  2019. render(): JSX.Element;
  2020. }
  2021. }
  2022. declare module INSPECTOR {
  2023. interface ICylinderEmitterGridComponentProps {
  2024. globalState: GlobalState;
  2025. emitter: BABYLON.CylinderParticleEmitter;
  2026. lockObject: LockObject;
  2027. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2028. }
  2029. export class CylinderEmitterGridComponent extends React.Component<ICylinderEmitterGridComponentProps> {
  2030. constructor(props: ICylinderEmitterGridComponentProps);
  2031. render(): JSX.Element;
  2032. }
  2033. }
  2034. declare module INSPECTOR {
  2035. interface IHemisphericEmitterGridComponentProps {
  2036. globalState: GlobalState;
  2037. emitter: BABYLON.HemisphericParticleEmitter;
  2038. lockObject: LockObject;
  2039. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2040. }
  2041. export class HemisphericEmitterGridComponent extends React.Component<IHemisphericEmitterGridComponentProps> {
  2042. constructor(props: IHemisphericEmitterGridComponentProps);
  2043. render(): JSX.Element;
  2044. }
  2045. }
  2046. declare module INSPECTOR {
  2047. interface IPointEmitterGridComponentProps {
  2048. globalState: GlobalState;
  2049. emitter: BABYLON.PointParticleEmitter;
  2050. lockObject: LockObject;
  2051. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2052. }
  2053. export class PointEmitterGridComponent extends React.Component<IPointEmitterGridComponentProps> {
  2054. constructor(props: IPointEmitterGridComponentProps);
  2055. render(): JSX.Element;
  2056. }
  2057. }
  2058. declare module INSPECTOR {
  2059. interface ISphereEmitterGridComponentProps {
  2060. globalState: GlobalState;
  2061. emitter: BABYLON.SphereParticleEmitter;
  2062. lockObject: LockObject;
  2063. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2064. }
  2065. export class SphereEmitterGridComponent extends React.Component<ISphereEmitterGridComponentProps> {
  2066. constructor(props: ISphereEmitterGridComponentProps);
  2067. render(): JSX.Element;
  2068. }
  2069. }
  2070. declare module INSPECTOR {
  2071. interface IMeshPickerComponentProps {
  2072. globalState: GlobalState;
  2073. target: any;
  2074. property: string;
  2075. scene: BABYLON.Scene;
  2076. label: string;
  2077. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2078. }
  2079. export class MeshPickerComponent extends React.Component<IMeshPickerComponentProps> {
  2080. constructor(props: IMeshPickerComponentProps);
  2081. render(): JSX.Element;
  2082. }
  2083. }
  2084. declare module INSPECTOR {
  2085. interface IMeshEmitterGridComponentProps {
  2086. globalState: GlobalState;
  2087. emitter: BABYLON.MeshParticleEmitter;
  2088. scene: BABYLON.Scene;
  2089. lockObject: LockObject;
  2090. onSelectionChangedObservable?: BABYLON.Observable<any>;
  2091. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2092. }
  2093. export class MeshEmitterGridComponent extends React.Component<IMeshEmitterGridComponentProps> {
  2094. constructor(props: IMeshEmitterGridComponentProps);
  2095. render(): JSX.Element;
  2096. }
  2097. }
  2098. declare module INSPECTOR {
  2099. interface IFactorGradientStepGridComponent {
  2100. globalState: GlobalState;
  2101. gradient: BABYLON.FactorGradient;
  2102. lockObject: LockObject;
  2103. lineIndex: number;
  2104. onDelete: () => void;
  2105. onUpdateGradient: () => void;
  2106. onCheckForReOrder: () => void;
  2107. host: BABYLON.IParticleSystem;
  2108. codeRecorderPropertyName: string;
  2109. }
  2110. export class FactorGradientStepGridComponent extends React.Component<IFactorGradientStepGridComponent, {
  2111. gradient: number;
  2112. factor1: string;
  2113. factor2?: string;
  2114. }> {
  2115. constructor(props: IFactorGradientStepGridComponent);
  2116. shouldComponentUpdate(nextProps: IFactorGradientStepGridComponent, nextState: {
  2117. gradient: number;
  2118. factor1: string;
  2119. factor2?: string;
  2120. }): boolean;
  2121. updateFactor1(valueString: string): void;
  2122. updateFactor2(valueString: string): void;
  2123. updateGradient(gradient: number): void;
  2124. onPointerUp(): void;
  2125. lock(): void;
  2126. unlock(): void;
  2127. render(): JSX.Element;
  2128. }
  2129. }
  2130. declare module INSPECTOR {
  2131. interface IColorGradientStepGridComponent {
  2132. globalState: GlobalState;
  2133. gradient: BABYLON.ColorGradient | BABYLON.Color3Gradient;
  2134. lockObject: LockObject;
  2135. lineIndex: number;
  2136. isColor3: boolean;
  2137. onDelete: () => void;
  2138. onUpdateGradient: () => void;
  2139. onCheckForReOrder: () => void;
  2140. host: BABYLON.IParticleSystem;
  2141. codeRecorderPropertyName: string;
  2142. }
  2143. export class ColorGradientStepGridComponent extends React.Component<IColorGradientStepGridComponent, {
  2144. gradient: number;
  2145. }> {
  2146. constructor(props: IColorGradientStepGridComponent);
  2147. updateColor1(color: string): void;
  2148. updateColor2(color: string): void;
  2149. updateGradient(gradient: number): void;
  2150. onPointerUp(): void;
  2151. lock(): void;
  2152. unlock(): void;
  2153. render(): JSX.Element;
  2154. }
  2155. }
  2156. declare module INSPECTOR {
  2157. interface ILinkButtonComponentProps {
  2158. label: string;
  2159. buttonLabel: string;
  2160. url?: string;
  2161. onClick: () => void;
  2162. onIconClick?: () => void;
  2163. }
  2164. export class LinkButtonComponent extends React.Component<ILinkButtonComponentProps> {
  2165. constructor(props: ILinkButtonComponentProps);
  2166. onLink(): void;
  2167. render(): JSX.Element;
  2168. }
  2169. }
  2170. declare module INSPECTOR {
  2171. export enum GradientGridMode {
  2172. Factor = 0,
  2173. BABYLON.Color3 = 1,
  2174. BABYLON.Color4 = 2
  2175. }
  2176. interface IValueGradientGridComponent {
  2177. globalState: GlobalState;
  2178. label: string;
  2179. gradients: BABYLON.Nullable<Array<BABYLON.IValueGradient>>;
  2180. lockObject: LockObject;
  2181. docLink?: string;
  2182. mode: GradientGridMode;
  2183. host: BABYLON.IParticleSystem;
  2184. codeRecorderPropertyName: string;
  2185. onCreateRequired: () => void;
  2186. }
  2187. export class ValueGradientGridComponent extends React.Component<IValueGradientGridComponent> {
  2188. constructor(props: IValueGradientGridComponent);
  2189. deleteStep(step: BABYLON.IValueGradient): void;
  2190. addNewStep(): void;
  2191. checkForReOrder(): void;
  2192. updateAndSync(): void;
  2193. render(): JSX.Element;
  2194. }
  2195. }
  2196. declare module INSPECTOR {
  2197. interface IParticleSystemPropertyGridComponentProps {
  2198. globalState: GlobalState;
  2199. system: BABYLON.IParticleSystem;
  2200. lockObject: LockObject;
  2201. onSelectionChangedObservable?: BABYLON.Observable<any>;
  2202. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2203. }
  2204. export class ParticleSystemPropertyGridComponent extends React.Component<IParticleSystemPropertyGridComponentProps> {
  2205. private _snippetUrl;
  2206. constructor(props: IParticleSystemPropertyGridComponentProps);
  2207. renderEmitter(): JSX.Element | null;
  2208. raiseOnPropertyChanged(property: string, newValue: any, previousValue: any): void;
  2209. renderControls(): JSX.Element;
  2210. saveToFile(): void;
  2211. loadFromFile(file: File): void;
  2212. loadFromSnippet(): void;
  2213. saveToSnippet(): void;
  2214. render(): JSX.Element;
  2215. }
  2216. }
  2217. declare module INSPECTOR {
  2218. interface ISpriteManagerPropertyGridComponentProps {
  2219. globalState: GlobalState;
  2220. spriteManager: BABYLON.SpriteManager;
  2221. lockObject: LockObject;
  2222. onSelectionChangedObservable?: BABYLON.Observable<any>;
  2223. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2224. }
  2225. export class SpriteManagerPropertyGridComponent extends React.Component<ISpriteManagerPropertyGridComponentProps> {
  2226. private _snippetUrl;
  2227. constructor(props: ISpriteManagerPropertyGridComponentProps);
  2228. addNewSprite(): void;
  2229. disposeManager(): void;
  2230. saveToFile(): void;
  2231. loadFromFile(file: File): void;
  2232. loadFromSnippet(): void;
  2233. saveToSnippet(): void;
  2234. render(): JSX.Element;
  2235. }
  2236. }
  2237. declare module INSPECTOR {
  2238. interface ISpritePropertyGridComponentProps {
  2239. globalState: GlobalState;
  2240. sprite: BABYLON.Sprite;
  2241. lockObject: LockObject;
  2242. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2243. onSelectionChangedObservable?: BABYLON.Observable<any>;
  2244. }
  2245. export class SpritePropertyGridComponent extends React.Component<ISpritePropertyGridComponentProps> {
  2246. private canvasRef;
  2247. private imageData;
  2248. private cachedCellIndex;
  2249. constructor(props: ISpritePropertyGridComponentProps);
  2250. onManagerLink(): void;
  2251. switchPlayStopState(): void;
  2252. disposeSprite(): void;
  2253. componentDidMount(): void;
  2254. componentDidUpdate(): void;
  2255. shouldComponentUpdate(nextProps: ISpritePropertyGridComponentProps): boolean;
  2256. updatePreview(): void;
  2257. render(): JSX.Element;
  2258. }
  2259. }
  2260. declare module INSPECTOR {
  2261. interface ITargetedAnimationGridComponentProps {
  2262. globalState: GlobalState;
  2263. targetedAnimation: BABYLON.TargetedAnimation;
  2264. scene: BABYLON.Scene;
  2265. lockObject: LockObject;
  2266. onSelectionChangedObservable?: BABYLON.Observable<any>;
  2267. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2268. }
  2269. export class TargetedAnimationGridComponent extends React.Component<ITargetedAnimationGridComponentProps> {
  2270. private _animationGroup;
  2271. constructor(props: ITargetedAnimationGridComponentProps);
  2272. playOrPause: () => void;
  2273. deleteAnimation: () => void;
  2274. render(): JSX.Element;
  2275. }
  2276. }
  2277. declare module INSPECTOR {
  2278. interface IFollowCameraPropertyGridComponentProps {
  2279. globalState: GlobalState;
  2280. camera: BABYLON.FollowCamera;
  2281. lockObject: LockObject;
  2282. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2283. }
  2284. export class FollowCameraPropertyGridComponent extends React.Component<IFollowCameraPropertyGridComponentProps> {
  2285. constructor(props: IFollowCameraPropertyGridComponentProps);
  2286. render(): JSX.Element;
  2287. }
  2288. }
  2289. declare module INSPECTOR {
  2290. interface ISoundPropertyGridComponentProps {
  2291. globalState: GlobalState;
  2292. sound: BABYLON.Sound;
  2293. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2294. lockObject: LockObject;
  2295. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2296. }
  2297. export class SoundPropertyGridComponent extends React.Component<ISoundPropertyGridComponentProps> {
  2298. constructor(props: ISoundPropertyGridComponentProps);
  2299. render(): JSX.Element;
  2300. }
  2301. }
  2302. declare module INSPECTOR {
  2303. export class PropertyGridTabComponent extends PaneComponent {
  2304. private _timerIntervalId;
  2305. private _lockObject;
  2306. constructor(props: IPaneComponentProps);
  2307. timerRefresh(): void;
  2308. componentDidMount(): void;
  2309. componentWillUnmount(): void;
  2310. render(): JSX.Element | null;
  2311. }
  2312. }
  2313. declare module INSPECTOR {
  2314. export interface IHeaderComponentProps {
  2315. title: string;
  2316. handleBack?: boolean;
  2317. noExpand?: boolean;
  2318. noClose?: boolean;
  2319. noCommands?: boolean;
  2320. onPopup: () => void;
  2321. onClose: () => void;
  2322. onSelectionChangedObservable?: BABYLON.Observable<any>;
  2323. }
  2324. export class HeaderComponent extends React.Component<IHeaderComponentProps, {
  2325. isBackVisible: boolean;
  2326. }> {
  2327. private _backStack;
  2328. private _onSelectionChangeObserver;
  2329. constructor(props: IHeaderComponentProps);
  2330. componentDidMount(): void;
  2331. componentWillUnmount(): void;
  2332. goBack(): void;
  2333. renderLogo(): JSX.Element | null;
  2334. render(): JSX.Element;
  2335. }
  2336. }
  2337. declare module INSPECTOR {
  2338. interface IMessageLineComponentProps {
  2339. text: string;
  2340. color?: string;
  2341. }
  2342. export class MessageLineComponent extends React.Component<IMessageLineComponentProps> {
  2343. constructor(props: IMessageLineComponentProps);
  2344. render(): JSX.Element;
  2345. }
  2346. }
  2347. declare module INSPECTOR {
  2348. interface IGLTFComponentProps {
  2349. scene: BABYLON.Scene;
  2350. globalState: GlobalState;
  2351. }
  2352. export class GLTFComponent extends React.Component<IGLTFComponentProps> {
  2353. private _onValidationResultsUpdatedObserver;
  2354. openValidationDetails(): void;
  2355. prepareText(singularForm: string, count: number): string;
  2356. componentDidMount(): void;
  2357. componentWillUnmount(): void;
  2358. renderValidation(): JSX.Element | null;
  2359. render(): JSX.Element;
  2360. }
  2361. }
  2362. declare module INSPECTOR {
  2363. interface IFileMultipleButtonLineComponentProps {
  2364. label: string;
  2365. onClick: (event: any) => void;
  2366. accept: string;
  2367. }
  2368. export class FileMultipleButtonLineComponent extends React.Component<IFileMultipleButtonLineComponentProps> {
  2369. private static _IDGenerator;
  2370. private _id;
  2371. private uploadInputRef;
  2372. constructor(props: IFileMultipleButtonLineComponentProps);
  2373. onChange(evt: any): void;
  2374. render(): JSX.Element;
  2375. }
  2376. }
  2377. declare module INSPECTOR {
  2378. export class ToolsTabComponent extends PaneComponent {
  2379. private _videoRecorder;
  2380. private _screenShotSize;
  2381. private _gifOptions;
  2382. private _useWidthHeight;
  2383. private _isExporting;
  2384. private _gifWorkerBlob;
  2385. private _gifRecorder;
  2386. private _previousRenderingScale;
  2387. private _crunchingGIF;
  2388. constructor(props: IPaneComponentProps);
  2389. componentDidMount(): void;
  2390. componentWillUnmount(): void;
  2391. captureScreenshot(): void;
  2392. captureRender(): void;
  2393. recordVideo(): void;
  2394. recordGIFInternal(): void;
  2395. recordGIF(): void;
  2396. importAnimations(event: any): void;
  2397. shouldExport(node: BABYLON.Node): boolean;
  2398. exportGLTF(): void;
  2399. exportBabylon(): void;
  2400. createEnvTexture(): void;
  2401. exportReplay(): void;
  2402. startRecording(): void;
  2403. applyDelta(file: File): void;
  2404. render(): JSX.Element | null;
  2405. }
  2406. }
  2407. declare module INSPECTOR {
  2408. export class SettingsTabComponent extends PaneComponent {
  2409. constructor(props: IPaneComponentProps);
  2410. render(): JSX.Element;
  2411. }
  2412. }
  2413. declare module INSPECTOR {
  2414. interface IActionTabsComponentProps {
  2415. scene?: BABYLON.Scene;
  2416. noCommands?: boolean;
  2417. noHeader?: boolean;
  2418. noExpand?: boolean;
  2419. noClose?: boolean;
  2420. popupMode?: boolean;
  2421. onPopup?: () => void;
  2422. onClose?: () => void;
  2423. globalState?: GlobalState;
  2424. initialTab?: BABYLON.DebugLayerTab;
  2425. }
  2426. export class ActionTabsComponent extends React.Component<IActionTabsComponentProps, {
  2427. selectedEntity: any;
  2428. selectedIndex: number;
  2429. }> {
  2430. private _onSelectionChangeObserver;
  2431. private _onTabChangedObserver;
  2432. private _once;
  2433. constructor(props: IActionTabsComponentProps);
  2434. componentDidMount(): void;
  2435. componentWillUnmount(): void;
  2436. changeSelectedTab(index: number): void;
  2437. renderContent(): JSX.Element | null;
  2438. onClose(): void;
  2439. onPopup(): void;
  2440. render(): JSX.Element;
  2441. }
  2442. }
  2443. declare module INSPECTOR {
  2444. interface ITreeItemLabelComponentProps {
  2445. label: string;
  2446. onClick?: () => void;
  2447. color: string;
  2448. }
  2449. export class TreeItemLabelComponent extends React.Component<ITreeItemLabelComponentProps> {
  2450. constructor(props: ITreeItemLabelComponentProps);
  2451. onClick(): void;
  2452. render(): JSX.Element;
  2453. }
  2454. }
  2455. declare module INSPECTOR {
  2456. interface IExtensionsComponentProps {
  2457. target: any;
  2458. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2459. }
  2460. export class ExtensionsComponent extends React.Component<IExtensionsComponentProps, {
  2461. popupVisible: boolean;
  2462. }> {
  2463. private _popup;
  2464. private extensionRef;
  2465. constructor(props: IExtensionsComponentProps);
  2466. showPopup(): void;
  2467. componentDidMount(): void;
  2468. componentDidUpdate(): void;
  2469. render(): JSX.Element | null;
  2470. }
  2471. }
  2472. declare module INSPECTOR {
  2473. interface IMeshTreeItemComponentProps {
  2474. mesh: BABYLON.AbstractMesh;
  2475. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2476. onClick: () => void;
  2477. globalState: GlobalState;
  2478. }
  2479. export class MeshTreeItemComponent extends React.Component<IMeshTreeItemComponentProps, {
  2480. isBoundingBoxEnabled: boolean;
  2481. isVisible: boolean;
  2482. }> {
  2483. constructor(props: IMeshTreeItemComponentProps);
  2484. showBoundingBox(): void;
  2485. switchVisibility(): void;
  2486. render(): JSX.Element;
  2487. }
  2488. }
  2489. declare module INSPECTOR {
  2490. interface ICameraTreeItemComponentProps {
  2491. camera: BABYLON.Camera;
  2492. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2493. onClick: () => void;
  2494. globalState: GlobalState;
  2495. }
  2496. export class CameraTreeItemComponent extends React.Component<ICameraTreeItemComponentProps, {
  2497. isActive: boolean;
  2498. isGizmoEnabled: boolean;
  2499. }> {
  2500. private _onBeforeRenderObserver;
  2501. constructor(props: ICameraTreeItemComponentProps);
  2502. setActive(): void;
  2503. componentDidMount(): void;
  2504. componentWillUnmount(): void;
  2505. toggleGizmo(): void;
  2506. render(): JSX.Element;
  2507. }
  2508. }
  2509. declare module INSPECTOR {
  2510. interface ILightTreeItemComponentProps {
  2511. light: BABYLON.Light;
  2512. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2513. onClick: () => void;
  2514. globalState: GlobalState;
  2515. }
  2516. export class LightTreeItemComponent extends React.Component<ILightTreeItemComponentProps, {
  2517. isEnabled: boolean;
  2518. isGizmoEnabled: boolean;
  2519. }> {
  2520. constructor(props: ILightTreeItemComponentProps);
  2521. switchIsEnabled(): void;
  2522. toggleGizmo(): void;
  2523. render(): JSX.Element;
  2524. }
  2525. }
  2526. declare module INSPECTOR {
  2527. interface IMaterialTreeItemComponentProps {
  2528. material: BABYLON.Material | BABYLON.NodeMaterial;
  2529. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2530. onClick: () => void;
  2531. }
  2532. export class MaterialTreeItemComponent extends React.Component<IMaterialTreeItemComponentProps> {
  2533. constructor(props: IMaterialTreeItemComponentProps);
  2534. render(): JSX.Element;
  2535. }
  2536. }
  2537. declare module INSPECTOR {
  2538. interface ITextureTreeItemComponentProps {
  2539. texture: BABYLON.Texture;
  2540. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2541. onClick: () => void;
  2542. }
  2543. export class TextureTreeItemComponent extends React.Component<ITextureTreeItemComponentProps> {
  2544. constructor(props: ITextureTreeItemComponentProps);
  2545. render(): JSX.Element;
  2546. }
  2547. }
  2548. declare module INSPECTOR {
  2549. interface ITransformNodeItemComponentProps {
  2550. transformNode: BABYLON.TransformNode;
  2551. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2552. onClick: () => void;
  2553. }
  2554. export class TransformNodeItemComponent extends React.Component<ITransformNodeItemComponentProps> {
  2555. constructor(props: ITransformNodeItemComponentProps);
  2556. render(): JSX.Element;
  2557. }
  2558. }
  2559. declare module INSPECTOR {
  2560. interface IControlTreeItemComponentProps {
  2561. control: BABYLON.GUI.Control;
  2562. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2563. onClick: () => void;
  2564. }
  2565. export class ControlTreeItemComponent extends React.Component<IControlTreeItemComponentProps, {
  2566. isActive: boolean;
  2567. isVisible: boolean;
  2568. }> {
  2569. constructor(props: IControlTreeItemComponentProps);
  2570. highlight(): void;
  2571. switchVisibility(): void;
  2572. render(): JSX.Element;
  2573. }
  2574. }
  2575. declare module INSPECTOR {
  2576. interface IAdvancedDynamicTextureTreeItemComponentProps {
  2577. texture: BABYLON.GUI.AdvancedDynamicTexture;
  2578. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2579. onSelectionChangedObservable?: BABYLON.Observable<any>;
  2580. onClick: () => void;
  2581. }
  2582. export class AdvancedDynamicTextureTreeItemComponent extends React.Component<IAdvancedDynamicTextureTreeItemComponentProps, {
  2583. isInPickingMode: boolean;
  2584. }> {
  2585. private _onControlPickedObserver;
  2586. constructor(props: IAdvancedDynamicTextureTreeItemComponentProps);
  2587. componentWillUnmount(): void;
  2588. onPickingMode(): void;
  2589. render(): JSX.Element;
  2590. }
  2591. }
  2592. declare module INSPECTOR {
  2593. interface IAnimationGroupItemComponentProps {
  2594. animationGroup: BABYLON.AnimationGroup;
  2595. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2596. onClick: () => void;
  2597. }
  2598. export class AnimationGroupItemComponent extends React.Component<IAnimationGroupItemComponentProps> {
  2599. constructor(props: IAnimationGroupItemComponentProps);
  2600. render(): JSX.Element;
  2601. }
  2602. }
  2603. declare module INSPECTOR {
  2604. interface IPostProcessItemComponentProps {
  2605. postProcess: BABYLON.PostProcess;
  2606. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2607. onClick: () => void;
  2608. }
  2609. export class PostProcessItemComponent extends React.Component<IPostProcessItemComponentProps> {
  2610. constructor(props: IPostProcessItemComponentProps);
  2611. render(): JSX.Element;
  2612. }
  2613. }
  2614. declare module INSPECTOR {
  2615. interface IRenderPipelineItemComponenttProps {
  2616. renderPipeline: BABYLON.PostProcessRenderPipeline;
  2617. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2618. onClick: () => void;
  2619. }
  2620. export class RenderingPipelineItemComponent extends React.Component<IRenderPipelineItemComponenttProps> {
  2621. constructor(props: IRenderPipelineItemComponenttProps);
  2622. render(): JSX.Element;
  2623. }
  2624. }
  2625. declare module INSPECTOR {
  2626. interface ISkeletonTreeItemComponentProps {
  2627. skeleton: BABYLON.Skeleton;
  2628. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2629. onClick: () => void;
  2630. }
  2631. export class SkeletonTreeItemComponent extends React.Component<ISkeletonTreeItemComponentProps> {
  2632. constructor(props: ISkeletonTreeItemComponentProps);
  2633. render(): JSX.Element;
  2634. }
  2635. }
  2636. declare module INSPECTOR {
  2637. interface IBoneTreeItemComponenttProps {
  2638. bone: BABYLON.Bone;
  2639. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2640. onClick: () => void;
  2641. }
  2642. export class BoneTreeItemComponent extends React.Component<IBoneTreeItemComponenttProps> {
  2643. constructor(props: IBoneTreeItemComponenttProps);
  2644. render(): JSX.Element;
  2645. }
  2646. }
  2647. declare module INSPECTOR {
  2648. interface IParticleSystemTreeItemComponentProps {
  2649. system: BABYLON.IParticleSystem;
  2650. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2651. onClick: () => void;
  2652. }
  2653. export class ParticleSystemTreeItemComponent extends React.Component<IParticleSystemTreeItemComponentProps> {
  2654. constructor(props: IParticleSystemTreeItemComponentProps);
  2655. render(): JSX.Element;
  2656. }
  2657. }
  2658. declare module INSPECTOR {
  2659. interface ISpriteManagerTreeItemComponentProps {
  2660. spriteManager: BABYLON.SpriteManager;
  2661. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2662. onClick: () => void;
  2663. }
  2664. export class SpriteManagerTreeItemComponent extends React.Component<ISpriteManagerTreeItemComponentProps> {
  2665. constructor(props: ISpriteManagerTreeItemComponentProps);
  2666. render(): JSX.Element;
  2667. }
  2668. }
  2669. declare module INSPECTOR {
  2670. interface ISpriteTreeItemComponentProps {
  2671. sprite: BABYLON.Sprite;
  2672. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2673. onClick: () => void;
  2674. }
  2675. export class SpriteTreeItemComponent extends React.Component<ISpriteTreeItemComponentProps> {
  2676. constructor(props: ISpriteTreeItemComponentProps);
  2677. render(): JSX.Element;
  2678. }
  2679. }
  2680. declare module INSPECTOR {
  2681. interface ITargetedAnimationItemComponentProps {
  2682. targetedAnimation: BABYLON.TargetedAnimation;
  2683. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2684. onClick: () => void;
  2685. }
  2686. export class TargetedAnimationItemComponent extends React.Component<ITargetedAnimationItemComponentProps> {
  2687. constructor(props: ITargetedAnimationItemComponentProps);
  2688. render(): JSX.Element;
  2689. }
  2690. }
  2691. declare module INSPECTOR {
  2692. interface ISoundTreeItemComponentProps {
  2693. sound: BABYLON.Sound;
  2694. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2695. onClick: () => void;
  2696. }
  2697. export class SoundTreeItemComponent extends React.Component<ISoundTreeItemComponentProps> {
  2698. constructor(props: ISoundTreeItemComponentProps);
  2699. render(): JSX.Element;
  2700. }
  2701. }
  2702. declare module INSPECTOR {
  2703. interface ITreeItemSpecializedComponentProps {
  2704. label: string;
  2705. entity?: any;
  2706. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2707. globalState: GlobalState;
  2708. onClick?: () => void;
  2709. }
  2710. export class TreeItemSpecializedComponent extends React.Component<ITreeItemSpecializedComponentProps> {
  2711. constructor(props: ITreeItemSpecializedComponentProps);
  2712. onClick(): void;
  2713. render(): JSX.Element;
  2714. }
  2715. }
  2716. declare module INSPECTOR {
  2717. export class Tools {
  2718. static LookForItem(item: any, selectedEntity: any): boolean;
  2719. private static _RecursiveRemoveHiddenMeshesAndHoistChildren;
  2720. static SortAndFilter(parent: any, items: any[]): any[];
  2721. }
  2722. }
  2723. declare module INSPECTOR {
  2724. export interface ITreeItemSelectableComponentProps {
  2725. entity: any;
  2726. selectedEntity?: any;
  2727. mustExpand?: boolean;
  2728. offset: number;
  2729. globalState: GlobalState;
  2730. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2731. filter: BABYLON.Nullable<string>;
  2732. }
  2733. export class TreeItemSelectableComponent extends React.Component<ITreeItemSelectableComponentProps, {
  2734. isExpanded: boolean;
  2735. isSelected: boolean;
  2736. }> {
  2737. private _wasSelected;
  2738. constructor(props: ITreeItemSelectableComponentProps);
  2739. switchExpandedState(): void;
  2740. shouldComponentUpdate(nextProps: ITreeItemSelectableComponentProps, nextState: {
  2741. isExpanded: boolean;
  2742. isSelected: boolean;
  2743. }): boolean;
  2744. scrollIntoView(): void;
  2745. componentDidMount(): void;
  2746. componentDidUpdate(): void;
  2747. onSelect(): void;
  2748. renderChildren(): JSX.Element[] | null;
  2749. render(): JSX.Element | null;
  2750. }
  2751. }
  2752. declare module INSPECTOR {
  2753. export interface ITreeItemComponentProps {
  2754. items?: BABYLON.Nullable<any[]>;
  2755. label: string;
  2756. offset: number;
  2757. filter: BABYLON.Nullable<string>;
  2758. forceSubitems?: boolean;
  2759. globalState: GlobalState;
  2760. entity?: any;
  2761. selectedEntity: any;
  2762. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2763. contextMenuItems?: {
  2764. label: string;
  2765. action: () => void;
  2766. }[];
  2767. }
  2768. export class TreeItemComponent extends React.Component<ITreeItemComponentProps, {
  2769. isExpanded: boolean;
  2770. mustExpand: boolean;
  2771. }> {
  2772. static _ContextMenuUniqueIdGenerator: number;
  2773. constructor(props: ITreeItemComponentProps);
  2774. switchExpandedState(): void;
  2775. shouldComponentUpdate(nextProps: ITreeItemComponentProps, nextState: {
  2776. isExpanded: boolean;
  2777. }): boolean;
  2778. expandAll(expand: boolean): void;
  2779. renderContextMenu(): JSX.Element | null;
  2780. render(): JSX.Element;
  2781. }
  2782. }
  2783. declare module INSPECTOR {
  2784. interface ISceneTreeItemComponentProps {
  2785. scene: BABYLON.Scene;
  2786. onRefresh: () => void;
  2787. selectedEntity?: any;
  2788. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2789. onSelectionChangedObservable?: BABYLON.Observable<any>;
  2790. globalState: GlobalState;
  2791. }
  2792. export class SceneTreeItemComponent extends React.Component<ISceneTreeItemComponentProps, {
  2793. isSelected: boolean;
  2794. isInPickingMode: boolean;
  2795. gizmoMode: number;
  2796. }> {
  2797. private _gizmoLayerOnPointerObserver;
  2798. private _onPointerObserver;
  2799. private _onSelectionChangeObserver;
  2800. private _selectedEntity;
  2801. private _posDragEnd;
  2802. private _scaleDragEnd;
  2803. private _rotateDragEnd;
  2804. constructor(props: ISceneTreeItemComponentProps);
  2805. shouldComponentUpdate(nextProps: ISceneTreeItemComponentProps, nextState: {
  2806. isSelected: boolean;
  2807. isInPickingMode: boolean;
  2808. }): boolean;
  2809. componentDidMount(): void;
  2810. componentWillUnmount(): void;
  2811. onSelect(): void;
  2812. onPickingMode(): void;
  2813. setGizmoMode(mode: number): void;
  2814. render(): JSX.Element;
  2815. }
  2816. }
  2817. declare module INSPECTOR {
  2818. interface ISceneExplorerFilterComponentProps {
  2819. onFilter: (filter: string) => void;
  2820. }
  2821. export class SceneExplorerFilterComponent extends React.Component<ISceneExplorerFilterComponentProps> {
  2822. constructor(props: ISceneExplorerFilterComponentProps);
  2823. render(): JSX.Element;
  2824. }
  2825. interface ISceneExplorerComponentProps {
  2826. scene: BABYLON.Scene;
  2827. noCommands?: boolean;
  2828. noHeader?: boolean;
  2829. noExpand?: boolean;
  2830. noClose?: boolean;
  2831. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2832. globalState: GlobalState;
  2833. popupMode?: boolean;
  2834. onPopup?: () => void;
  2835. onClose?: () => void;
  2836. }
  2837. export class SceneExplorerComponent extends React.Component<ISceneExplorerComponentProps, {
  2838. filter: BABYLON.Nullable<string>;
  2839. selectedEntity: any;
  2840. scene: BABYLON.Scene;
  2841. }> {
  2842. private _onSelectionChangeObserver;
  2843. private _onSelectionRenamedObserver;
  2844. private _onNewSceneAddedObserver;
  2845. private _onNewSceneObserver;
  2846. private sceneExplorerRef;
  2847. private _once;
  2848. private _hooked;
  2849. private sceneMutationFunc;
  2850. constructor(props: ISceneExplorerComponentProps);
  2851. processMutation(): void;
  2852. componentDidMount(): void;
  2853. componentWillUnmount(): void;
  2854. filterContent(filter: string): void;
  2855. findSiblings(parent: any, items: any[], target: any, goNext: boolean, data: {
  2856. previousOne?: any;
  2857. found?: boolean;
  2858. }): boolean;
  2859. processKeys(keyEvent: React.KeyboardEvent<HTMLDivElement>): void;
  2860. renderContent(): JSX.Element | null;
  2861. onClose(): void;
  2862. onPopup(): void;
  2863. render(): JSX.Element;
  2864. }
  2865. }
  2866. declare module INSPECTOR {
  2867. interface IEmbedHostComponentProps {
  2868. scene: BABYLON.Scene;
  2869. globalState: GlobalState;
  2870. popupMode: boolean;
  2871. noClose?: boolean;
  2872. noExpand?: boolean;
  2873. onClose: () => void;
  2874. onPopup: () => void;
  2875. extensibilityGroups?: BABYLON.IExplorerExtensibilityGroup[];
  2876. initialTab?: BABYLON.DebugLayerTab;
  2877. }
  2878. export class EmbedHostComponent extends React.Component<IEmbedHostComponentProps> {
  2879. private _once;
  2880. private splitRef;
  2881. private topPartRef;
  2882. private bottomPartRef;
  2883. constructor(props: IEmbedHostComponentProps);
  2884. componentDidMount(): void;
  2885. renderContent(): JSX.Element;
  2886. render(): JSX.Element;
  2887. }
  2888. }
  2889. declare module INSPECTOR {
  2890. export class Inspector {
  2891. private static _SceneExplorerHost;
  2892. private static _ActionTabsHost;
  2893. private static _EmbedHost;
  2894. private static _NewCanvasContainer;
  2895. private static _SceneExplorerWindow;
  2896. private static _ActionTabsWindow;
  2897. private static _EmbedHostWindow;
  2898. private static _Scene;
  2899. private static _OpenedPane;
  2900. private static _OnBeforeRenderObserver;
  2901. static OnSelectionChangeObservable: BABYLON.Observable<any>;
  2902. static OnPropertyChangedObservable: BABYLON.Observable<PropertyChangedEvent>;
  2903. private static _GlobalState;
  2904. static MarkLineContainerTitleForHighlighting(title: string): void;
  2905. static MarkMultipleLineContainerTitlesForHighlighting(titles: string[]): void;
  2906. private static _CopyStyles;
  2907. private static _CreateSceneExplorer;
  2908. private static _CreateActionTabs;
  2909. private static _CreateEmbedHost;
  2910. static _CreatePopup(title: string, windowVariableName: string, width?: number, height?: number, lateBinding?: boolean): HTMLDivElement | null;
  2911. static get IsVisible(): boolean;
  2912. static EarlyAttachToLoader(): void;
  2913. static Show(scene: BABYLON.Scene, userOptions: Partial<BABYLON.IInspectorOptions>): void;
  2914. static _SetNewScene(scene: BABYLON.Scene): void;
  2915. static _CreateCanvasContainer(parentControl: HTMLElement): void;
  2916. private static _DestroyCanvasContainer;
  2917. private static _Cleanup;
  2918. private static _RemoveElementFromDOM;
  2919. static Hide(): void;
  2920. }
  2921. }
  2922. declare module INSPECTOR {
  2923. interface IAddAnimationProps {
  2924. isOpen: boolean;
  2925. close: () => void;
  2926. entity: BABYLON.IAnimatable;
  2927. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  2928. setNotificationMessage: (message: string) => void;
  2929. finishedUpdate: () => void;
  2930. addedNewAnimation: (animation: BABYLON.Animation) => void;
  2931. fps: number;
  2932. selectedToUpdate?: BABYLON.Animation | undefined;
  2933. }
  2934. /**
  2935. * Controls the creation of a new animation.
  2936. * @property {boolean} isOpen controls if the add animation pannel is open or closed in the editor controls;
  2937. * @property {()=>void} close sends the message to close this panel setting isOpen to false;
  2938. * @property {IAnimatable} entity is the animation object to add the animation to;
  2939. * @property {Observable<PropertyChangedEvent>} onPropertyChangedObservable is the registered observable
  2940. * @property {(message: string) => void} setNotificationMessage sends the message string to display errors on the message box
  2941. * @property {() => void} finishedUpdate tells the parent component the update on the animation collection has completed
  2942. * @property { (animation: BABYLON.Animation) => void} addedNewAnimation sends the animation to the editor to process how its is rendered
  2943. * @property {number} fps Frames per second of the animation.
  2944. * @property {Animation | undefined} selectedToUpdate the selected animation so we can update the renderer curve.
  2945. */
  2946. export class AddAnimation extends React.Component<IAddAnimationProps, {
  2947. animationName: string;
  2948. animationTargetProperty: string;
  2949. animationType: number;
  2950. loopMode: number;
  2951. animationTargetPath: string;
  2952. isUpdating: boolean;
  2953. }> {
  2954. constructor(props: IAddAnimationProps);
  2955. setInitialState(editingAnimation?: BABYLON.Animation): {
  2956. animationName: string;
  2957. animationTargetPath: string;
  2958. animationType: number;
  2959. loopMode: number;
  2960. animationTargetProperty: string;
  2961. isUpdating: boolean;
  2962. };
  2963. /**
  2964. * We decide wether the animation will be added or edited
  2965. * @param prevProps Previous props.
  2966. * @param prevState Previous state.
  2967. */
  2968. componentDidUpdate(prevProps: IAddAnimationProps, prevState: any): void;
  2969. /**
  2970. * Updates the animation with the correct properties
  2971. * Updates its name, loopmode and targetProperty.
  2972. * This allows the edition of the animation in the curve editor.
  2973. * We can only update these props for the animation.
  2974. * Keyframes of course are updated on the curve editor.
  2975. */
  2976. updateAnimation: () => void;
  2977. /**
  2978. * Returns the animation type as string
  2979. * @param type Type of animation so we return a string.
  2980. */
  2981. getTypeAsString(type: number): "Size" | "Color4" | "Vector3" | "Float" | "Quaternion" | "Vector2" | "Color3";
  2982. /**
  2983. * Process the creation of a new animation.
  2984. * We verify is the property to animate is present on the object
  2985. * We verify if the property derives from a correct class *type of animation to add an animation
  2986. * At the end we create an empty animation named animation.
  2987. * The animation keys array is set to empty so we can add keyframes in the editor.
  2988. * We return the animation to the curve editor and update the entity animation collection
  2989. */
  2990. addAnimation: () => void;
  2991. raiseOnPropertyChanged(newValue: BABYLON.Animation[], previousValue: BABYLON.Animation[]): void;
  2992. raiseOnPropertyUpdated(newValue: string | number | undefined, previousValue: string | number, property: string): void;
  2993. handlePathChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
  2994. handleNameChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
  2995. handleTypeChange: (event: React.ChangeEvent<HTMLSelectElement>) => void;
  2996. handlePropertyChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
  2997. handleLoopModeChange: (event: React.ChangeEvent<HTMLSelectElement>) => void;
  2998. render(): JSX.Element;
  2999. }
  3000. }
  3001. declare module INSPECTOR {
  3002. interface IAnchorSvgPointProps {
  3003. control: BABYLON.Vector2;
  3004. anchor: BABYLON.Vector2;
  3005. active: boolean;
  3006. type: string;
  3007. index: string;
  3008. selected: boolean;
  3009. selectControlPoint: (id: string) => void;
  3010. framesInCanvasView: {
  3011. from: number;
  3012. to: number;
  3013. };
  3014. }
  3015. /**
  3016. * Renders the control point to a keyframe.
  3017. * Each keyframe has left and right control points to control de tangent of the curve
  3018. * This controls the inTangent and outTangent values for the keyframe in the animation.
  3019. * @property {Vector2} control is the control point to control de curve tangent
  3020. * @property {Vector2} anchor represents the Keyframe point which acts origin point.
  3021. * @property {boolen} active tells the component if the control point is currently active
  3022. * @property {string} type (left/right) if the control will be the left or right control point
  3023. * @property {boolean} selected if the control point is currently selected. If selected we can move the control point and will become active
  3024. * @property {(id: string) => void;} selectControlPoint sends the id of the control point to the parent component to tell if it is selected
  3025. * @property {{ from: number; to: number }} framesInCanvasView controls from/to which keyframe should the control point can expand and control de curve
  3026. * The frames in canvas tells us how many frames are currently visible in the canvas and therefore control the width of the line between the control and anchor point
  3027. */
  3028. export class AnchorSvgPoint extends React.Component<IAnchorSvgPointProps, {
  3029. visiblePoint: BABYLON.Vector2;
  3030. }> {
  3031. constructor(props: IAnchorSvgPointProps);
  3032. componentDidUpdate(prevProps: IAnchorSvgPointProps, prevState: any): void;
  3033. select: () => void;
  3034. /**
  3035. * Controls where should we render the visible point (representing the control point)
  3036. * The visible control point differs from the control point for UX reasons. The control point
  3037. * expands beyond the visible canvas.
  3038. */
  3039. setVisiblePoint(): BABYLON.Vector2;
  3040. render(): JSX.Element;
  3041. }
  3042. }
  3043. declare module INSPECTOR {
  3044. export interface IKeyframeSvgPoint {
  3045. keyframePoint: BABYLON.Vector2;
  3046. rightControlPoint: BABYLON.Vector2 | null;
  3047. leftControlPoint: BABYLON.Vector2 | null;
  3048. id: string;
  3049. selected: boolean;
  3050. isLeftActive: boolean;
  3051. isRightActive: boolean;
  3052. curveId?: ICurveMetaData;
  3053. }
  3054. export interface ICurveMetaData {
  3055. id: number;
  3056. animationName: string;
  3057. property: string;
  3058. }
  3059. interface IKeyframeSvgPointProps {
  3060. keyframePoint: BABYLON.Vector2;
  3061. leftControlPoint: BABYLON.Vector2 | null;
  3062. rightControlPoint: BABYLON.Vector2 | null;
  3063. id: string;
  3064. selected: boolean;
  3065. selectKeyframe: (id: string, multiselect: boolean) => void;
  3066. selectedControlPoint: (type: string, id: string) => void;
  3067. isLeftActive: boolean;
  3068. isRightActive: boolean;
  3069. framesInCanvasView: {
  3070. from: number;
  3071. to: number;
  3072. };
  3073. }
  3074. /**
  3075. * Renders the Keyframe as an SVG Element for the Canvas component.
  3076. * Holds the two control points to generate the proper curve.
  3077. */
  3078. export class KeyframeSvgPoint extends React.Component<IKeyframeSvgPointProps> {
  3079. constructor(props: IKeyframeSvgPointProps);
  3080. /**
  3081. * Select a keyframe. If the control key is pressed, multiselect keyframes
  3082. * @param e Mouse event
  3083. */
  3084. select: (e: React.MouseEvent<SVGImageElement>) => void;
  3085. /**
  3086. * Send the ID of the selected keyframe
  3087. * @param type Type of selected keyframe
  3088. */
  3089. selectedControlPointId: (type: string) => void;
  3090. render(): JSX.Element;
  3091. }
  3092. }
  3093. declare module INSPECTOR {
  3094. interface ISvgDraggableAreaProps {
  3095. keyframeSvgPoints: IKeyframeSvgPoint[];
  3096. updatePosition: (updatedKeyframe: IKeyframeSvgPoint, id: string) => void;
  3097. scale: number;
  3098. viewBoxScale: number;
  3099. deselectKeyframes: () => void;
  3100. removeSelectedKeyframes: (points: IKeyframeSvgPoint[]) => void;
  3101. panningY: (panningY: number) => void;
  3102. panningX: (panningX: number) => void;
  3103. setCurrentFrame: (direction: number) => void;
  3104. positionCanvas?: BABYLON.Vector2;
  3105. repositionCanvas?: boolean;
  3106. canvasPositionEnded: () => void;
  3107. resetActionableKeyframe: () => void;
  3108. framesInCanvasView: {
  3109. from: number;
  3110. to: number;
  3111. };
  3112. framesResized: number;
  3113. }
  3114. /**
  3115. * The SvgDraggableArea is a wrapper for SVG Canvas the interaction
  3116. *
  3117. * Here we control the drag and key behavior for the SVG components.
  3118. */
  3119. export class SvgDraggableArea extends React.Component<ISvgDraggableAreaProps, {
  3120. panX: number;
  3121. panY: number;
  3122. }> {
  3123. private _active;
  3124. private _isCurrentPointControl;
  3125. private _currentPointId;
  3126. private _draggableArea;
  3127. private _panStart;
  3128. private _panStop;
  3129. private _playheadDrag;
  3130. private _playheadSelected;
  3131. private _movedX;
  3132. private _movedY;
  3133. private _isControlKeyPress;
  3134. readonly _dragBuffer: number;
  3135. readonly _draggingMultiplier: number;
  3136. constructor(props: ISvgDraggableAreaProps);
  3137. /**
  3138. * Listen to key events to be able to drag and set the correct canvas client width
  3139. */
  3140. componentDidMount(): void;
  3141. /**
  3142. * Makes sure the canvas has resposition correctly
  3143. * @param prevProps previous props
  3144. */
  3145. componentDidUpdate(prevProps: ISvgDraggableAreaProps): void;
  3146. /**
  3147. * Identify the type of target of the mouse event
  3148. * @param e SVG Mouse Event
  3149. */
  3150. dragStart: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
  3151. /**
  3152. * Handle dragging
  3153. * @param e SVG Mouse Event
  3154. */
  3155. drag: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
  3156. /**
  3157. * Resets the dragging state
  3158. * @param e Drag event
  3159. */
  3160. dragEnd: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
  3161. /**
  3162. * Gets the current position of the mouse in a SVG Canvas
  3163. * @param e Mouse event
  3164. */
  3165. getMousePosition: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => BABYLON.Vector2 | undefined;
  3166. /**
  3167. * Handles the canvas panning direction and sets the X and Y values to move the
  3168. * SVG canvas
  3169. */
  3170. panDirection(): void;
  3171. /**
  3172. * Allows dragging
  3173. * @param e Keyboard event
  3174. */
  3175. keyDown(e: KeyboardEvent): void;
  3176. /**
  3177. * Allows multiple selection
  3178. * @param e Keyboard event
  3179. */
  3180. keyUp(e: KeyboardEvent): void;
  3181. /**
  3182. * Focus on the SVG canvas
  3183. * @param e Mouse event
  3184. */
  3185. focus: (e: React.MouseEvent<SVGSVGElement>) => void;
  3186. /**
  3187. * Is the control point active or not
  3188. */
  3189. isNotControlPointActive(): boolean;
  3190. render(): JSX.Element;
  3191. }
  3192. }
  3193. declare module INSPECTOR {
  3194. export interface IIconButtonLineComponentProps {
  3195. icon: string;
  3196. onClick: () => void;
  3197. tooltip: string;
  3198. active?: boolean;
  3199. }
  3200. export class IconButtonLineComponent extends React.Component<IIconButtonLineComponentProps> {
  3201. constructor(props: IIconButtonLineComponentProps);
  3202. render(): JSX.Element;
  3203. }
  3204. }
  3205. declare module INSPECTOR {
  3206. interface IControlsProps {
  3207. keyframes: BABYLON.IAnimationKey[] | null;
  3208. selected: BABYLON.IAnimationKey | null;
  3209. currentFrame: number;
  3210. onCurrentFrameChange: (frame: number) => void;
  3211. repositionCanvas: (keyframe: BABYLON.IAnimationKey) => void;
  3212. playPause: (direction: number) => void;
  3213. isPlaying: boolean;
  3214. scrollable: React.RefObject<HTMLDivElement>;
  3215. }
  3216. /**
  3217. * The playback controls for the animation editor
  3218. */
  3219. export class Controls extends React.Component<IControlsProps, {
  3220. selected: BABYLON.IAnimationKey;
  3221. playingType: string;
  3222. }> {
  3223. readonly _sizeOfKeyframe: number;
  3224. constructor(props: IControlsProps);
  3225. playBackwards: () => void;
  3226. play: () => void;
  3227. pause: () => void;
  3228. /**
  3229. * Set animation to initial keyframe
  3230. */
  3231. moveToAnimationStart: () => void;
  3232. /**
  3233. * Set animation to the last keyframe
  3234. */
  3235. moveToAnimationEnd: () => void;
  3236. /** Move to next keyframe */
  3237. nextKeyframe: () => void;
  3238. /** Move to previous keyframe */
  3239. previousKeyframe: () => void;
  3240. render(): JSX.Element;
  3241. }
  3242. }
  3243. declare module INSPECTOR {
  3244. interface ITimelineProps {
  3245. keyframes: BABYLON.IAnimationKey[] | null;
  3246. selected: BABYLON.IAnimationKey | null;
  3247. currentFrame: number;
  3248. onCurrentFrameChange: (frame: number) => void;
  3249. onAnimationLimitChange: (limit: number) => void;
  3250. dragKeyframe: (frame: number, index: number) => void;
  3251. playPause: (direction: number) => void;
  3252. isPlaying: boolean;
  3253. animationLimit: number;
  3254. fps: number;
  3255. repositionCanvas: (keyframe: BABYLON.IAnimationKey) => void;
  3256. resizeWindowProportion: number;
  3257. }
  3258. interface ITimelineState {
  3259. selected: BABYLON.IAnimationKey;
  3260. activeKeyframe: number | null;
  3261. start: number;
  3262. end: number;
  3263. scrollWidth: number | undefined;
  3264. selectionLength: number[];
  3265. limitValue: number;
  3266. }
  3267. /**
  3268. * The Timeline for the curve editor
  3269. *
  3270. * Has a scrollbar that can be resized and move to left and right.
  3271. * The timeline does not affect the Canvas but only the frame container.
  3272. */
  3273. export class Timeline extends React.Component<ITimelineProps, ITimelineState> {
  3274. private _scrollable;
  3275. private _scrollbarHandle;
  3276. private _scrollContainer;
  3277. private _inputAnimationLimit;
  3278. private _direction;
  3279. private _scrolling;
  3280. private _shiftX;
  3281. private _active;
  3282. readonly _marginScrollbar: number;
  3283. constructor(props: ITimelineProps);
  3284. /** Listen to keyup events and set the initial lenght of the scrollbar */
  3285. componentDidMount(): void;
  3286. /** Recalculate the scrollwidth if a window resize happens */
  3287. componentDidUpdate(prevProps: ITimelineProps): void;
  3288. /** Remove key event listener */
  3289. componentWillUnmount(): void;
  3290. /**
  3291. * Set component state if enter key is pressed
  3292. * @param event enter key event
  3293. */
  3294. isEnterKeyUp(event: KeyboardEvent): void;
  3295. /**
  3296. * Detect blur event
  3297. * @param event Blur event
  3298. */
  3299. onInputBlur(event: React.FocusEvent<HTMLInputElement>): void;
  3300. /** Set component state (scrollbar width, position, and start and end) */
  3301. setControlState(): void;
  3302. /**
  3303. * Set scrollwidth on the timeline
  3304. * @param {number} start Frame from which the scrollbar should begin.
  3305. * @param {number} end Last frame for the timeline.
  3306. */
  3307. calculateScrollWidth(start: number, end: number): number | undefined;
  3308. /**
  3309. * Play animation backwards
  3310. * @param event Mouse event
  3311. */
  3312. playBackwards(event: React.MouseEvent<HTMLDivElement>): void;
  3313. /**
  3314. * Play animation
  3315. * @param event Mouse event
  3316. */
  3317. play(event: React.MouseEvent<HTMLDivElement>): void;
  3318. /**
  3319. * Pause the animation
  3320. * @param event Mouse event
  3321. */
  3322. pause(event: React.MouseEvent<HTMLDivElement>): void;
  3323. /**
  3324. * Set the selected frame
  3325. * @param event Mouse event
  3326. */
  3327. setCurrentFrame: (event: React.MouseEvent<HTMLDivElement>) => void;
  3328. /**
  3329. * Handles the change of number of frames available in the timeline.
  3330. */
  3331. handleLimitChange(event: React.ChangeEvent<HTMLInputElement>): void;
  3332. /**
  3333. * Starts the scrollbar dragging
  3334. * @param e Mouse event on SVG Element
  3335. */
  3336. dragStart: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
  3337. /**
  3338. * Update the canvas visible frames while dragging
  3339. * @param e Mouse event
  3340. */
  3341. drag: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
  3342. /**
  3343. * Check if the frame is being used as a Keyframe by the animation
  3344. * @param frame number of frame
  3345. * @param direction frame increment or decrement
  3346. */
  3347. isFrameBeingUsed(frame: number, direction: number): number | false;
  3348. /**
  3349. * Reset drag state
  3350. * @param e Mouse event on SVG Element
  3351. */
  3352. dragEnd: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
  3353. /**
  3354. * Change position of the scrollbar
  3355. * @param e Mouse event
  3356. */
  3357. scrollDragStart: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
  3358. /**
  3359. * Change size of scrollbar
  3360. * @param e Mouse event
  3361. */
  3362. scrollDrag: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
  3363. /**
  3364. * Reset scroll drag
  3365. * @param e Mouse event
  3366. */
  3367. scrollDragEnd: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
  3368. /**
  3369. * Sets the start, end and selection length of the scrollbar. This will control the width and
  3370. * height of the scrollbar as well as the number of frames available
  3371. * @param {number} pageX Controls the X axis of the scrollbar movement.
  3372. */
  3373. moveScrollbar(pageX: number): void;
  3374. /**
  3375. * Controls the resizing of the scrollbar from the right handle
  3376. * @param {number} clientX how much mouse has moved
  3377. */
  3378. resizeScrollbarRight(clientX: number): void;
  3379. /**
  3380. * Controls the resizing of the scrollbar from the left handle
  3381. * @param {number} clientX how much mouse has moved
  3382. */
  3383. resizeScrollbarLeft(clientX: number): void;
  3384. /**
  3385. * Returns array with the expected length between two numbers
  3386. * @param start initial visible frame
  3387. * @param stop last visible frame
  3388. */
  3389. range(start: number, end: number): number[];
  3390. /**
  3391. * Get the animation keyframe
  3392. * @param frame Frame
  3393. */
  3394. getKeyframe(frame: number): false | BABYLON.IAnimationKey | undefined;
  3395. /**
  3396. * Get the current animation keyframe
  3397. * @param frame Frame
  3398. */
  3399. getCurrentFrame(frame: number): boolean;
  3400. dragDomFalse: () => boolean;
  3401. render(): JSX.Element;
  3402. }
  3403. }
  3404. declare module INSPECTOR {
  3405. interface IPlayheadProps {
  3406. message: string;
  3407. open: boolean;
  3408. close: () => void;
  3409. }
  3410. /**
  3411. * Renders the notification for the user
  3412. */
  3413. export class Notification extends React.Component<IPlayheadProps> {
  3414. constructor(props: IPlayheadProps);
  3415. render(): JSX.Element;
  3416. }
  3417. }
  3418. declare module INSPECTOR {
  3419. interface IGraphActionsBarProps {
  3420. addKeyframe: () => void;
  3421. removeKeyframe: () => void;
  3422. frameSelectedKeyframes: () => void;
  3423. handleValueChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
  3424. handleFrameChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
  3425. flatTangent: () => void;
  3426. brokeTangents: () => void;
  3427. setLerpToActiveControlPoint: () => void;
  3428. brokenMode: boolean;
  3429. lerpMode: boolean;
  3430. actionableKeyframe: IActionableKeyFrame;
  3431. title: string;
  3432. enabled: boolean;
  3433. setKeyframeValue: (actionableKeyframe: IActionableKeyFrame) => void;
  3434. frameRange: {
  3435. min: number | undefined;
  3436. max: number | undefined;
  3437. };
  3438. }
  3439. /**
  3440. * Has the buttons and actions for the Canvas Graph.
  3441. * Handles input change and actions (flat, broken mode, set linear control points)
  3442. */
  3443. export class GraphActionsBar extends React.Component<IGraphActionsBarProps, {
  3444. frame: string;
  3445. value: string;
  3446. min: number | undefined;
  3447. max: number | undefined;
  3448. }> {
  3449. private _frameInput;
  3450. private _valueInput;
  3451. constructor(props: IGraphActionsBarProps);
  3452. /**
  3453. * Listen to keyup changes to handle if the input event has ended or change
  3454. */
  3455. componentDidMount(): void;
  3456. /**
  3457. * Set the changing state of frame, value and range of the actionablekeyframe
  3458. * @param prevProps previous props
  3459. * @param prevState previous state
  3460. */
  3461. componentDidUpdate(prevProps: IGraphActionsBarProps, prevState: any): void;
  3462. /**
  3463. * Returns the frame and value for the keyframe
  3464. * @param keyframe The keyframe to update
  3465. */
  3466. selectedKeyframeChanged(keyframe: IActionableKeyFrame): {
  3467. frame: string;
  3468. value: string;
  3469. };
  3470. /**
  3471. * Remove listeners
  3472. */
  3473. componentWillUnmount(): void;
  3474. /**
  3475. * Trigger the change on the keyframe
  3476. * @param event Enter keyevent
  3477. */
  3478. isEnterKeyUp(event: KeyboardEvent): void;
  3479. /**
  3480. * Trigger the chnage on the keyframe on blur
  3481. * @param event Focus event
  3482. */
  3483. onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
  3484. /**
  3485. * Gets the keyframe frame
  3486. */
  3487. getFrame(): string | number;
  3488. /**
  3489. * Gets the keyframe value
  3490. */
  3491. getValue(): string | number;
  3492. /**
  3493. * Set keyframe value state
  3494. * @param e Input event
  3495. */
  3496. handleValueChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
  3497. /**
  3498. * Set the keyframe frame state
  3499. * @param e Input event
  3500. */
  3501. handleFrameChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
  3502. render(): JSX.Element;
  3503. }
  3504. }
  3505. declare module INSPECTOR {
  3506. interface IAnimationListTreeProps {
  3507. isTargetedAnimation: boolean;
  3508. entity: BABYLON.IAnimatable | BABYLON.TargetedAnimation;
  3509. selected: BABYLON.Animation | null;
  3510. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  3511. selectAnimation: (selected: BABYLON.Animation, coordinate?: SelectedCoordinate) => void;
  3512. empty: () => void;
  3513. editAnimation: (selected: BABYLON.Animation) => void;
  3514. deselectAnimation: () => void;
  3515. }
  3516. interface Item {
  3517. index: number;
  3518. name: string;
  3519. property: string;
  3520. selected: boolean;
  3521. open: boolean;
  3522. }
  3523. export enum SelectedCoordinate {
  3524. x = 0,
  3525. y = 1,
  3526. z = 2,
  3527. w = 3,
  3528. r = 0,
  3529. g = 1,
  3530. b = 2,
  3531. a = 3,
  3532. width = 0,
  3533. height = 1
  3534. }
  3535. interface ItemCoordinate {
  3536. id: string;
  3537. color: string;
  3538. coordinate: SelectedCoordinate;
  3539. }
  3540. /**
  3541. * Renders a list of current animations.
  3542. */
  3543. export class AnimationListTree extends React.Component<IAnimationListTreeProps, {
  3544. selectedCoordinate: SelectedCoordinate;
  3545. selectedAnimation: number;
  3546. animationList: Item[] | null;
  3547. animations: BABYLON.Nullable<BABYLON.Animation[]> | BABYLON.Animation;
  3548. }> {
  3549. constructor(props: IAnimationListTreeProps);
  3550. /**
  3551. * Set the animation list if has changed properties
  3552. * @param prevProps previous properties
  3553. */
  3554. componentDidUpdate(prevProps: IAnimationListTreeProps): void;
  3555. /**
  3556. * Delete animation from list
  3557. */
  3558. deleteAnimation: () => void;
  3559. /**
  3560. * Update the animations collection
  3561. * @param newValue new animation list
  3562. * @param previousValue previous animation list
  3563. */
  3564. raiseOnPropertyChanged(newValue: BABYLON.Animation[], previousValue: BABYLON.Animation[]): void;
  3565. /**
  3566. * Renders the animation list
  3567. */
  3568. generateList(): Item[] | null;
  3569. /**
  3570. * Open or closes the animation to show its coordinate animations
  3571. * @param index BABYLON.Animation index
  3572. */
  3573. toggleProperty(index: number): void;
  3574. /**
  3575. * Select the animation to render
  3576. * @param animation Selected animation
  3577. * @param coordinate Selected coordinate (x, y, z)
  3578. * @param index Index
  3579. */
  3580. setSelectedCoordinate(animation: BABYLON.Animation, coordinate: SelectedCoordinate, index: number): void;
  3581. /**
  3582. * Renders the coordinate belonging to an animation
  3583. * @param i Index
  3584. * @param animation Selected animation
  3585. * @param coordinate Coordinate name
  3586. * @param color Color identifier
  3587. * @param selectedCoordinate Selected coordinate (x, y, z)
  3588. */
  3589. coordinateItem(i: number, animation: BABYLON.Animation, coordinate: string, color: string, selectedCoordinate: SelectedCoordinate): JSX.Element;
  3590. /**
  3591. * Render animation
  3592. * @param animation selected animations
  3593. * @param i index
  3594. * @param childrenElements its coordinate (x,y,z) animations
  3595. */
  3596. typeAnimationItem(animation: BABYLON.Animation, i: number, childrenElements: ItemCoordinate[]): JSX.Element;
  3597. /**
  3598. * Render animation item
  3599. * @param animation Selected aniamtion
  3600. * @param i index
  3601. */
  3602. setListItem(animation: BABYLON.Animation, i: number): JSX.Element | null;
  3603. render(): JSX.Element;
  3604. }
  3605. }
  3606. declare module INSPECTOR {
  3607. interface ILoadSnippetProps {
  3608. animations: BABYLON.Animation[];
  3609. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  3610. lockObject: LockObject;
  3611. globalState: GlobalState;
  3612. snippetServer: string;
  3613. setSnippetId: (id: string) => void;
  3614. entity: BABYLON.IAnimatable | BABYLON.TargetedAnimation;
  3615. setNotificationMessage: (message: string) => void;
  3616. animationsLoaded: (numberOfAnimations: number) => void;
  3617. }
  3618. /**
  3619. * Loads animation locally or from the Babylon.js Snippet Server
  3620. */
  3621. export class LoadSnippet extends React.Component<ILoadSnippetProps, {
  3622. snippetId: string;
  3623. }> {
  3624. private _serverAddress;
  3625. constructor(props: ILoadSnippetProps);
  3626. /**
  3627. * Set the animations snippet id
  3628. * @param value Snippet ID
  3629. */
  3630. change: (value: string) => void;
  3631. /**
  3632. * Select a local file to load animations
  3633. * @param file File name
  3634. */
  3635. loadFromFile: (file: File) => void;
  3636. /**
  3637. * Load animations from server identified with a snippet id
  3638. */
  3639. loadFromSnippet: () => void;
  3640. render(): JSX.Element;
  3641. }
  3642. }
  3643. declare module INSPECTOR {
  3644. interface ISaveSnippetProps {
  3645. animations: BABYLON.Nullable<BABYLON.Animation[]>;
  3646. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  3647. lockObject: LockObject;
  3648. globalState: GlobalState;
  3649. snippetServer: string;
  3650. snippetId: string;
  3651. }
  3652. export interface Snippet {
  3653. url: string;
  3654. id: string;
  3655. }
  3656. interface SelectedAnimation {
  3657. id: string;
  3658. name: string;
  3659. index: number;
  3660. selected: boolean;
  3661. }
  3662. /**
  3663. * Saves the animation snippet to the Babylon.js site or downloads the animation file locally
  3664. */
  3665. export class SaveSnippet extends React.Component<ISaveSnippetProps, {
  3666. selectedAnimations: SelectedAnimation[];
  3667. }> {
  3668. constructor(props: ISaveSnippetProps);
  3669. /**
  3670. * Set the selected animations to save
  3671. * @param e Input event
  3672. */
  3673. handleCheckboxChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
  3674. /**
  3675. * Stringify the selected animation
  3676. */
  3677. stringifySelectedAnimations(): string;
  3678. /**
  3679. * Save the selected animations to a local file
  3680. */
  3681. saveToFile: () => void;
  3682. /**
  3683. * Save the selected animations if a snippet ID is set
  3684. */
  3685. saveToSnippet: () => void;
  3686. render(): JSX.Element;
  3687. }
  3688. }
  3689. declare module INSPECTOR {
  3690. interface IEditorControlsProps {
  3691. isTargetedAnimation: boolean;
  3692. entity: BABYLON.IAnimatable | BABYLON.TargetedAnimation;
  3693. selected: BABYLON.Animation | null;
  3694. lockObject: LockObject;
  3695. onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
  3696. setNotificationMessage: (message: string) => void;
  3697. selectAnimation: (selected: BABYLON.Animation, axis?: SelectedCoordinate) => void;
  3698. setFps: (fps: number) => void;
  3699. setIsLooping: () => void;
  3700. globalState: GlobalState;
  3701. snippetServer: string;
  3702. deselectAnimation: () => void;
  3703. fps: number;
  3704. }
  3705. interface IEditorControlsState {
  3706. isAnimationTabOpen: boolean;
  3707. isEditTabOpen: boolean;
  3708. isLoadTabOpen: boolean;
  3709. isSaveTabOpen: boolean;
  3710. isLoopActive: boolean;
  3711. animationsCount: number;
  3712. framesPerSecond: number;
  3713. snippetId: string;
  3714. selected: BABYLON.Animation | undefined;
  3715. }
  3716. /**
  3717. * Renders the Curve Editor controls to create, save, remove, load and edit animations
  3718. */
  3719. export class EditorControls extends React.Component<IEditorControlsProps, IEditorControlsState> {
  3720. constructor(props: IEditorControlsProps);
  3721. /**
  3722. * Makes sure the frames per second receive the updated prop
  3723. * @param prevProps previous properties
  3724. */
  3725. componentDidUpdate(prevProps: IEditorControlsProps): void;
  3726. /**
  3727. * Add the nimation, recounts the list and opens the correct tab
  3728. * @param animation The recently empty created animation
  3729. */
  3730. onAnimationAdded: (animation: BABYLON.Animation) => void;
  3731. /**
  3732. * Set state when the animations list has finished updated
  3733. */
  3734. finishedUpdate: () => void;
  3735. recountAnimations(): number;
  3736. /**
  3737. * Toggles loop
  3738. */
  3739. changeLoopBehavior: () => void;
  3740. /**
  3741. * This avoids using lambda functions in JSX
  3742. */
  3743. handleFirstTab: () => void;
  3744. handleSecondTab: () => void;
  3745. handleThirdTab: () => void;
  3746. handleFourthTab: () => void;
  3747. handleTabs(tab: number): void;
  3748. handleChangeFps: (fps: number) => void;
  3749. /**
  3750. * Cleans the list when has been emptied
  3751. */
  3752. onEmptiedList: () => void;
  3753. /**
  3754. * When animations have been reloaded update tabs
  3755. */
  3756. animationsLoaded: (numberOfAnimations: number) => void;
  3757. /**
  3758. * The currently selected animation to edit it
  3759. * @param selected Selected animation
  3760. */
  3761. editAnimation: (selected: BABYLON.Animation) => void;
  3762. setSnippetId: (id: string) => void;
  3763. /**
  3764. * Marks animation tab closed and hides the tab
  3765. */
  3766. onCloseAddAnimation: () => void;
  3767. render(): JSX.Element;
  3768. }
  3769. }
  3770. declare module INSPECTOR {
  3771. interface ISwitchButtonProps {
  3772. /** Current scale */
  3773. current: CurveScale;
  3774. /** On click change of scale */
  3775. action?: (event: CurveScale) => void;
  3776. }
  3777. /**
  3778. * Displays the current scale
  3779. */
  3780. export class ScaleLabel extends React.Component<ISwitchButtonProps, {
  3781. current: CurveScale;
  3782. }> {
  3783. constructor(props: ISwitchButtonProps);
  3784. renderLabel(scale: CurveScale): "" | "DEG" | "FLT" | "INT" | "RAD";
  3785. onClickHandle: () => void;
  3786. render(): JSX.Element;
  3787. }
  3788. }
  3789. declare module INSPECTOR {
  3790. interface IAnimationCurveEditorComponentProps {
  3791. playOrPause?: () => void;
  3792. scene: BABYLON.Scene;
  3793. entity: BABYLON.IAnimatable | BABYLON.TargetedAnimation;
  3794. lockObject: LockObject;
  3795. globalState: GlobalState;
  3796. }
  3797. /**
  3798. * Represent an Axis of the canvas. This help us control the frame/panning
  3799. */
  3800. interface ICanvasAxis {
  3801. value: number;
  3802. label: number;
  3803. }
  3804. /**
  3805. * This help us identify the type of scaling on the selected animated property
  3806. */
  3807. export enum CurveScale {
  3808. float = 0,
  3809. radians = 1,
  3810. degrees = 2,
  3811. integers = 3,
  3812. default = 4
  3813. }
  3814. /**
  3815. * This represents the visible selected keyframe in the canvas. If the keyframe is selected
  3816. * we should be able to edit the frame and value.
  3817. */
  3818. export interface IActionableKeyFrame {
  3819. frame?: number | string;
  3820. value?: any;
  3821. }
  3822. /**
  3823. * Each curve is an SVG Path. This Interface give us its properties to render on the canvas.
  3824. */
  3825. interface ICurveData {
  3826. pathData: string;
  3827. pathLength: number;
  3828. domCurve: React.RefObject<SVGPathElement>;
  3829. color: string;
  3830. id: string;
  3831. }
  3832. /**
  3833. * The curve editor state
  3834. */
  3835. interface IAnimationCurveEditorComponentState {
  3836. /** If the editor is opened or closed */
  3837. isOpen: boolean;
  3838. /** The currently selected animation from which the curves will render */
  3839. selected: BABYLON.Animation | null;
  3840. /** A list of keyframes to be rendered as SVG Elements in the curve */
  3841. svgKeyframes: IKeyframeSvgPoint[] | undefined;
  3842. /** The current frame in which the playhead is positioned */
  3843. currentFrame: number;
  3844. /** The current value in which the playhead is positioned */
  3845. currentValue: number;
  3846. /** The number of frame in which the current canvas is divided. The helps to render the frames in the graph editor */
  3847. frameAxisLength: ICanvasAxis[];
  3848. /** The number of values in which the current canvas is divided. The helps to render the frames in the graph editor. The current scale decides how these values are rendered*/
  3849. valueAxisLength: ICanvasAxis[];
  3850. /** If the selected keyframe should be treated as a flat tangent curve */
  3851. isFlatTangentMode: boolean;
  3852. /** If the tangent mode is active */
  3853. isTangentMode: boolean;
  3854. /** If the control points are broken or not */
  3855. isBrokenMode: boolean;
  3856. /** If selected keyframe should render its selected control point to be linear or not */
  3857. lerpMode: boolean;
  3858. /** The scale of the canvas */
  3859. scale: number;
  3860. /** The offset of the playhead to position itself on the canvas */
  3861. playheadOffset: number;
  3862. /** The error or warning message to display */
  3863. notification: string;
  3864. /** The current selected point in the SVG curve */
  3865. currentPoint: SVGPoint | undefined;
  3866. /** The start position of the playhead */
  3867. playheadPos: number;
  3868. /** If the animation is playing or not */
  3869. isPlaying: boolean;
  3870. /** The selected curve represented with an array of curves */
  3871. selectedPathData: ICurveData[] | undefined;
  3872. /** The currently selected coordinate of a complex property (i.e. x, y, z) */
  3873. selectedCoordinate: number;
  3874. /** The number of frames available in the canvas timeline*/
  3875. animationLimit: number;
  3876. /** The currently animation frames per second */
  3877. fps: number;
  3878. /** If the animation is set to loop or not while animation is playing */
  3879. isLooping: boolean;
  3880. /** The amount of vertical panning the user has moved the canvas */
  3881. panningY: number;
  3882. /** The amount of horizontal panning the user has moved the canvas */
  3883. panningX: number;
  3884. /** If the canvas has finished repositioned itself */
  3885. repositionCanvas: boolean;
  3886. /** The current selected keyframe on which we can perform actions (update frame and value) */
  3887. actionableKeyframe: IActionableKeyFrame;
  3888. /** The current value scale */
  3889. valueScaleType: CurveScale;
  3890. /** The amount scale to update valyes */
  3891. valueScale: number;
  3892. /** The canvas proportion width */
  3893. canvasLength: number;
  3894. /** The last frame to be created. */
  3895. lastKeyframeCreated: BABYLON.Nullable<string>;
  3896. /** The canvas scale width */
  3897. canvasWidthScale: number;
  3898. /** How the resize of the canvas will change the value axis */
  3899. valuesPositionResize: number;
  3900. /** How many frames are currently visible in the canvas */
  3901. framesInCanvasView: {
  3902. from: number;
  3903. to: number;
  3904. };
  3905. /** Limits the maximum frame from which a keyframe can move in the curve. So it wont overlap the curve*/
  3906. maxFrame: number | undefined;
  3907. /** Limits the minimum frame from which a keyframe can move in the curve. So it wont overlap the curve*/
  3908. minFrame: number | undefined;
  3909. /** How many frames have been increased or reduced on a windows resize event */
  3910. framesResized: number;
  3911. }
  3912. /**
  3913. * BABYLON.Animation curve Editor Component
  3914. * This component allows the use to create animations visualy from the Babylon.js playground.
  3915. * The principal features for the curve editor are:
  3916. * 1. Create animations for the selected entity properties.
  3917. * 2. Edit the animations a selected entity has.
  3918. * 3. You can load and save animations locally and from the snippet server.
  3919. * 4. After creating an animation you need to add keyframes.
  3920. * 5. You can update the frame and value of each frame.
  3921. * @property {() => void} playOrPause is the event to stop or inititate the animation on the playground scene
  3922. * @property {Scene} scene is the scene object from the playground
  3923. * @property {IAnimatable | BABYLON.TargetedAnimation} entity represents the selected entity which will be the animations target
  3924. * @property {LockObject} lockObject the inherited object to lock for modification with the BABYLON.Observable pattern
  3925. * @property {GlobalState} globalState the playground globalstate
  3926. * Check the IAnimationCurveEditorComponentState for state functionality
  3927. */
  3928. export class AnimationCurveEditorComponent extends React.Component<IAnimationCurveEditorComponentProps, IAnimationCurveEditorComponentState> {
  3929. readonly _entityName: string;
  3930. private _snippetUrl;
  3931. private _heightScale;
  3932. private _scaleFactor;
  3933. private _currentScale;
  3934. private _pixelFrameUnit;
  3935. private _svgKeyframes;
  3936. private _isPlaying;
  3937. private _graphCanvas;
  3938. private _editor;
  3939. private _editorWindow;
  3940. private _resizeId;
  3941. private _svgCanvas;
  3942. private _isTargetedAnimation;
  3943. private _resizedTimeline;
  3944. private _onBeforeRenderObserver;
  3945. private _mainAnimatable;
  3946. constructor(props: IAnimationCurveEditorComponentProps);
  3947. componentDidMount(): void;
  3948. /**
  3949. * Connects scene frame with curve editor animation
  3950. * @param prevProps previous Props
  3951. * @param prevState previous State
  3952. */
  3953. componentDidUpdate(prevProps: IAnimationCurveEditorComponentProps, prevState: any): void;
  3954. /**
  3955. * Clean up observer and listeners
  3956. */
  3957. componentWillUnmount(): void;
  3958. /**
  3959. * Set the frame on the animation
  3960. * @param value number of frame to move animation
  3961. */
  3962. onCurrentFrameChangeScene(value: number): void;
  3963. /**
  3964. * Notifications
  3965. * To add notification we set the state and clear to make the notification bar hide.
  3966. */
  3967. clearNotification: () => void;
  3968. /**
  3969. * Zoom and Scroll
  3970. * This section handles zoom and scroll
  3971. * of the graph area.
  3972. */
  3973. zoom: (e: React.WheelEvent<HTMLDivElement>) => void;
  3974. /**
  3975. * Returns Array with labels and values for Frame axis in Canvas
  3976. */
  3977. setFrameAxis(currentLength: number): {
  3978. value: number;
  3979. label: number;
  3980. }[];
  3981. /**
  3982. * Returns Array with labels, lines and values for Value axis in Canvas
  3983. */
  3984. setValueLines(): {
  3985. value: number;
  3986. label: string;
  3987. }[];
  3988. /**
  3989. * Creates a string id from animation name and the keyframe index
  3990. * @param animationName Name of animation
  3991. * @param keyframeIndex Index of keyframe
  3992. */
  3993. encodeCurveId(animationName: string, keyframeIndex: number): string;
  3994. /**
  3995. * Returns the animation keyframe index and the animation selected coordinate (x, y, z)
  3996. * @param id curve id created with index and coordinate of animation
  3997. */
  3998. decodeCurveId(id: string): {
  3999. order: number;
  4000. coordinate: number;
  4001. };
  4002. /**
  4003. * Returns the value from a keyframe
  4004. * @param id curve id
  4005. */
  4006. getKeyframeValueFromAnimation(id: string): {
  4007. frame: number;
  4008. value: number;
  4009. } | undefined;
  4010. /**
  4011. * Keyframe Manipulation
  4012. * This section handles events from SvgDraggableArea.
  4013. * @param id selected keyframe id
  4014. * @param multiselect if we are multiselecting keyframes
  4015. */
  4016. selectKeyframe: (id: string, multiselect: boolean) => void;
  4017. /**
  4018. * Determine if two control points are collinear (flat tangent)
  4019. * @param kf keyframe point
  4020. */
  4021. hasCollinearPoints: (kf: IKeyframeSvgPoint | undefined) => boolean;
  4022. /**
  4023. * Returns the previous and next keyframe from a selected frame.
  4024. * @param frame index of keyframe
  4025. */
  4026. getPreviousAndNextKeyframe: (frame: number) => {
  4027. prev: number | undefined;
  4028. next: number | undefined;
  4029. };
  4030. /**
  4031. * Selects a keyframe in animation based on its Id
  4032. * @param id keyframe id
  4033. * @param actionableKeyframe selected keyframe
  4034. */
  4035. selectKeyframeFromId: (id: string, actionableKeyframe: IActionableKeyFrame) => void;
  4036. /**
  4037. * Resets the current selected keyframe as an updatable pairs by Graph BABYLON.GUI.Control Bar
  4038. */
  4039. resetActionableKeyframe: () => void;
  4040. /**
  4041. * Sets the selected control point.
  4042. * @param type left or right control point
  4043. * @param id id of selected svg keyframe
  4044. */
  4045. selectedControlPoint: (type: string, id: string) => void;
  4046. /**
  4047. * Sets the selected control point.
  4048. */
  4049. deselectKeyframes: () => void;
  4050. /**
  4051. * Update the BABYLON.Animation Key values based on its type
  4052. * @param dataType Type of animated property
  4053. * @param newValue New value of animated property
  4054. * @param coordinate The selected property coordinate to animate (i.e. x, y, z)
  4055. */
  4056. updateValuePerCoordinate(dataType: number, value: number | BABYLON.Vector2 | BABYLON.Vector3 | BABYLON.Color3 | BABYLON.Color4 | BABYLON.Size | BABYLON.Quaternion, newValue: number, coordinate?: number): number | BABYLON.Vector3 | BABYLON.Quaternion | BABYLON.Color3 | BABYLON.Color4 | BABYLON.Vector2 | BABYLON.Size;
  4057. /**
  4058. * BABYLON.Animation should always have a keyframe at Frame Zero
  4059. * @param keys BABYLON.Animation key collection
  4060. */
  4061. forceFrameZeroToExist(keys: BABYLON.IAnimationKey[]): void;
  4062. /**
  4063. * Renders SVG points with dragging of the curve
  4064. * @param updatedSvgKeyFrame selected keyframe to update
  4065. * @param id curve id where the keyframe is localted
  4066. */
  4067. renderPoints: (updatedSvgKeyFrame: IKeyframeSvgPoint, id: string) => void;
  4068. /**
  4069. * Updates the left control point on render points
  4070. * @param updatedSvgKeyFrame selected svg keyframe
  4071. * @param key animation key to update
  4072. * @param dataType type of animation
  4073. * @param coordinate coordinate to change its value (x, y, or z)
  4074. */
  4075. updateLeftControlPoint(updatedSvgKeyFrame: IKeyframeSvgPoint, key: BABYLON.IAnimationKey, dataType: number, coordinate: number): void;
  4076. /**
  4077. * Updates the right control point on render points
  4078. * @param updatedSvgKeyFrame selected svg keyframe
  4079. * @param key animation key to update
  4080. * @param dataType type of animation
  4081. * @param coordinate coordinate to change its value (x, y, or z)
  4082. */
  4083. updateRightControlPoint(updatedSvgKeyFrame: IKeyframeSvgPoint, key: BABYLON.IAnimationKey, dataType: number, coordinate: number): void;
  4084. /**
  4085. * Get the current BABYLON.GUI.Control Point weight (how far the X value is multiplied)
  4086. * @param updatedSvgKeyFrame svg keyframe from which to calculate the distance to control point
  4087. */
  4088. getControlPointWeight(updatedSvgKeyFrame: IKeyframeSvgPoint): number;
  4089. /**
  4090. * Handles a Frame selection change
  4091. * @event event input event to change frame value
  4092. */
  4093. handleFrameChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
  4094. /**
  4095. * Handles how a value change on a selected frame
  4096. * @event event input event to change the value of the keyframe
  4097. */
  4098. handleValueChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
  4099. /**
  4100. * Set the Keyframe from input control in Graph BABYLON.GUI.Control Bar
  4101. * @param actionableKeyframe selected keyframe
  4102. */
  4103. setKeyframeValueFromInput: (actionableKeyframe: IActionableKeyFrame) => void;
  4104. /**
  4105. * Sets the SVG Keyframe value
  4106. * Finds the selected svg keyframe and passes the correct value to the correct animated keyframe.
  4107. */
  4108. setKeyframeValue: () => void;
  4109. /**
  4110. * Set the flat tangent to the current selected control points.
  4111. * get the selected control point and updates its tangent to flat the tangent
  4112. */
  4113. setFlatTangent: () => void;
  4114. /**
  4115. * Sets Broken mode of lines
  4116. * Broken mode enables control points not to be connected on drag
  4117. */
  4118. setBrokenMode: () => void;
  4119. /**
  4120. * Sets a control point to be a linear interpolation with its Keyframe
  4121. * If left or right control point is selected, sets the Tangent value to match the next keyframe and become linear
  4122. */
  4123. setLerpToActiveControlPoint: () => void;
  4124. /**
  4125. * Adds a new keyframe to the curve on canvas click
  4126. */
  4127. addKeyframeClick: () => void;
  4128. /**
  4129. * Remove keyframe on click
  4130. */
  4131. removeKeyframeClick: () => void;
  4132. /**
  4133. * Remove the selected keyframes
  4134. * @param points the selected keyframes to remove
  4135. */
  4136. removeKeyframes: (points: IKeyframeSvgPoint[]) => void;
  4137. /**
  4138. * Adds a keyframe
  4139. * @event event Mouse click event to generate new keyframe
  4140. */
  4141. addKeyFrame(event: React.MouseEvent<SVGSVGElement>): void;
  4142. /**
  4143. * Curve Rendering Functions
  4144. * This section handles how to render curves.
  4145. * @param point point in canvas
  4146. * @param index index of svg
  4147. */
  4148. setKeyframePointLinear(point: BABYLON.Vector2, index: number): void;
  4149. /**
  4150. * Flats the tangents of the selected keyframes
  4151. * @param keyframes Selected keyframes to flat its tangents
  4152. * @param dataType Type of animated property
  4153. */
  4154. flatTangents(keyframes: BABYLON.IAnimationKey[], dataType: number): BABYLON.IAnimationKey[];
  4155. /**
  4156. * Return a Keyframe zero value depending on Type
  4157. * @param dataType Type of animated property
  4158. */
  4159. returnZero(dataType: number): 0 | BABYLON.Vector3 | BABYLON.Quaternion | BABYLON.Color3 | BABYLON.Color4 | BABYLON.Vector2 | BABYLON.Size;
  4160. /**
  4161. * Return the keyframe value as an array depending on type
  4162. * @param valueType type of animated property
  4163. * @param value the value of the property
  4164. */
  4165. getValueAsArray(valueType: number, value: number | BABYLON.Vector2 | BABYLON.Vector3 | BABYLON.Color3 | BABYLON.Color4 | BABYLON.Size | BABYLON.Quaternion): number[];
  4166. /**
  4167. * Sets the keyframe value as an array depending on type
  4168. * @param valueType type of animated property
  4169. * @param arrayValue array to place the correct value
  4170. */
  4171. setValueAsType(valueType: number, arrayValue: number[]): number | BABYLON.Vector3 | BABYLON.Quaternion | BABYLON.Color3 | BABYLON.Color4 | BABYLON.Vector2 | BABYLON.Size;
  4172. /**
  4173. * Returns the SVG Path Data to render the curve
  4174. * @param animation The animation object from where to get its keyframes
  4175. */
  4176. getPathData(animation: BABYLON.Animation | null): ICurveData[] | undefined;
  4177. /**
  4178. * Gets the selected animation properties
  4179. * @param animation BABYLON.Animation
  4180. */
  4181. getAnimationData(animation: BABYLON.Animation): {
  4182. loopMode: number | undefined;
  4183. name: string;
  4184. blendingSpeed: number;
  4185. targetPropertyPath: string[];
  4186. targetProperty: string;
  4187. framesPerSecond: number;
  4188. highestFrame: number;
  4189. usesTangents: boolean;
  4190. easingType: string | undefined;
  4191. easingMode: number | undefined;
  4192. valueType: number;
  4193. };
  4194. /**
  4195. * Calculate the correct tangents to be linear
  4196. * @param keyframes the animation keyframes
  4197. */
  4198. calculateLinearTangents(keyframes: BABYLON.IAnimationKey[]): BABYLON.IAnimationKey[];
  4199. /**
  4200. * Calculates the proper linear tangents if there is no tangents defined
  4201. * Before calculation of svg path we need to calculate the proper tangents
  4202. * @param keyframes the animation keyframes
  4203. * @param data initial svg path
  4204. * @param middle the middle of the canvas to draw the curve
  4205. * @param type type of animation
  4206. * @param coordinate (x, y, z) value
  4207. * @param animationName The animation name to generate the curve id
  4208. */
  4209. curvePathWithoutTangents(keyframes: BABYLON.IAnimationKey[], data: string, middle: number, type: number, coordinate: number, animationName: string): string;
  4210. /**
  4211. * Calculates the curve data and control points for animation
  4212. * @param keyframes the animation keyframes
  4213. * @param data initial svg path
  4214. * @param middle the middle of the canvas to draw the curve
  4215. * @param type type of animation
  4216. * @param coordinate (x, y, z) value
  4217. * @param animationName The animation name to generate the curve id
  4218. */
  4219. curvePathWithTangents(keyframes: BABYLON.IAnimationKey[], data: string, middle: number, type: number, coordinate: number, animationName: string): string;
  4220. /**
  4221. * Calculates a curve path from predefined easing function
  4222. * @param keyframes animation keyframes
  4223. * @param data the initial svg path
  4224. * @param middle the center of the canvas
  4225. * @param easingFunction the easing function to calculate the curve from (easing function should generate the correct curve)
  4226. */
  4227. curvePath(keyframes: BABYLON.IAnimationKey[], data: string, middle: number, easingFunction: BABYLON.EasingFunction): string;
  4228. /**
  4229. * Sets the proper SVG Keyframe points
  4230. * @param controlPoints array of points to generate the svg keyframe collection
  4231. * @param index index of the animation
  4232. * @param keyframesCount How many keyframes should we process
  4233. */
  4234. setKeyframePoint(controlPoints: BABYLON.Vector2[], index: number, keyframesCount: number): void;
  4235. /**
  4236. * Creates curve based on interpolated points
  4237. * @param p0 starting point of curve
  4238. * @param p1 first control point
  4239. * @param u distance between p0 and p3 as percentage to affect p1
  4240. * @param p2 second control point
  4241. * @param v distance between p0 and p3 as percentage to affect p2
  4242. * @param p3 finish point of curve
  4243. */
  4244. interpolateControlPoints(p0: BABYLON.Vector2, p1: BABYLON.Vector2, u: number, p2: BABYLON.Vector2, v: number, p3: BABYLON.Vector2): BABYLON.Vector2[] | undefined;
  4245. /**
  4246. * Deselects the current animations
  4247. */
  4248. deselectAnimation: () => void;
  4249. /**
  4250. * Remove all curves from canvas
  4251. */
  4252. cleanCanvas: () => void;
  4253. /**
  4254. * Selects the animation and renders the curve
  4255. * @param animation the animation to select and render as curve
  4256. * @param coordinate the property coordinate (x, y, z) to represent as curve
  4257. */
  4258. selectAnimation: (animation: BABYLON.Animation, coordinate?: SelectedCoordinate | undefined) => void;
  4259. /**
  4260. * Set the state for the last selected keyframe
  4261. */
  4262. postSelectionEvents: () => void;
  4263. /**
  4264. * Set main animatable to play or pause the animation
  4265. */
  4266. setMainAnimatable(): void;
  4267. /**
  4268. * Check if animation is playing
  4269. */
  4270. isAnimationPlaying(): boolean;
  4271. /**
  4272. * Stops the current playing animation
  4273. */
  4274. stopAnimation(): void;
  4275. /**
  4276. * Set if animation is looping and stops animation after it
  4277. */
  4278. setIsLooping: () => void;
  4279. setFramesPerSecond: (fps: number) => void;
  4280. /**
  4281. * Check if the animation has easing predefined
  4282. */
  4283. analyzeAnimationForLerp(animation: BABYLON.Animation | null): boolean;
  4284. /**
  4285. * Change the current frame in the canvas and timeline
  4286. * @param frame value to update on canvas and timeline
  4287. */
  4288. changeCurrentFrame: (frame: number) => void;
  4289. /**
  4290. * Calculate the value of the selected frame in curve
  4291. * @param frame the frame to calculate its current value on the curve
  4292. */
  4293. calculateCurrentPointInCurve: (frame: number) => number | undefined;
  4294. /**
  4295. * Center the position the canvas depending on Keyframe value and frame
  4296. * @param keyframe the keyframe to set as middle point
  4297. */
  4298. setCanvasPosition: (keyframe: BABYLON.IAnimationKey) => void;
  4299. /**
  4300. * Sets the current frame
  4301. * @param frame the value to set the frame
  4302. */
  4303. setCurrentFrame: (frame: number) => void;
  4304. /**
  4305. * Change the timeline animation frame limit
  4306. */
  4307. changeAnimationLimit: (limit: number) => void;
  4308. /**
  4309. * Update the frame in the selected Keyframe
  4310. */
  4311. updateFrameInKeyFrame: (frame: number, index: number) => void;
  4312. /**
  4313. * Plays or pauses the animation
  4314. * @param direction 0 stops the animation, 1 starts the animation, -1 plays animation backwards
  4315. */
  4316. playPause: (direction: number) => void;
  4317. /**
  4318. * Set the frame to selected position on canvas
  4319. * @event e click event on the SVG canvas
  4320. */
  4321. moveFrameTo(e: React.MouseEvent<SVGRectElement, MouseEvent>): void;
  4322. /**
  4323. * Register the observables for the state
  4324. */
  4325. registerObs(): void;
  4326. /**
  4327. * Checks if the current frame macthes the parameter
  4328. * @param frame The frame to check
  4329. */
  4330. isCurrentFrame(frame: number): boolean;
  4331. /**
  4332. * Set the Vertical Panning State
  4333. * @param panningY the vertical panning value
  4334. */
  4335. setPanningY: (panningY: number) => void;
  4336. /**
  4337. * Set the Vertical Panning State
  4338. * @param panningX the horizontal panning value
  4339. */
  4340. setPanningX: (panningX: number) => void;
  4341. /**
  4342. * Set state when canvas has been respositioned
  4343. */
  4344. canvasPositionEnded: () => void;
  4345. /**
  4346. *
  4347. * @param message The message to display in the notification bar
  4348. */
  4349. setNotificationMessage: (message: string) => void;
  4350. /**
  4351. * Zoom or frame the selected keyframes in the available canvas space
  4352. */
  4353. frameSelectedKeyframes: () => void;
  4354. /**
  4355. * Handle the frames quantity and scale on Window resize width
  4356. */
  4357. onWindowResizeWidth: () => void;
  4358. /**
  4359. * Set the state of frames Resized on window resize event
  4360. * @param framesResized how many frame have been added or removed on resize
  4361. */
  4362. onWindowEndResize: (framesResized: number) => void;
  4363. /** Resizes the width of the timeline */
  4364. onTimelineResize: () => void;
  4365. render(): JSX.Element;
  4366. }
  4367. }
  4368. declare module INSPECTOR {
  4369. interface IPlayheadProps {
  4370. frame: number;
  4371. offset: number;
  4372. onCurrentFrameChange: (frame: number) => void;
  4373. }
  4374. /**
  4375. * Renders the Playhead
  4376. */
  4377. export class Playhead extends React.Component<IPlayheadProps> {
  4378. private _direction;
  4379. private _active;
  4380. constructor(props: IPlayheadProps);
  4381. dragStart(e: React.TouchEvent<HTMLDivElement>): void;
  4382. dragStart(e: React.MouseEvent<HTMLDivElement, MouseEvent>): void;
  4383. drag(e: React.TouchEvent<HTMLDivElement>): void;
  4384. drag(e: React.MouseEvent<HTMLDivElement, MouseEvent>): void;
  4385. dragEnd(e: React.TouchEvent<HTMLDivElement>): void;
  4386. dragEnd(e: React.MouseEvent<HTMLDivElement, MouseEvent>): void;
  4387. calculateMove(): string;
  4388. render(): JSX.Element;
  4389. }
  4390. }
  4391. declare module INSPECTOR {
  4392. export const Contrast: IToolData;
  4393. }
  4394. declare module INSPECTOR {
  4395. export interface IButtonLineComponentProps {
  4396. data: string;
  4397. tooltip: string;
  4398. }
  4399. export class DraggableLineComponent extends React.Component<IButtonLineComponentProps> {
  4400. constructor(props: IButtonLineComponentProps);
  4401. render(): JSX.Element;
  4402. }
  4403. }
  4404. declare module INSPECTOR {
  4405. export class Popup {
  4406. static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
  4407. private static _CopyStyles;
  4408. }
  4409. }