webpack-stats.json 1012 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432
  1. {
  2. "errors": [],
  3. "warnings": [],
  4. "version": "4.35.3",
  5. "hash": "22046590d9703027650c",
  6. "time": 2040,
  7. "builtAt": 1570651177941,
  8. "publicPath": "",
  9. "outputPath": "C:\\Repos\\Babylon.js\\.temp/testsES6Modules",
  10. "assetsByChunkName": {
  11. "thinEngineOnly": "thinEngineOnly.js"
  12. },
  13. "assets": [
  14. {
  15. "name": "thinEngineOnly.js",
  16. "size": 370200,
  17. "chunks": [
  18. "thinEngineOnly"
  19. ],
  20. "chunkNames": [
  21. "thinEngineOnly"
  22. ],
  23. "emitted": true
  24. }
  25. ],
  26. "filteredAssets": 0,
  27. "entrypoints": {
  28. "thinEngineOnly": {
  29. "chunks": [
  30. "thinEngineOnly"
  31. ],
  32. "assets": [
  33. "thinEngineOnly.js"
  34. ],
  35. "children": {},
  36. "childAssets": {}
  37. }
  38. },
  39. "namedChunkGroups": {
  40. "thinEngineOnly": {
  41. "chunks": [
  42. "thinEngineOnly"
  43. ],
  44. "assets": [
  45. "thinEngineOnly.js"
  46. ],
  47. "children": {},
  48. "childAssets": {}
  49. }
  50. },
  51. "chunks": [
  52. {
  53. "id": "thinEngineOnly",
  54. "rendered": true,
  55. "initial": true,
  56. "entry": true,
  57. "size": 327856,
  58. "names": [
  59. "thinEngineOnly"
  60. ],
  61. "files": [
  62. "thinEngineOnly.js"
  63. ],
  64. "hash": "2393fd4e444cf0d2321f",
  65. "siblings": [],
  66. "parents": [],
  67. "children": [],
  68. "childrenByOrder": {},
  69. "modules": [
  70. {
  71. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  72. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js",
  73. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  74. "index": 17,
  75. "index2": 13,
  76. "size": 695,
  77. "cacheable": true,
  78. "built": true,
  79. "optional": false,
  80. "prefetched": false,
  81. "chunks": [
  82. "thinEngineOnly"
  83. ],
  84. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  85. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  86. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  87. "issuerPath": [
  88. {
  89. "id": "./thinEngineOnly.ts",
  90. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  91. "name": "./thinEngineOnly.ts",
  92. "profile": {
  93. "factory": 25,
  94. "building": 1793
  95. }
  96. },
  97. {
  98. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  99. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  100. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  101. "profile": {
  102. "factory": 10,
  103. "building": 63
  104. }
  105. },
  106. {
  107. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  108. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  109. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  110. "profile": {
  111. "factory": 6,
  112. "building": 38,
  113. "dependencies": 28
  114. }
  115. },
  116. {
  117. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  118. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  119. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  120. "profile": {
  121. "factory": 6,
  122. "building": 10,
  123. "dependencies": 1
  124. }
  125. }
  126. ],
  127. "profile": {
  128. "factory": 9,
  129. "building": 7,
  130. "dependencies": 3
  131. },
  132. "failed": false,
  133. "errors": 0,
  134. "warnings": 0,
  135. "assets": [],
  136. "reasons": [
  137. {
  138. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  139. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  140. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  141. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  142. "type": "harmony side effect evaluation",
  143. "userRequest": "./Expressions/Operators/shaderDefineAndOperator",
  144. "loc": "7:0-90"
  145. },
  146. {
  147. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  148. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  149. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  150. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  151. "type": "harmony import specifier",
  152. "userRequest": "./Expressions/Operators/shaderDefineAndOperator",
  153. "loc": "66:38-61"
  154. }
  155. ],
  156. "providedExports": [
  157. "ShaderDefineAndOperator"
  158. ],
  159. "optimizationBailout": [],
  160. "depth": 4,
  161. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderDefineExpression } from '../shaderDefineExpression';\r\n/** @hidden */\r\nvar ShaderDefineAndOperator = /** @class */ (function (_super) {\r\n __extends(ShaderDefineAndOperator, _super);\r\n function ShaderDefineAndOperator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderDefineAndOperator.prototype.isTrue = function (preprocessors) {\r\n return this.leftOperand.isTrue(preprocessors) && this.rightOperand.isTrue(preprocessors);\r\n };\r\n return ShaderDefineAndOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineAndOperator };\r\n//# sourceMappingURL=shaderDefineAndOperator.js.map"
  162. },
  163. {
  164. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  165. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js",
  166. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  167. "index": 18,
  168. "index2": 14,
  169. "size": 1539,
  170. "cacheable": true,
  171. "built": true,
  172. "optional": false,
  173. "prefetched": false,
  174. "chunks": [
  175. "thinEngineOnly"
  176. ],
  177. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  178. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  179. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  180. "issuerPath": [
  181. {
  182. "id": "./thinEngineOnly.ts",
  183. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  184. "name": "./thinEngineOnly.ts",
  185. "profile": {
  186. "factory": 25,
  187. "building": 1793
  188. }
  189. },
  190. {
  191. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  192. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  193. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  194. "profile": {
  195. "factory": 10,
  196. "building": 63
  197. }
  198. },
  199. {
  200. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  201. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  202. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  203. "profile": {
  204. "factory": 6,
  205. "building": 38,
  206. "dependencies": 28
  207. }
  208. },
  209. {
  210. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  211. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  212. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  213. "profile": {
  214. "factory": 6,
  215. "building": 10,
  216. "dependencies": 1
  217. }
  218. }
  219. ],
  220. "profile": {
  221. "factory": 9,
  222. "building": 7,
  223. "dependencies": 3
  224. },
  225. "failed": false,
  226. "errors": 0,
  227. "warnings": 0,
  228. "assets": [],
  229. "reasons": [
  230. {
  231. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  232. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  233. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  234. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  235. "type": "harmony side effect evaluation",
  236. "userRequest": "./Expressions/Operators/shaderDefineArithmeticOperator",
  237. "loc": "8:0-104"
  238. },
  239. {
  240. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  241. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  242. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  243. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  244. "type": "harmony import specifier",
  245. "userRequest": "./Expressions/Operators/shaderDefineArithmeticOperator",
  246. "loc": "59:19-49"
  247. }
  248. ],
  249. "providedExports": [
  250. "ShaderDefineArithmeticOperator"
  251. ],
  252. "optimizationBailout": [],
  253. "depth": 4,
  254. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderDefineExpression } from '../shaderDefineExpression';\r\n/** @hidden */\r\nvar ShaderDefineArithmeticOperator = /** @class */ (function (_super) {\r\n __extends(ShaderDefineArithmeticOperator, _super);\r\n function ShaderDefineArithmeticOperator(define, operand, testValue) {\r\n var _this = _super.call(this) || this;\r\n _this.define = define;\r\n _this.operand = operand;\r\n _this.testValue = testValue;\r\n return _this;\r\n }\r\n ShaderDefineArithmeticOperator.prototype.isTrue = function (preprocessors) {\r\n var value = preprocessors[this.define];\r\n if (value === undefined) {\r\n return false;\r\n }\r\n var condition = false;\r\n var left = parseInt(value);\r\n var right = parseInt(this.testValue);\r\n switch (this.operand) {\r\n case \">\":\r\n condition = left > right;\r\n break;\r\n case \"<\":\r\n condition = left < right;\r\n break;\r\n case \"<=\":\r\n condition = left <= right;\r\n break;\r\n case \">=\":\r\n condition = left >= right;\r\n break;\r\n case \"==\":\r\n condition = left === right;\r\n break;\r\n }\r\n return condition;\r\n };\r\n return ShaderDefineArithmeticOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineArithmeticOperator };\r\n//# sourceMappingURL=shaderDefineArithmeticOperator.js.map"
  255. },
  256. {
  257. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  258. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  259. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  260. "index": 14,
  261. "index2": 11,
  262. "size": 917,
  263. "cacheable": true,
  264. "built": true,
  265. "optional": false,
  266. "prefetched": false,
  267. "chunks": [
  268. "thinEngineOnly"
  269. ],
  270. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  271. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  272. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  273. "issuerPath": [
  274. {
  275. "id": "./thinEngineOnly.ts",
  276. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  277. "name": "./thinEngineOnly.ts",
  278. "profile": {
  279. "factory": 25,
  280. "building": 1793
  281. }
  282. },
  283. {
  284. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  285. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  286. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  287. "profile": {
  288. "factory": 10,
  289. "building": 63
  290. }
  291. },
  292. {
  293. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  294. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  295. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  296. "profile": {
  297. "factory": 6,
  298. "building": 38,
  299. "dependencies": 28
  300. }
  301. },
  302. {
  303. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  304. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  305. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  306. "profile": {
  307. "factory": 6,
  308. "building": 10,
  309. "dependencies": 1
  310. }
  311. }
  312. ],
  313. "profile": {
  314. "factory": 9,
  315. "building": 7,
  316. "dependencies": 3
  317. },
  318. "failed": false,
  319. "errors": 0,
  320. "warnings": 0,
  321. "assets": [],
  322. "reasons": [
  323. {
  324. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  325. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  326. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  327. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  328. "type": "harmony side effect evaluation",
  329. "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator",
  330. "loc": "5:0-102"
  331. },
  332. {
  333. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  334. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  335. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  336. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  337. "type": "harmony import specifier",
  338. "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator",
  339. "loc": "42:23-52"
  340. },
  341. {
  342. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  343. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  344. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  345. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  346. "type": "harmony import specifier",
  347. "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator",
  348. "loc": "55:23-52"
  349. },
  350. {
  351. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  352. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  353. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  354. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  355. "type": "harmony import specifier",
  356. "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator",
  357. "loc": "91:38-67"
  358. },
  359. {
  360. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  361. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  362. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  363. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  364. "type": "harmony import specifier",
  365. "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator",
  366. "loc": "94:38-67"
  367. }
  368. ],
  369. "providedExports": [
  370. "ShaderDefineIsDefinedOperator"
  371. ],
  372. "optimizationBailout": [],
  373. "depth": 4,
  374. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderDefineExpression } from \"../shaderDefineExpression\";\r\n/** @hidden */\r\nvar ShaderDefineIsDefinedOperator = /** @class */ (function (_super) {\r\n __extends(ShaderDefineIsDefinedOperator, _super);\r\n function ShaderDefineIsDefinedOperator(define, not) {\r\n if (not === void 0) { not = false; }\r\n var _this = _super.call(this) || this;\r\n _this.define = define;\r\n _this.not = not;\r\n return _this;\r\n }\r\n ShaderDefineIsDefinedOperator.prototype.isTrue = function (preprocessors) {\r\n var condition = preprocessors[this.define] !== undefined;\r\n if (this.not) {\r\n condition = !condition;\r\n }\r\n return condition;\r\n };\r\n return ShaderDefineIsDefinedOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineIsDefinedOperator };\r\n//# sourceMappingURL=shaderDefineIsDefinedOperator.js.map"
  375. },
  376. {
  377. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  378. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js",
  379. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  380. "index": 16,
  381. "index2": 12,
  382. "size": 688,
  383. "cacheable": true,
  384. "built": true,
  385. "optional": false,
  386. "prefetched": false,
  387. "chunks": [
  388. "thinEngineOnly"
  389. ],
  390. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  391. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  392. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  393. "issuerPath": [
  394. {
  395. "id": "./thinEngineOnly.ts",
  396. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  397. "name": "./thinEngineOnly.ts",
  398. "profile": {
  399. "factory": 25,
  400. "building": 1793
  401. }
  402. },
  403. {
  404. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  405. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  406. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  407. "profile": {
  408. "factory": 10,
  409. "building": 63
  410. }
  411. },
  412. {
  413. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  414. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  415. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  416. "profile": {
  417. "factory": 6,
  418. "building": 38,
  419. "dependencies": 28
  420. }
  421. },
  422. {
  423. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  424. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  425. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  426. "profile": {
  427. "factory": 6,
  428. "building": 10,
  429. "dependencies": 1
  430. }
  431. }
  432. ],
  433. "profile": {
  434. "factory": 9,
  435. "building": 7,
  436. "dependencies": 3
  437. },
  438. "failed": false,
  439. "errors": 0,
  440. "warnings": 0,
  441. "assets": [],
  442. "reasons": [
  443. {
  444. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  445. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  446. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  447. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  448. "type": "harmony side effect evaluation",
  449. "userRequest": "./Expressions/Operators/shaderDefineOrOperator",
  450. "loc": "6:0-88"
  451. },
  452. {
  453. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  454. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  455. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  456. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  457. "type": "harmony import specifier",
  458. "userRequest": "./Expressions/Operators/shaderDefineOrOperator",
  459. "loc": "78:33-55"
  460. }
  461. ],
  462. "providedExports": [
  463. "ShaderDefineOrOperator"
  464. ],
  465. "optimizationBailout": [],
  466. "depth": 4,
  467. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderDefineExpression } from '../shaderDefineExpression';\r\n/** @hidden */\r\nvar ShaderDefineOrOperator = /** @class */ (function (_super) {\r\n __extends(ShaderDefineOrOperator, _super);\r\n function ShaderDefineOrOperator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderDefineOrOperator.prototype.isTrue = function (preprocessors) {\r\n return this.leftOperand.isTrue(preprocessors) || this.rightOperand.isTrue(preprocessors);\r\n };\r\n return ShaderDefineOrOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineOrOperator };\r\n//# sourceMappingURL=shaderDefineOrOperator.js.map"
  468. },
  469. {
  470. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/shaderDefineExpression.js",
  471. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\shaderDefineExpression.js",
  472. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/shaderDefineExpression.js",
  473. "index": 15,
  474. "index2": 10,
  475. "size": 356,
  476. "cacheable": true,
  477. "built": true,
  478. "optional": false,
  479. "prefetched": false,
  480. "chunks": [
  481. "thinEngineOnly"
  482. ],
  483. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  484. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  485. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  486. "issuerPath": [
  487. {
  488. "id": "./thinEngineOnly.ts",
  489. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  490. "name": "./thinEngineOnly.ts",
  491. "profile": {
  492. "factory": 25,
  493. "building": 1793
  494. }
  495. },
  496. {
  497. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  498. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  499. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  500. "profile": {
  501. "factory": 10,
  502. "building": 63
  503. }
  504. },
  505. {
  506. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  507. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  508. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  509. "profile": {
  510. "factory": 6,
  511. "building": 38,
  512. "dependencies": 28
  513. }
  514. },
  515. {
  516. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  517. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  518. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  519. "profile": {
  520. "factory": 6,
  521. "building": 10,
  522. "dependencies": 1
  523. }
  524. },
  525. {
  526. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  527. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  528. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  529. "profile": {
  530. "factory": 9,
  531. "building": 7,
  532. "dependencies": 3
  533. }
  534. }
  535. ],
  536. "profile": {
  537. "factory": 4,
  538. "building": 1
  539. },
  540. "failed": false,
  541. "errors": 0,
  542. "warnings": 0,
  543. "assets": [],
  544. "reasons": [
  545. {
  546. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  547. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js",
  548. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  549. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  550. "type": "harmony side effect evaluation",
  551. "userRequest": "../shaderDefineExpression",
  552. "loc": "2:0-67"
  553. },
  554. {
  555. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  556. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js",
  557. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  558. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  559. "type": "harmony import specifier",
  560. "userRequest": "../shaderDefineExpression",
  561. "loc": "13:2-24"
  562. },
  563. {
  564. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  565. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js",
  566. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  567. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  568. "type": "harmony side effect evaluation",
  569. "userRequest": "../shaderDefineExpression",
  570. "loc": "2:0-67"
  571. },
  572. {
  573. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  574. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js",
  575. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  576. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  577. "type": "harmony import specifier",
  578. "userRequest": "../shaderDefineExpression",
  579. "loc": "41:2-24"
  580. },
  581. {
  582. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  583. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  584. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  585. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  586. "type": "harmony side effect evaluation",
  587. "userRequest": "../shaderDefineExpression",
  588. "loc": "2:0-67"
  589. },
  590. {
  591. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  592. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  593. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  594. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  595. "type": "harmony import specifier",
  596. "userRequest": "../shaderDefineExpression",
  597. "loc": "21:2-24"
  598. },
  599. {
  600. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  601. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js",
  602. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  603. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  604. "type": "harmony side effect evaluation",
  605. "userRequest": "../shaderDefineExpression",
  606. "loc": "2:0-67"
  607. },
  608. {
  609. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  610. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js",
  611. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  612. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  613. "type": "harmony import specifier",
  614. "userRequest": "../shaderDefineExpression",
  615. "loc": "13:2-24"
  616. }
  617. ],
  618. "providedExports": [
  619. "ShaderDefineExpression"
  620. ],
  621. "optimizationBailout": [],
  622. "depth": 5,
  623. "source": "/** @hidden */\r\nvar ShaderDefineExpression = /** @class */ (function () {\r\n function ShaderDefineExpression() {\r\n }\r\n ShaderDefineExpression.prototype.isTrue = function (preprocessors) {\r\n return true;\r\n };\r\n return ShaderDefineExpression;\r\n}());\r\nexport { ShaderDefineExpression };\r\n//# sourceMappingURL=shaderDefineExpression.js.map"
  624. },
  625. {
  626. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  627. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js",
  628. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  629. "index": 11,
  630. "index2": 8,
  631. "size": 853,
  632. "cacheable": true,
  633. "built": true,
  634. "optional": false,
  635. "prefetched": false,
  636. "chunks": [
  637. "thinEngineOnly"
  638. ],
  639. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  640. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  641. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  642. "issuerPath": [
  643. {
  644. "id": "./thinEngineOnly.ts",
  645. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  646. "name": "./thinEngineOnly.ts",
  647. "profile": {
  648. "factory": 25,
  649. "building": 1793
  650. }
  651. },
  652. {
  653. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  654. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  655. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  656. "profile": {
  657. "factory": 10,
  658. "building": 63
  659. }
  660. },
  661. {
  662. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  663. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  664. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  665. "profile": {
  666. "factory": 6,
  667. "building": 38,
  668. "dependencies": 28
  669. }
  670. },
  671. {
  672. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  673. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  674. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  675. "profile": {
  676. "factory": 6,
  677. "building": 10,
  678. "dependencies": 1
  679. }
  680. }
  681. ],
  682. "profile": {
  683. "factory": 9,
  684. "building": 7,
  685. "dependencies": 3
  686. },
  687. "failed": false,
  688. "errors": 0,
  689. "warnings": 0,
  690. "assets": [],
  691. "reasons": [
  692. {
  693. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  694. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  695. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  696. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  697. "type": "harmony side effect evaluation",
  698. "userRequest": "./shaderCodeConditionNode",
  699. "loc": "3:0-68"
  700. },
  701. {
  702. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  703. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  704. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  705. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  706. "type": "harmony import specifier",
  707. "userRequest": "./shaderCodeConditionNode",
  708. "loc": "129:46-69"
  709. },
  710. {
  711. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  712. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  713. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  714. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  715. "type": "harmony import specifier",
  716. "userRequest": "./shaderCodeConditionNode",
  717. "loc": "142:46-69"
  718. },
  719. {
  720. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  721. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  722. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  723. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  724. "type": "harmony import specifier",
  725. "userRequest": "./shaderCodeConditionNode",
  726. "loc": "150:46-69"
  727. }
  728. ],
  729. "providedExports": [
  730. "ShaderCodeConditionNode"
  731. ],
  732. "optimizationBailout": [],
  733. "depth": 4,
  734. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderCodeNode } from './shaderCodeNode';\r\n/** @hidden */\r\nvar ShaderCodeConditionNode = /** @class */ (function (_super) {\r\n __extends(ShaderCodeConditionNode, _super);\r\n function ShaderCodeConditionNode() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderCodeConditionNode.prototype.process = function (preprocessors, options) {\r\n for (var index = 0; index < this.children.length; index++) {\r\n var node = this.children[index];\r\n if (node.isValid(preprocessors)) {\r\n return node.process(preprocessors, options);\r\n }\r\n }\r\n return \"\";\r\n };\r\n return ShaderCodeConditionNode;\r\n}(ShaderCodeNode));\r\nexport { ShaderCodeConditionNode };\r\n//# sourceMappingURL=shaderCodeConditionNode.js.map"
  735. },
  736. {
  737. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeCursor.js",
  738. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeCursor.js",
  739. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeCursor.js",
  740. "index": 10,
  741. "index2": 6,
  742. "size": 1628,
  743. "cacheable": true,
  744. "built": true,
  745. "optional": false,
  746. "prefetched": false,
  747. "chunks": [
  748. "thinEngineOnly"
  749. ],
  750. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  751. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  752. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  753. "issuerPath": [
  754. {
  755. "id": "./thinEngineOnly.ts",
  756. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  757. "name": "./thinEngineOnly.ts",
  758. "profile": {
  759. "factory": 25,
  760. "building": 1793
  761. }
  762. },
  763. {
  764. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  765. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  766. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  767. "profile": {
  768. "factory": 10,
  769. "building": 63
  770. }
  771. },
  772. {
  773. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  774. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  775. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  776. "profile": {
  777. "factory": 6,
  778. "building": 38,
  779. "dependencies": 28
  780. }
  781. },
  782. {
  783. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  784. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  785. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  786. "profile": {
  787. "factory": 6,
  788. "building": 10,
  789. "dependencies": 1
  790. }
  791. }
  792. ],
  793. "profile": {
  794. "factory": 9,
  795. "building": 7,
  796. "dependencies": 3
  797. },
  798. "failed": false,
  799. "errors": 0,
  800. "warnings": 0,
  801. "assets": [],
  802. "reasons": [
  803. {
  804. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  805. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  806. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  807. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  808. "type": "harmony side effect evaluation",
  809. "userRequest": "./shaderCodeCursor",
  810. "loc": "2:0-54"
  811. },
  812. {
  813. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  814. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  815. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  816. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  817. "type": "harmony import specifier",
  818. "userRequest": "./shaderCodeCursor",
  819. "loc": "177:25-41"
  820. }
  821. ],
  822. "providedExports": [
  823. "ShaderCodeCursor"
  824. ],
  825. "optimizationBailout": [],
  826. "depth": 4,
  827. "source": "/** @hidden */\r\nvar ShaderCodeCursor = /** @class */ (function () {\r\n function ShaderCodeCursor() {\r\n }\r\n Object.defineProperty(ShaderCodeCursor.prototype, \"currentLine\", {\r\n get: function () {\r\n return this._lines[this.lineIndex];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ShaderCodeCursor.prototype, \"canRead\", {\r\n get: function () {\r\n return this.lineIndex < this._lines.length - 1;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ShaderCodeCursor.prototype, \"lines\", {\r\n set: function (value) {\r\n this._lines = [];\r\n for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {\r\n var line = value_1[_i];\r\n // Prevent removing line break in macros.\r\n if (line[0] === \"#\") {\r\n this._lines.push(line);\r\n continue;\r\n }\r\n var split = line.split(\";\");\r\n for (var index = 0; index < split.length; index++) {\r\n var subLine = split[index];\r\n subLine = subLine.trim();\r\n if (!subLine) {\r\n continue;\r\n }\r\n this._lines.push(subLine + (index !== split.length - 1 ? \";\" : \"\"));\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ShaderCodeCursor;\r\n}());\r\nexport { ShaderCodeCursor };\r\n//# sourceMappingURL=shaderCodeCursor.js.map"
  828. },
  829. {
  830. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  831. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js",
  832. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  833. "index": 8,
  834. "index2": 5,
  835. "size": 2903,
  836. "cacheable": true,
  837. "built": true,
  838. "optional": false,
  839. "prefetched": false,
  840. "chunks": [
  841. "thinEngineOnly"
  842. ],
  843. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  844. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  845. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  846. "issuerPath": [
  847. {
  848. "id": "./thinEngineOnly.ts",
  849. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  850. "name": "./thinEngineOnly.ts",
  851. "profile": {
  852. "factory": 25,
  853. "building": 1793
  854. }
  855. },
  856. {
  857. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  858. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  859. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  860. "profile": {
  861. "factory": 10,
  862. "building": 63
  863. }
  864. },
  865. {
  866. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  867. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  868. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  869. "profile": {
  870. "factory": 6,
  871. "building": 38,
  872. "dependencies": 28
  873. }
  874. },
  875. {
  876. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  877. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  878. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  879. "profile": {
  880. "factory": 6,
  881. "building": 10,
  882. "dependencies": 1
  883. }
  884. }
  885. ],
  886. "profile": {
  887. "factory": 9,
  888. "building": 7,
  889. "dependencies": 3
  890. },
  891. "failed": false,
  892. "errors": 0,
  893. "warnings": 0,
  894. "assets": [],
  895. "reasons": [
  896. {
  897. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  898. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js",
  899. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  900. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  901. "type": "harmony side effect evaluation",
  902. "userRequest": "./shaderCodeNode",
  903. "loc": "2:0-50"
  904. },
  905. {
  906. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  907. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js",
  908. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  909. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  910. "type": "harmony import specifier",
  911. "userRequest": "./shaderCodeNode",
  912. "loc": "19:2-16"
  913. },
  914. {
  915. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  916. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js",
  917. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  918. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  919. "type": "harmony side effect evaluation",
  920. "userRequest": "./shaderCodeNode",
  921. "loc": "2:0-50"
  922. },
  923. {
  924. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  925. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js",
  926. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  927. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  928. "type": "harmony import specifier",
  929. "userRequest": "./shaderCodeNode",
  930. "loc": "13:2-16"
  931. },
  932. {
  933. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  934. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  935. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  936. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  937. "type": "harmony side effect evaluation",
  938. "userRequest": "./shaderCodeNode",
  939. "loc": "1:0-50"
  940. },
  941. {
  942. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  943. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  944. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  945. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  946. "type": "harmony import specifier",
  947. "userRequest": "./shaderCodeNode",
  948. "loc": "107:35-49"
  949. },
  950. {
  951. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  952. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  953. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  954. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  955. "type": "harmony import specifier",
  956. "userRequest": "./shaderCodeNode",
  957. "loc": "160:34-48"
  958. },
  959. {
  960. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  961. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  962. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  963. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  964. "type": "harmony import specifier",
  965. "userRequest": "./shaderCodeNode",
  966. "loc": "176:27-41"
  967. }
  968. ],
  969. "providedExports": [
  970. "ShaderCodeNode"
  971. ],
  972. "optimizationBailout": [],
  973. "depth": 4,
  974. "source": "import { StringTools } from '../../Misc/stringTools';\r\n/** @hidden */\r\nvar ShaderCodeNode = /** @class */ (function () {\r\n function ShaderCodeNode() {\r\n this.children = [];\r\n }\r\n ShaderCodeNode.prototype.isValid = function (preprocessors) {\r\n return true;\r\n };\r\n ShaderCodeNode.prototype.process = function (preprocessors, options) {\r\n var result = \"\";\r\n if (this.line) {\r\n var value = this.line;\r\n var processor = options.processor;\r\n if (processor) {\r\n // This must be done before other replacements to avoid mistakenly changing something that was already changed.\r\n if (processor.lineProcessor) {\r\n value = processor.lineProcessor(value, options.isFragment);\r\n }\r\n if (processor.attributeProcessor && StringTools.StartsWith(this.line, \"attribute\")) {\r\n value = processor.attributeProcessor(this.line);\r\n }\r\n else if (processor.varyingProcessor && StringTools.StartsWith(this.line, \"varying\")) {\r\n value = processor.varyingProcessor(this.line, options.isFragment);\r\n }\r\n else if ((processor.uniformProcessor || processor.uniformBufferProcessor) && StringTools.StartsWith(this.line, \"uniform\")) {\r\n var regex = /uniform (.+) (.+)/;\r\n if (regex.test(this.line)) { // uniform\r\n if (processor.uniformProcessor) {\r\n value = processor.uniformProcessor(this.line, options.isFragment);\r\n }\r\n }\r\n else { // Uniform buffer\r\n if (processor.uniformBufferProcessor) {\r\n value = processor.uniformBufferProcessor(this.line, options.isFragment);\r\n options.lookForClosingBracketForUniformBuffer = true;\r\n }\r\n }\r\n }\r\n if (processor.endOfUniformBufferProcessor) {\r\n if (options.lookForClosingBracketForUniformBuffer && this.line.indexOf(\"}\") !== -1) {\r\n options.lookForClosingBracketForUniformBuffer = false;\r\n value = processor.endOfUniformBufferProcessor(this.line, options.isFragment);\r\n }\r\n }\r\n }\r\n result += value + \"\\r\\n\";\r\n }\r\n this.children.forEach(function (child) {\r\n result += child.process(preprocessors, options);\r\n });\r\n if (this.additionalDefineKey) {\r\n preprocessors[this.additionalDefineKey] = this.additionalDefineValue || \"true\";\r\n }\r\n return result;\r\n };\r\n return ShaderCodeNode;\r\n}());\r\nexport { ShaderCodeNode };\r\n//# sourceMappingURL=shaderCodeNode.js.map"
  975. },
  976. {
  977. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  978. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js",
  979. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  980. "index": 13,
  981. "index2": 9,
  982. "size": 596,
  983. "cacheable": true,
  984. "built": true,
  985. "optional": false,
  986. "prefetched": false,
  987. "chunks": [
  988. "thinEngineOnly"
  989. ],
  990. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  991. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  992. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  993. "issuerPath": [
  994. {
  995. "id": "./thinEngineOnly.ts",
  996. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  997. "name": "./thinEngineOnly.ts",
  998. "profile": {
  999. "factory": 25,
  1000. "building": 1793
  1001. }
  1002. },
  1003. {
  1004. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1005. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1006. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1007. "profile": {
  1008. "factory": 10,
  1009. "building": 63
  1010. }
  1011. },
  1012. {
  1013. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  1014. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  1015. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  1016. "profile": {
  1017. "factory": 6,
  1018. "building": 38,
  1019. "dependencies": 28
  1020. }
  1021. },
  1022. {
  1023. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  1024. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  1025. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  1026. "profile": {
  1027. "factory": 6,
  1028. "building": 10,
  1029. "dependencies": 1
  1030. }
  1031. }
  1032. ],
  1033. "profile": {
  1034. "factory": 9,
  1035. "building": 7,
  1036. "dependencies": 3
  1037. },
  1038. "failed": false,
  1039. "errors": 0,
  1040. "warnings": 0,
  1041. "assets": [],
  1042. "reasons": [
  1043. {
  1044. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  1045. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  1046. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  1047. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  1048. "type": "harmony side effect evaluation",
  1049. "userRequest": "./shaderCodeTestNode",
  1050. "loc": "4:0-58"
  1051. },
  1052. {
  1053. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  1054. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  1055. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  1056. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  1057. "type": "harmony import specifier",
  1058. "userRequest": "./shaderCodeTestNode",
  1059. "loc": "87:23-41"
  1060. }
  1061. ],
  1062. "providedExports": [
  1063. "ShaderCodeTestNode"
  1064. ],
  1065. "optimizationBailout": [],
  1066. "depth": 4,
  1067. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderCodeNode } from './shaderCodeNode';\r\n/** @hidden */\r\nvar ShaderCodeTestNode = /** @class */ (function (_super) {\r\n __extends(ShaderCodeTestNode, _super);\r\n function ShaderCodeTestNode() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderCodeTestNode.prototype.isValid = function (preprocessors) {\r\n return this.testExpression.isTrue(preprocessors);\r\n };\r\n return ShaderCodeTestNode;\r\n}(ShaderCodeNode));\r\nexport { ShaderCodeTestNode };\r\n//# sourceMappingURL=shaderCodeTestNode.js.map"
  1068. },
  1069. {
  1070. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  1071. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  1072. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  1073. "index": 7,
  1074. "index2": 20,
  1075. "size": 14076,
  1076. "cacheable": true,
  1077. "built": true,
  1078. "optional": false,
  1079. "prefetched": false,
  1080. "chunks": [
  1081. "thinEngineOnly"
  1082. ],
  1083. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  1084. "issuerId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  1085. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  1086. "issuerPath": [
  1087. {
  1088. "id": "./thinEngineOnly.ts",
  1089. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1090. "name": "./thinEngineOnly.ts",
  1091. "profile": {
  1092. "factory": 25,
  1093. "building": 1793
  1094. }
  1095. },
  1096. {
  1097. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1098. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1099. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1100. "profile": {
  1101. "factory": 10,
  1102. "building": 63
  1103. }
  1104. },
  1105. {
  1106. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  1107. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  1108. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  1109. "profile": {
  1110. "factory": 6,
  1111. "building": 38,
  1112. "dependencies": 28
  1113. }
  1114. }
  1115. ],
  1116. "profile": {
  1117. "factory": 6,
  1118. "building": 10,
  1119. "dependencies": 1
  1120. },
  1121. "failed": false,
  1122. "errors": 0,
  1123. "warnings": 0,
  1124. "assets": [],
  1125. "reasons": [
  1126. {
  1127. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  1128. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  1129. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  1130. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  1131. "type": "harmony side effect evaluation",
  1132. "userRequest": "../Engines/Processors/shaderProcessor",
  1133. "loc": "4:0-72"
  1134. },
  1135. {
  1136. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  1137. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  1138. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  1139. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  1140. "type": "harmony import specifier",
  1141. "userRequest": "../Engines/Processors/shaderProcessor",
  1142. "loc": "161:16-31"
  1143. },
  1144. {
  1145. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  1146. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  1147. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  1148. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  1149. "type": "harmony import specifier",
  1150. "userRequest": "../Engines/Processors/shaderProcessor",
  1151. "loc": "163:20-35"
  1152. }
  1153. ],
  1154. "providedExports": [
  1155. "ShaderProcessor"
  1156. ],
  1157. "optimizationBailout": [],
  1158. "depth": 3,
  1159. "source": "import { ShaderCodeNode } from './shaderCodeNode';\r\nimport { ShaderCodeCursor } from './shaderCodeCursor';\r\nimport { ShaderCodeConditionNode } from './shaderCodeConditionNode';\r\nimport { ShaderCodeTestNode } from './shaderCodeTestNode';\r\nimport { ShaderDefineIsDefinedOperator } from './Expressions/Operators/shaderDefineIsDefinedOperator';\r\nimport { ShaderDefineOrOperator } from './Expressions/Operators/shaderDefineOrOperator';\r\nimport { ShaderDefineAndOperator } from './Expressions/Operators/shaderDefineAndOperator';\r\nimport { ShaderDefineArithmeticOperator } from './Expressions/Operators/shaderDefineArithmeticOperator';\r\nimport { FileTools } from '../../Misc/fileTools';\r\n/** @hidden */\r\nvar ShaderProcessor = /** @class */ (function () {\r\n function ShaderProcessor() {\r\n }\r\n ShaderProcessor.Process = function (sourceCode, options, callback) {\r\n var _this = this;\r\n this._ProcessIncludes(sourceCode, options, function (codeWithIncludes) {\r\n var migratedCode = _this._ProcessShaderConversion(codeWithIncludes, options);\r\n callback(migratedCode);\r\n });\r\n };\r\n ShaderProcessor._ProcessPrecision = function (source, options) {\r\n var shouldUseHighPrecisionShader = options.shouldUseHighPrecisionShader;\r\n if (source.indexOf(\"precision highp float\") === -1) {\r\n if (!shouldUseHighPrecisionShader) {\r\n source = \"precision mediump float;\\n\" + source;\r\n }\r\n else {\r\n source = \"precision highp float;\\n\" + source;\r\n }\r\n }\r\n else {\r\n if (!shouldUseHighPrecisionShader) { // Moving highp to mediump\r\n source = source.replace(\"precision highp float\", \"precision mediump float\");\r\n }\r\n }\r\n return source;\r\n };\r\n ShaderProcessor._ExtractOperation = function (expression) {\r\n var regex = /defined\\((.+)\\)/;\r\n var match = regex.exec(expression);\r\n if (match && match.length) {\r\n return new ShaderDefineIsDefinedOperator(match[1].trim(), expression[0] === \"!\");\r\n }\r\n var operators = [\"==\", \">=\", \"<=\", \"<\", \">\"];\r\n var operator = \"\";\r\n var indexOperator = 0;\r\n for (var _i = 0, operators_1 = operators; _i < operators_1.length; _i++) {\r\n operator = operators_1[_i];\r\n indexOperator = expression.indexOf(operator);\r\n if (indexOperator > -1) {\r\n break;\r\n }\r\n }\r\n if (indexOperator === -1) {\r\n return new ShaderDefineIsDefinedOperator(expression);\r\n }\r\n var define = expression.substring(0, indexOperator).trim();\r\n var value = expression.substring(indexOperator + operator.length).trim();\r\n return new ShaderDefineArithmeticOperator(define, operator, value);\r\n };\r\n ShaderProcessor._BuildSubExpression = function (expression) {\r\n var indexOr = expression.indexOf(\"||\");\r\n if (indexOr === -1) {\r\n var indexAnd = expression.indexOf(\"&&\");\r\n if (indexAnd > -1) {\r\n var andOperator = new ShaderDefineAndOperator();\r\n var leftPart = expression.substring(0, indexAnd).trim();\r\n var rightPart = expression.substring(indexAnd + 2).trim();\r\n andOperator.leftOperand = this._BuildSubExpression(leftPart);\r\n andOperator.rightOperand = this._BuildSubExpression(rightPart);\r\n return andOperator;\r\n }\r\n else {\r\n return this._ExtractOperation(expression);\r\n }\r\n }\r\n else {\r\n var orOperator = new ShaderDefineOrOperator();\r\n var leftPart = expression.substring(0, indexOr).trim();\r\n var rightPart = expression.substring(indexOr + 2).trim();\r\n orOperator.leftOperand = this._BuildSubExpression(leftPart);\r\n orOperator.rightOperand = this._BuildSubExpression(rightPart);\r\n return orOperator;\r\n }\r\n };\r\n ShaderProcessor._BuildExpression = function (line, start) {\r\n var node = new ShaderCodeTestNode();\r\n var command = line.substring(0, start);\r\n var expression = line.substring(start).trim();\r\n if (command === \"#ifdef\") {\r\n node.testExpression = new ShaderDefineIsDefinedOperator(expression);\r\n }\r\n else if (command === \"#ifndef\") {\r\n node.testExpression = new ShaderDefineIsDefinedOperator(expression, true);\r\n }\r\n else {\r\n node.testExpression = this._BuildSubExpression(expression);\r\n }\r\n return node;\r\n };\r\n ShaderProcessor._MoveCursorWithinIf = function (cursor, rootNode, ifNode) {\r\n var line = cursor.currentLine;\r\n while (this._MoveCursor(cursor, ifNode)) {\r\n line = cursor.currentLine;\r\n var first5 = line.substring(0, 5).toLowerCase();\r\n if (first5 === \"#else\") {\r\n var elseNode = new ShaderCodeNode();\r\n rootNode.children.push(elseNode);\r\n this._MoveCursor(cursor, elseNode);\r\n return;\r\n }\r\n else if (first5 === \"#elif\") {\r\n var elifNode = this._BuildExpression(line, 5);\r\n rootNode.children.push(elifNode);\r\n ifNode = elifNode;\r\n }\r\n }\r\n };\r\n ShaderProcessor._MoveCursor = function (cursor, rootNode) {\r\n while (cursor.canRead) {\r\n cursor.lineIndex++;\r\n var line = cursor.currentLine;\r\n var keywords = /(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/;\r\n var matches = keywords.exec(line);\r\n if (matches && matches.length) {\r\n var keyword = matches[0];\r\n switch (keyword) {\r\n case \"#ifdef\": {\r\n var newRootNode = new ShaderCodeConditionNode();\r\n rootNode.children.push(newRootNode);\r\n var ifNode = this._BuildExpression(line, 6);\r\n newRootNode.children.push(ifNode);\r\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\r\n break;\r\n }\r\n case \"#else\":\r\n case \"#elif\":\r\n return true;\r\n case \"#endif\":\r\n return false;\r\n case \"#ifndef\": {\r\n var newRootNode = new ShaderCodeConditionNode();\r\n rootNode.children.push(newRootNode);\r\n var ifNode = this._BuildExpression(line, 7);\r\n newRootNode.children.push(ifNode);\r\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\r\n break;\r\n }\r\n case \"#if\": {\r\n var newRootNode = new ShaderCodeConditionNode();\r\n var ifNode = this._BuildExpression(line, 3);\r\n rootNode.children.push(newRootNode);\r\n newRootNode.children.push(ifNode);\r\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n var newNode = new ShaderCodeNode();\r\n newNode.line = line;\r\n rootNode.children.push(newNode);\r\n // Detect additional defines\r\n if (line[0] === \"#\" && line[1] === \"d\") {\r\n var split = line.replace(\";\", \"\").split(\" \");\r\n newNode.additionalDefineKey = split[1];\r\n if (split.length === 3) {\r\n newNode.additionalDefineValue = split[2];\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n ShaderProcessor._EvaluatePreProcessors = function (sourceCode, preprocessors, options) {\r\n var rootNode = new ShaderCodeNode();\r\n var cursor = new ShaderCodeCursor();\r\n cursor.lineIndex = -1;\r\n cursor.lines = sourceCode.split(\"\\n\");\r\n // Decompose (We keep it in 2 steps so it is easier to maintain and perf hit is insignificant)\r\n this._MoveCursor(cursor, rootNode);\r\n // Recompose\r\n return rootNode.process(preprocessors, options);\r\n };\r\n ShaderProcessor._PreparePreProcessors = function (options) {\r\n var defines = options.defines;\r\n var preprocessors = {};\r\n for (var _i = 0, defines_1 = defines; _i < defines_1.length; _i++) {\r\n var define = defines_1[_i];\r\n var keyValue = define.replace(\"#define\", \"\").replace(\";\", \"\").trim();\r\n var split = keyValue.split(\" \");\r\n preprocessors[split[0]] = split.length > 1 ? split[1] : \"\";\r\n }\r\n preprocessors[\"GL_ES\"] = \"true\";\r\n preprocessors[\"__VERSION__\"] = options.version;\r\n preprocessors[options.platformName] = \"true\";\r\n return preprocessors;\r\n };\r\n ShaderProcessor._ProcessShaderConversion = function (sourceCode, options) {\r\n var preparedSourceCode = this._ProcessPrecision(sourceCode, options);\r\n if (!options.processor) {\r\n return preparedSourceCode;\r\n }\r\n // Already converted\r\n if (preparedSourceCode.indexOf(\"#version 3\") !== -1) {\r\n return preparedSourceCode.replace(\"#version 300 es\", \"\");\r\n }\r\n var defines = options.defines;\r\n var preprocessors = this._PreparePreProcessors(options);\r\n // General pre processing\r\n if (options.processor.preProcessor) {\r\n preparedSourceCode = options.processor.preProcessor(preparedSourceCode, defines, options.isFragment);\r\n }\r\n preparedSourceCode = this._EvaluatePreProcessors(preparedSourceCode, preprocessors, options);\r\n // Post processing\r\n if (options.processor.postProcessor) {\r\n preparedSourceCode = options.processor.postProcessor(preparedSourceCode, defines, options.isFragment);\r\n }\r\n return preparedSourceCode;\r\n };\r\n ShaderProcessor._ProcessIncludes = function (sourceCode, options, callback) {\r\n var _this = this;\r\n var regex = /#include<(.+)>(\\((.*)\\))*(\\[(.*)\\])*/g;\r\n var match = regex.exec(sourceCode);\r\n var returnValue = new String(sourceCode);\r\n while (match != null) {\r\n var includeFile = match[1];\r\n // Uniform declaration\r\n if (includeFile.indexOf(\"__decl__\") !== -1) {\r\n includeFile = includeFile.replace(/__decl__/, \"\");\r\n if (options.supportsUniformBuffers) {\r\n includeFile = includeFile.replace(/Vertex/, \"Ubo\");\r\n includeFile = includeFile.replace(/Fragment/, \"Ubo\");\r\n }\r\n includeFile = includeFile + \"Declaration\";\r\n }\r\n if (options.includesShadersStore[includeFile]) {\r\n // Substitution\r\n var includeContent = options.includesShadersStore[includeFile];\r\n if (match[2]) {\r\n var splits = match[3].split(\",\");\r\n for (var index = 0; index < splits.length; index += 2) {\r\n var source = new RegExp(splits[index], \"g\");\r\n var dest = splits[index + 1];\r\n includeContent = includeContent.replace(source, dest);\r\n }\r\n }\r\n if (match[4]) {\r\n var indexString = match[5];\r\n if (indexString.indexOf(\"..\") !== -1) {\r\n var indexSplits = indexString.split(\"..\");\r\n var minIndex = parseInt(indexSplits[0]);\r\n var maxIndex = parseInt(indexSplits[1]);\r\n var sourceIncludeContent = includeContent.slice(0);\r\n includeContent = \"\";\r\n if (isNaN(maxIndex)) {\r\n maxIndex = options.indexParameters[indexSplits[1]];\r\n }\r\n for (var i = minIndex; i < maxIndex; i++) {\r\n if (!options.supportsUniformBuffers) {\r\n // Ubo replacement\r\n sourceIncludeContent = sourceIncludeContent.replace(/light\\{X\\}.(\\w*)/g, function (str, p1) {\r\n return p1 + \"{X}\";\r\n });\r\n }\r\n includeContent += sourceIncludeContent.replace(/\\{X\\}/g, i.toString()) + \"\\n\";\r\n }\r\n }\r\n else {\r\n if (!options.supportsUniformBuffers) {\r\n // Ubo replacement\r\n includeContent = includeContent.replace(/light\\{X\\}.(\\w*)/g, function (str, p1) {\r\n return p1 + \"{X}\";\r\n });\r\n }\r\n includeContent = includeContent.replace(/\\{X\\}/g, indexString);\r\n }\r\n }\r\n // Replace\r\n returnValue = returnValue.replace(match[0], includeContent);\r\n }\r\n else {\r\n var includeShaderUrl = options.shadersRepository + \"ShadersInclude/\" + includeFile + \".fx\";\r\n FileTools.LoadFile(includeShaderUrl, function (fileContent) {\r\n options.includesShadersStore[includeFile] = fileContent;\r\n _this._ProcessIncludes(returnValue, options, callback);\r\n });\r\n return;\r\n }\r\n match = regex.exec(sourceCode);\r\n }\r\n callback(returnValue);\r\n };\r\n return ShaderProcessor;\r\n}());\r\nexport { ShaderProcessor };\r\n//# sourceMappingURL=shaderProcessor.js.map"
  1160. },
  1161. {
  1162. "id": "../../.temp/packageES6Dev/core/Engines/WebGL/webGL2ShaderProcessors.js",
  1163. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\WebGL\\webGL2ShaderProcessors.js",
  1164. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/WebGL/webGL2ShaderProcessors.js",
  1165. "index": 30,
  1166. "index2": 28,
  1167. "size": 1975,
  1168. "cacheable": true,
  1169. "built": true,
  1170. "optional": false,
  1171. "prefetched": false,
  1172. "chunks": [
  1173. "thinEngineOnly"
  1174. ],
  1175. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1176. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1177. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1178. "issuerPath": [
  1179. {
  1180. "id": "./thinEngineOnly.ts",
  1181. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1182. "name": "./thinEngineOnly.ts",
  1183. "profile": {
  1184. "factory": 25,
  1185. "building": 1793
  1186. }
  1187. },
  1188. {
  1189. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1190. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1191. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1192. "profile": {
  1193. "factory": 10,
  1194. "building": 63
  1195. }
  1196. }
  1197. ],
  1198. "profile": {
  1199. "factory": 6,
  1200. "building": 38,
  1201. "dependencies": 28
  1202. },
  1203. "failed": false,
  1204. "errors": 0,
  1205. "warnings": 0,
  1206. "assets": [],
  1207. "reasons": [
  1208. {
  1209. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1210. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1211. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1212. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1213. "type": "harmony side effect evaluation",
  1214. "userRequest": "./WebGL/webGL2ShaderProcessors",
  1215. "loc": "11:0-71"
  1216. },
  1217. {
  1218. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1219. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1220. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1221. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1222. "type": "harmony import specifier",
  1223. "userRequest": "./WebGL/webGL2ShaderProcessors",
  1224. "loc": "296:40-61"
  1225. }
  1226. ],
  1227. "providedExports": [
  1228. "WebGL2ShaderProcessor"
  1229. ],
  1230. "optimizationBailout": [],
  1231. "depth": 2,
  1232. "source": "/** @hidden */\r\nvar WebGL2ShaderProcessor = /** @class */ (function () {\r\n function WebGL2ShaderProcessor() {\r\n }\r\n WebGL2ShaderProcessor.prototype.attributeProcessor = function (attribute) {\r\n return attribute.replace(\"attribute\", \"in\");\r\n };\r\n WebGL2ShaderProcessor.prototype.varyingProcessor = function (varying, isFragment) {\r\n return varying.replace(\"varying\", isFragment ? \"in\" : \"out\");\r\n };\r\n WebGL2ShaderProcessor.prototype.postProcessor = function (code, defines, isFragment) {\r\n var hasDrawBuffersExtension = code.search(/#extension.+GL_EXT_draw_buffers.+require/) !== -1;\r\n // Remove extensions\r\n var regex = /#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g;\r\n code = code.replace(regex, \"\");\r\n // Replace instructions\r\n code = code.replace(/texture2D\\s*\\(/g, \"texture(\");\r\n if (isFragment) {\r\n code = code.replace(/texture2DLodEXT\\s*\\(/g, \"textureLod(\");\r\n code = code.replace(/textureCubeLodEXT\\s*\\(/g, \"textureLod(\");\r\n code = code.replace(/textureCube\\s*\\(/g, \"texture(\");\r\n code = code.replace(/gl_FragDepthEXT/g, \"gl_FragDepth\");\r\n code = code.replace(/gl_FragColor/g, \"glFragColor\");\r\n code = code.replace(/gl_FragData/g, \"glFragData\");\r\n code = code.replace(/void\\s+?main\\s*\\(/g, (hasDrawBuffersExtension ? \"\" : \"out vec4 glFragColor;\\n\") + \"void main(\");\r\n }\r\n else {\r\n var hasMultiviewExtension = defines.indexOf(\"#define MULTIVIEW\") !== -1;\r\n if (hasMultiviewExtension) {\r\n return \"#extension GL_OVR_multiview2 : require\\nlayout (num_views = 2) in;\\n\" + code;\r\n }\r\n }\r\n return code;\r\n };\r\n return WebGL2ShaderProcessor;\r\n}());\r\nexport { WebGL2ShaderProcessor };\r\n//# sourceMappingURL=webGL2ShaderProcessors.js.map"
  1233. },
  1234. {
  1235. "id": "../../.temp/packageES6Dev/core/Engines/WebGL/webGLPipelineContext.js",
  1236. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\WebGL\\webGLPipelineContext.js",
  1237. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/WebGL/webGLPipelineContext.js",
  1238. "index": 33,
  1239. "index2": 31,
  1240. "size": 1078,
  1241. "cacheable": true,
  1242. "built": true,
  1243. "optional": false,
  1244. "prefetched": false,
  1245. "chunks": [
  1246. "thinEngineOnly"
  1247. ],
  1248. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1249. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1250. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1251. "issuerPath": [
  1252. {
  1253. "id": "./thinEngineOnly.ts",
  1254. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1255. "name": "./thinEngineOnly.ts",
  1256. "profile": {
  1257. "factory": 25,
  1258. "building": 1793
  1259. }
  1260. },
  1261. {
  1262. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1263. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1264. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1265. "profile": {
  1266. "factory": 10,
  1267. "building": 63
  1268. }
  1269. }
  1270. ],
  1271. "profile": {
  1272. "factory": 6,
  1273. "building": 38,
  1274. "dependencies": 28
  1275. },
  1276. "failed": false,
  1277. "errors": 0,
  1278. "warnings": 0,
  1279. "assets": [],
  1280. "reasons": [
  1281. {
  1282. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1283. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1284. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1285. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1286. "type": "harmony side effect evaluation",
  1287. "userRequest": "./WebGL/webGLPipelineContext",
  1288. "loc": "13:0-68"
  1289. },
  1290. {
  1291. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1292. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1293. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1294. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1295. "type": "harmony import specifier",
  1296. "userRequest": "./WebGL/webGLPipelineContext",
  1297. "loc": "1692:34-54"
  1298. }
  1299. ],
  1300. "providedExports": [
  1301. "WebGLPipelineContext"
  1302. ],
  1303. "optimizationBailout": [],
  1304. "depth": 2,
  1305. "source": "/** @hidden */\r\nvar WebGLPipelineContext = /** @class */ (function () {\r\n function WebGLPipelineContext() {\r\n }\r\n Object.defineProperty(WebGLPipelineContext.prototype, \"isAsync\", {\r\n get: function () {\r\n return this.isParallelCompiled;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebGLPipelineContext.prototype, \"isReady\", {\r\n get: function () {\r\n if (this.program) {\r\n if (this.isParallelCompiled) {\r\n return this.engine._isRenderingStateCompiled(this);\r\n }\r\n return true;\r\n }\r\n return false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n WebGLPipelineContext.prototype._handlesSpectorRebuildCallback = function (onCompiled) {\r\n if (onCompiled && this.program) {\r\n onCompiled(this.program);\r\n }\r\n };\r\n return WebGLPipelineContext;\r\n}());\r\nexport { WebGLPipelineContext };\r\n//# sourceMappingURL=webGLPipelineContext.js.map"
  1306. },
  1307. {
  1308. "id": "../../.temp/packageES6Dev/core/Engines/engineStore.js",
  1309. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\engineStore.js",
  1310. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/engineStore.js",
  1311. "index": 2,
  1312. "index2": 0,
  1313. "size": 1486,
  1314. "cacheable": true,
  1315. "built": true,
  1316. "optional": false,
  1317. "prefetched": false,
  1318. "chunks": [
  1319. "thinEngineOnly"
  1320. ],
  1321. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1322. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1323. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1324. "issuerPath": [
  1325. {
  1326. "id": "./thinEngineOnly.ts",
  1327. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1328. "name": "./thinEngineOnly.ts",
  1329. "profile": {
  1330. "factory": 25,
  1331. "building": 1793
  1332. }
  1333. },
  1334. {
  1335. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1336. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1337. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1338. "profile": {
  1339. "factory": 10,
  1340. "building": 63
  1341. }
  1342. }
  1343. ],
  1344. "profile": {
  1345. "factory": 6,
  1346. "building": 38,
  1347. "dependencies": 28
  1348. },
  1349. "failed": false,
  1350. "errors": 0,
  1351. "warnings": 0,
  1352. "assets": [],
  1353. "reasons": [
  1354. {
  1355. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1356. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1357. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1358. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1359. "type": "harmony side effect evaluation",
  1360. "userRequest": "./engineStore",
  1361. "loc": "1:0-44"
  1362. },
  1363. {
  1364. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1365. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1366. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1367. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1368. "type": "harmony import specifier",
  1369. "userRequest": "./engineStore",
  1370. "loc": "2289:20-31"
  1371. },
  1372. {
  1373. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1374. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1375. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1376. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1377. "type": "harmony import specifier",
  1378. "userRequest": "./engineStore",
  1379. "loc": "2290:40-51"
  1380. }
  1381. ],
  1382. "providedExports": [
  1383. "EngineStore"
  1384. ],
  1385. "optimizationBailout": [],
  1386. "depth": 2,
  1387. "source": "/**\r\n * The engine store class is responsible to hold all the instances of Engine and Scene created\r\n * during the life time of the application.\r\n */\r\nvar EngineStore = /** @class */ (function () {\r\n function EngineStore() {\r\n }\r\n Object.defineProperty(EngineStore, \"LastCreatedEngine\", {\r\n /**\r\n * Gets the latest created engine\r\n */\r\n get: function () {\r\n if (this.Instances.length === 0) {\r\n return null;\r\n }\r\n return this.Instances[this.Instances.length - 1];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(EngineStore, \"LastCreatedScene\", {\r\n /**\r\n * Gets the latest created scene\r\n */\r\n get: function () {\r\n return this._LastCreatedScene;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /** Gets the list of created engines */\r\n EngineStore.Instances = new Array();\r\n /** @hidden */\r\n EngineStore._LastCreatedScene = null;\r\n /**\r\n * Gets or sets a global variable indicating if fallback texture must be used when a texture cannot be loaded\r\n * @ignorenaming\r\n */\r\n EngineStore.UseFallbackTexture = true;\r\n /**\r\n * Texture content used if a texture cannot loaded\r\n * @ignorenaming\r\n */\r\n EngineStore.FallbackTexture = \"\";\r\n return EngineStore;\r\n}());\r\nexport { EngineStore };\r\n//# sourceMappingURL=engineStore.js.map"
  1388. },
  1389. {
  1390. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1391. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1392. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1393. "index": 1,
  1394. "index2": 33,
  1395. "size": 158160,
  1396. "cacheable": true,
  1397. "built": true,
  1398. "optional": false,
  1399. "prefetched": false,
  1400. "chunks": [
  1401. "thinEngineOnly"
  1402. ],
  1403. "issuer": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1404. "issuerId": "./thinEngineOnly.ts",
  1405. "issuerName": "./thinEngineOnly.ts",
  1406. "issuerPath": [
  1407. {
  1408. "id": "./thinEngineOnly.ts",
  1409. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1410. "name": "./thinEngineOnly.ts",
  1411. "profile": {
  1412. "factory": 25,
  1413. "building": 1793
  1414. }
  1415. }
  1416. ],
  1417. "profile": {
  1418. "factory": 10,
  1419. "building": 63
  1420. },
  1421. "failed": false,
  1422. "errors": 0,
  1423. "warnings": 0,
  1424. "assets": [],
  1425. "reasons": [
  1426. {
  1427. "moduleId": "./thinEngineOnly.ts",
  1428. "moduleIdentifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1429. "module": "./thinEngineOnly.ts",
  1430. "moduleName": "./thinEngineOnly.ts",
  1431. "type": "harmony side effect evaluation",
  1432. "userRequest": "@babylonjs/core/Engines/thinEngine",
  1433. "loc": "1:0-64"
  1434. },
  1435. {
  1436. "moduleId": "./thinEngineOnly.ts",
  1437. "moduleIdentifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1438. "module": "./thinEngineOnly.ts",
  1439. "moduleName": "./thinEngineOnly.ts",
  1440. "type": "harmony import specifier",
  1441. "userRequest": "@babylonjs/core/Engines/thinEngine",
  1442. "loc": "3:4-14"
  1443. }
  1444. ],
  1445. "providedExports": [
  1446. "ThinEngine"
  1447. ],
  1448. "optimizationBailout": [],
  1449. "depth": 1,
  1450. "source": "import { EngineStore } from './engineStore';\r\nimport { Effect } from '../Materials/effect';\r\nimport { _DevTools } from '../Misc/devTools';\r\nimport { Observable } from '../Misc/observable';\r\nimport { DepthCullingState } from '../States/depthCullingState';\r\nimport { StencilState } from '../States/stencilState';\r\nimport { AlphaState } from '../States/alphaCullingState';\r\nimport { InternalTexture, InternalTextureSource } from '../Materials/Textures/internalTexture';\r\nimport { Logger } from '../Misc/logger';\r\nimport { DomManagement } from '../Misc/domManagement';\r\nimport { WebGL2ShaderProcessor } from './WebGL/webGL2ShaderProcessors';\r\nimport { WebGLDataBuffer } from '../Meshes/WebGL/webGLDataBuffer';\r\nimport { WebGLPipelineContext } from './WebGL/webGLPipelineContext';\r\nimport { FileTools } from '../Misc/fileTools';\r\nimport { CanvasGenerator } from '../Misc/canvasGenerator';\r\n/**\r\n * Keeps track of all the buffer info used in engine.\r\n */\r\nvar BufferPointer = /** @class */ (function () {\r\n function BufferPointer() {\r\n }\r\n return BufferPointer;\r\n}());\r\n/**\r\n * The base engine class (root of all engines)\r\n */\r\nvar ThinEngine = /** @class */ (function () {\r\n /**\r\n * Creates a new engine\r\n * @param canvasOrContext defines the canvas or WebGL context to use for rendering. If you provide a WebGL context, Babylon.js will not hook events on the canvas (like pointers, keyboards, etc...) so no event observables will be available. This is mostly used when Babylon.js is used as a plugin on a system which alreay used the WebGL context\r\n * @param antialias defines enable antialiasing (default: false)\r\n * @param options defines further options to be sent to the getContext() function\r\n * @param adaptToDeviceRatio defines whether to adapt to the device's viewport characteristics (default: false)\r\n */\r\n function ThinEngine(canvasOrContext, antialias, options, adaptToDeviceRatio) {\r\n var _this = this;\r\n if (adaptToDeviceRatio === void 0) { adaptToDeviceRatio = false; }\r\n /**\r\n * Gets or sets a boolean that indicates if textures must be forced to power of 2 size even if not required\r\n */\r\n this.forcePOTTextures = false;\r\n /**\r\n * Gets a boolean indicating if the engine is currently rendering in fullscreen mode\r\n */\r\n this.isFullscreen = false;\r\n /**\r\n * Gets or sets a boolean indicating if back faces must be culled (true by default)\r\n */\r\n this.cullBackFaces = true;\r\n /**\r\n * Gets or sets a boolean indicating if the engine must keep rendering even if the window is not in foregroun\r\n */\r\n this.renderEvenInBackground = true;\r\n /**\r\n * Gets or sets a boolean indicating that cache can be kept between frames\r\n */\r\n this.preventCacheWipeBetweenFrames = false;\r\n /** Gets or sets a boolean indicating if the engine should validate programs after compilation */\r\n this.validateShaderPrograms = false;\r\n // Uniform buffers list\r\n /**\r\n * Gets or sets a boolean indicating that uniform buffers must be disabled even if they are supported\r\n */\r\n this.disableUniformBuffers = false;\r\n /** @hidden */\r\n this._uniformBuffers = new Array();\r\n this._windowIsBackground = false;\r\n this._webGLVersion = 1.0;\r\n this._highPrecisionShadersAllowed = true;\r\n /** @hidden */\r\n this._badOS = false;\r\n /** @hidden */\r\n this._badDesktopOS = false;\r\n this._colorWrite = true;\r\n this._renderingQueueLaunched = false;\r\n this._activeRenderLoops = new Array();\r\n // Lost context\r\n /**\r\n * Observable signaled when a context lost event is raised\r\n */\r\n this.onContextLostObservable = new Observable();\r\n /**\r\n * Observable signaled when a context restored event is raised\r\n */\r\n this.onContextRestoredObservable = new Observable();\r\n this._contextWasLost = false;\r\n /** @hidden */\r\n this._doNotHandleContextLost = false;\r\n /**\r\n * Gets or sets a boolean indicating that vertex array object must be disabled even if they are supported\r\n */\r\n this.disableVertexArrayObjects = false;\r\n // States\r\n /** @hidden */\r\n this._depthCullingState = new DepthCullingState();\r\n /** @hidden */\r\n this._stencilState = new StencilState();\r\n /** @hidden */\r\n this._alphaState = new AlphaState();\r\n // Cache\r\n /** @hidden */\r\n this._internalTexturesCache = new Array();\r\n /** @hidden */\r\n this._activeChannel = 0;\r\n this._currentTextureChannel = -1;\r\n /** @hidden */\r\n this._boundTexturesCache = {};\r\n this._compiledEffects = {};\r\n this._vertexAttribArraysEnabled = [];\r\n this._uintIndicesCurrentlySet = false;\r\n this._currentBoundBuffer = new Array();\r\n /** @hidden */\r\n this._currentFramebuffer = null;\r\n this._currentBufferPointers = new Array();\r\n this._currentInstanceLocations = new Array();\r\n this._currentInstanceBuffers = new Array();\r\n this._vaoRecordInProgress = false;\r\n this._mustWipeVertexAttributes = false;\r\n this._nextFreeTextureSlots = new Array();\r\n this._maxSimultaneousTextures = 0;\r\n this._activeRequests = new Array();\r\n // Hardware supported Compressed Textures\r\n this._texturesSupported = new Array();\r\n /**\r\n * Defines whether the engine has been created with the premultipliedAlpha option on or not.\r\n */\r\n this.premultipliedAlpha = true;\r\n /**\r\n * Observable event triggered before each texture is initialized\r\n */\r\n this.onBeforeTextureInitObservable = new Observable();\r\n this._viewportCached = { x: 0, y: 0, z: 0, w: 0 };\r\n this._unpackFlipYCached = null;\r\n /**\r\n * In case you are sharing the context with other applications, it might\r\n * be interested to not cache the unpack flip y state to ensure a consistent\r\n * value would be set.\r\n */\r\n this.enableUnpackFlipYCached = true;\r\n this._boundUniforms = {};\r\n var canvas = null;\r\n if (!canvasOrContext) {\r\n return;\r\n }\r\n options = options || {};\r\n if (canvasOrContext.getContext) {\r\n canvas = canvasOrContext;\r\n this._renderingCanvas = canvas;\r\n if (antialias != null) {\r\n options.antialias = antialias;\r\n }\r\n if (options.deterministicLockstep === undefined) {\r\n options.deterministicLockstep = false;\r\n }\r\n if (options.lockstepMaxSteps === undefined) {\r\n options.lockstepMaxSteps = 4;\r\n }\r\n if (options.preserveDrawingBuffer === undefined) {\r\n options.preserveDrawingBuffer = false;\r\n }\r\n if (options.audioEngine === undefined) {\r\n options.audioEngine = true;\r\n }\r\n if (options.stencil === undefined) {\r\n options.stencil = true;\r\n }\r\n if (options.premultipliedAlpha === false) {\r\n this.premultipliedAlpha = false;\r\n }\r\n this._doNotHandleContextLost = options.doNotHandleContextLost ? true : false;\r\n // Exceptions\r\n if (navigator && navigator.userAgent) {\r\n var ua = navigator.userAgent;\r\n for (var _i = 0, _a = ThinEngine.ExceptionList; _i < _a.length; _i++) {\r\n var exception = _a[_i];\r\n var key = exception.key;\r\n var targets = exception.targets;\r\n var check = new RegExp(key);\r\n if (check.test(ua)) {\r\n if (exception.capture && exception.captureConstraint) {\r\n var capture = exception.capture;\r\n var constraint = exception.captureConstraint;\r\n var regex = new RegExp(capture);\r\n var matches = regex.exec(ua);\r\n if (matches && matches.length > 0) {\r\n var capturedValue = parseInt(matches[matches.length - 1]);\r\n if (capturedValue >= constraint) {\r\n continue;\r\n }\r\n }\r\n }\r\n for (var _b = 0, targets_1 = targets; _b < targets_1.length; _b++) {\r\n var target = targets_1[_b];\r\n switch (target) {\r\n case \"uniformBuffer\":\r\n this.disableUniformBuffers = true;\r\n break;\r\n case \"vao\":\r\n this.disableVertexArrayObjects = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // Context lost\r\n if (!this._doNotHandleContextLost) {\r\n this._onContextLost = function (evt) {\r\n evt.preventDefault();\r\n _this._contextWasLost = true;\r\n Logger.Warn(\"WebGL context lost.\");\r\n _this.onContextLostObservable.notifyObservers(_this);\r\n };\r\n this._onContextRestored = function () {\r\n // Adding a timeout to avoid race condition at browser level\r\n setTimeout(function () {\r\n // Rebuild gl context\r\n _this._initGLContext();\r\n // Rebuild effects\r\n _this._rebuildEffects();\r\n // Rebuild textures\r\n _this._rebuildInternalTextures();\r\n // Rebuild buffers\r\n _this._rebuildBuffers();\r\n // Cache\r\n _this.wipeCaches(true);\r\n Logger.Warn(\"WebGL context successfully restored.\");\r\n _this.onContextRestoredObservable.notifyObservers(_this);\r\n _this._contextWasLost = false;\r\n }, 0);\r\n };\r\n canvas.addEventListener(\"webglcontextlost\", this._onContextLost, false);\r\n canvas.addEventListener(\"webglcontextrestored\", this._onContextRestored, false);\r\n options.powerPreference = \"high-performance\";\r\n }\r\n // GL\r\n if (!options.disableWebGL2Support) {\r\n try {\r\n this._gl = (canvas.getContext(\"webgl2\", options) || canvas.getContext(\"experimental-webgl2\", options));\r\n if (this._gl) {\r\n this._webGLVersion = 2.0;\r\n // Prevent weird browsers to lie :-)\r\n if (!this._gl.deleteQuery) {\r\n this._webGLVersion = 1.0;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n // Do nothing\r\n }\r\n }\r\n if (!this._gl) {\r\n if (!canvas) {\r\n throw new Error(\"The provided canvas is null or undefined.\");\r\n }\r\n try {\r\n this._gl = (canvas.getContext(\"webgl\", options) || canvas.getContext(\"experimental-webgl\", options));\r\n }\r\n catch (e) {\r\n throw new Error(\"WebGL not supported\");\r\n }\r\n }\r\n if (!this._gl) {\r\n throw new Error(\"WebGL not supported\");\r\n }\r\n }\r\n else {\r\n this._gl = canvasOrContext;\r\n this._renderingCanvas = this._gl.canvas;\r\n if (this._gl.renderbufferStorageMultisample) {\r\n this._webGLVersion = 2.0;\r\n }\r\n var attributes = this._gl.getContextAttributes();\r\n if (attributes) {\r\n options.stencil = attributes.stencil;\r\n }\r\n }\r\n // Ensures a consistent color space unpacking of textures cross browser.\r\n this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this._gl.NONE);\r\n if (options.useHighPrecisionFloats !== undefined) {\r\n this._highPrecisionShadersAllowed = options.useHighPrecisionFloats;\r\n }\r\n // Viewport\r\n var devicePixelRatio = DomManagement.IsWindowObjectExist() ? (window.devicePixelRatio || 1.0) : 1.0;\r\n var limitDeviceRatio = options.limitDeviceRatio || devicePixelRatio;\r\n this._hardwareScalingLevel = adaptToDeviceRatio ? 1.0 / Math.min(limitDeviceRatio, devicePixelRatio) : 1.0;\r\n this.resize();\r\n this._isStencilEnable = options.stencil ? true : false;\r\n this._initGLContext();\r\n // Prepare buffer pointers\r\n for (var i = 0; i < this._caps.maxVertexAttribs; i++) {\r\n this._currentBufferPointers[i] = new BufferPointer();\r\n }\r\n // Shader processor\r\n if (this.webGLVersion > 1) {\r\n this._shaderProcessor = new WebGL2ShaderProcessor();\r\n }\r\n // Detect if we are running on a faulty buggy OS.\r\n this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent);\r\n // Detect if we are running on a faulty buggy desktop OS.\r\n this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\r\n console.log(\"Babylon.js v\" + ThinEngine.Version + \" - \" + this.description);\r\n }\r\n Object.defineProperty(ThinEngine, \"NpmPackage\", {\r\n /**\r\n * Returns the current npm package of the sdk\r\n */\r\n // Not mixed with Version for tooling purpose.\r\n get: function () {\r\n return \"babylonjs@4.1.0-alpha.24\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine, \"Version\", {\r\n /**\r\n * Returns the current version of the framework\r\n */\r\n get: function () {\r\n return \"4.1.0-alpha.24\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"description\", {\r\n /**\r\n * Returns a string describing the current engine\r\n */\r\n get: function () {\r\n var description = \"WebGL\" + this.webGLVersion;\r\n if (this._caps.parallelShaderCompile) {\r\n description += \" - Parallel shader compilation\";\r\n }\r\n return description;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine, \"ShadersRepository\", {\r\n /**\r\n * Gets or sets the relative url used to load shaders if using the engine in non-minified mode\r\n */\r\n get: function () {\r\n return Effect.ShadersRepository;\r\n },\r\n set: function (value) {\r\n Effect.ShadersRepository = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"supportsUniformBuffers\", {\r\n /**\r\n * Gets a boolean indicating that the engine supports uniform buffers\r\n * @see http://doc.babylonjs.com/features/webgl2#uniform-buffer-objets\r\n */\r\n get: function () {\r\n return this.webGLVersion > 1 && !this.disableUniformBuffers;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"_shouldUseHighPrecisionShader\", {\r\n /** @hidden */\r\n get: function () {\r\n return !!(this._caps.highPrecisionShaderSupported && this._highPrecisionShadersAllowed);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"needPOTTextures\", {\r\n /**\r\n * Gets a boolean indicating that only power of 2 textures are supported\r\n * Please note that you can still use non power of 2 textures but in this case the engine will forcefully convert them\r\n */\r\n get: function () {\r\n return this._webGLVersion < 2 || this.forcePOTTextures;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"doNotHandleContextLost\", {\r\n /**\r\n * Gets or sets a boolean indicating if resources should be retained to be able to handle context lost events\r\n * @see http://doc.babylonjs.com/how_to/optimizing_your_scene#handling-webgl-context-lost\r\n */\r\n get: function () {\r\n return this._doNotHandleContextLost;\r\n },\r\n set: function (value) {\r\n this._doNotHandleContextLost = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"_supportsHardwareTextureRescaling\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"texturesSupported\", {\r\n /**\r\n * Gets the list of texture formats supported\r\n */\r\n get: function () {\r\n return this._texturesSupported;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"textureFormatInUse\", {\r\n /**\r\n * Gets the list of texture formats in use\r\n */\r\n get: function () {\r\n return this._textureFormatInUse;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"currentViewport\", {\r\n /**\r\n * Gets the current viewport\r\n */\r\n get: function () {\r\n return this._cachedViewport;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"emptyTexture\", {\r\n /**\r\n * Gets the default empty texture\r\n */\r\n get: function () {\r\n if (!this._emptyTexture) {\r\n this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, 5, false, false, 1);\r\n }\r\n return this._emptyTexture;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"emptyTexture3D\", {\r\n /**\r\n * Gets the default empty 3D texture\r\n */\r\n get: function () {\r\n if (!this._emptyTexture3D) {\r\n this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, 5, false, false, 1);\r\n }\r\n return this._emptyTexture3D;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"emptyCubeTexture\", {\r\n /**\r\n * Gets the default empty cube texture\r\n */\r\n get: function () {\r\n if (!this._emptyCubeTexture) {\r\n var faceData = new Uint8Array(4);\r\n var cubeData = [faceData, faceData, faceData, faceData, faceData, faceData];\r\n this._emptyCubeTexture = this.createRawCubeTexture(cubeData, 1, 5, 0, false, false, 1);\r\n }\r\n return this._emptyCubeTexture;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ThinEngine.prototype._rebuildInternalTextures = function () {\r\n var currentState = this._internalTexturesCache.slice(); // Do a copy because the rebuild will add proxies\r\n for (var _i = 0, currentState_1 = currentState; _i < currentState_1.length; _i++) {\r\n var internalTexture = currentState_1[_i];\r\n internalTexture._rebuild();\r\n }\r\n };\r\n ThinEngine.prototype._rebuildEffects = function () {\r\n for (var key in this._compiledEffects) {\r\n var effect = this._compiledEffects[key];\r\n effect._prepareEffect();\r\n }\r\n Effect.ResetCache();\r\n };\r\n /**\r\n * Gets a boolean indicating if all created effects are ready\r\n * @returns true if all effects are ready\r\n */\r\n ThinEngine.prototype.areAllEffectsReady = function () {\r\n for (var key in this._compiledEffects) {\r\n var effect = this._compiledEffects[key];\r\n if (!effect.isReady()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n ThinEngine.prototype._rebuildBuffers = function () {\r\n // Uniforms\r\n for (var _i = 0, _a = this._uniformBuffers; _i < _a.length; _i++) {\r\n var uniformBuffer = _a[_i];\r\n uniformBuffer._rebuild();\r\n }\r\n };\r\n ThinEngine.prototype._initGLContext = function () {\r\n // Caps\r\n this._caps = {\r\n maxTexturesImageUnits: this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),\r\n maxCombinedTexturesImageUnits: this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),\r\n maxVertexTextureImageUnits: this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),\r\n maxTextureSize: this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),\r\n maxCubemapTextureSize: this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),\r\n maxRenderTextureSize: this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),\r\n maxVertexAttribs: this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),\r\n maxVaryingVectors: this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),\r\n maxFragmentUniformVectors: this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),\r\n maxVertexUniformVectors: this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),\r\n parallelShaderCompile: this._gl.getExtension('KHR_parallel_shader_compile'),\r\n standardDerivatives: this._webGLVersion > 1 || (this._gl.getExtension('OES_standard_derivatives') !== null),\r\n maxAnisotropy: 1,\r\n astc: this._gl.getExtension('WEBGL_compressed_texture_astc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_astc'),\r\n s3tc: this._gl.getExtension('WEBGL_compressed_texture_s3tc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc'),\r\n pvrtc: this._gl.getExtension('WEBGL_compressed_texture_pvrtc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc'),\r\n etc1: this._gl.getExtension('WEBGL_compressed_texture_etc1') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_etc1'),\r\n etc2: this._gl.getExtension('WEBGL_compressed_texture_etc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_etc') ||\r\n this._gl.getExtension('WEBGL_compressed_texture_es3_0'),\r\n textureAnisotropicFilterExtension: this._gl.getExtension('EXT_texture_filter_anisotropic') || this._gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic') || this._gl.getExtension('MOZ_EXT_texture_filter_anisotropic'),\r\n uintIndices: this._webGLVersion > 1 || this._gl.getExtension('OES_element_index_uint') !== null,\r\n fragmentDepthSupported: this._webGLVersion > 1 || this._gl.getExtension('EXT_frag_depth') !== null,\r\n highPrecisionShaderSupported: false,\r\n timerQuery: this._gl.getExtension('EXT_disjoint_timer_query_webgl2') || this._gl.getExtension(\"EXT_disjoint_timer_query\"),\r\n canUseTimestampForTimerQuery: false,\r\n drawBuffersExtension: false,\r\n maxMSAASamples: 1,\r\n colorBufferFloat: this._webGLVersion > 1 && this._gl.getExtension('EXT_color_buffer_float'),\r\n textureFloat: (this._webGLVersion > 1 || this._gl.getExtension('OES_texture_float')) ? true : false,\r\n textureHalfFloat: (this._webGLVersion > 1 || this._gl.getExtension('OES_texture_half_float')) ? true : false,\r\n textureHalfFloatRender: false,\r\n textureFloatLinearFiltering: false,\r\n textureFloatRender: false,\r\n textureHalfFloatLinearFiltering: false,\r\n vertexArrayObject: false,\r\n instancedArrays: false,\r\n textureLOD: (this._webGLVersion > 1 || this._gl.getExtension('EXT_shader_texture_lod')) ? true : false,\r\n blendMinMax: false,\r\n multiview: this._gl.getExtension('OVR_multiview2'),\r\n depthTextureExtension: false\r\n };\r\n // Infos\r\n this._glVersion = this._gl.getParameter(this._gl.VERSION);\r\n var rendererInfo = this._gl.getExtension(\"WEBGL_debug_renderer_info\");\r\n if (rendererInfo != null) {\r\n this._glRenderer = this._gl.getParameter(rendererInfo.UNMASKED_RENDERER_WEBGL);\r\n this._glVendor = this._gl.getParameter(rendererInfo.UNMASKED_VENDOR_WEBGL);\r\n }\r\n if (!this._glVendor) {\r\n this._glVendor = \"Unknown vendor\";\r\n }\r\n if (!this._glRenderer) {\r\n this._glRenderer = \"Unknown renderer\";\r\n }\r\n // Constants\r\n this._gl.HALF_FLOAT_OES = 0x8D61; // Half floating-point type (16-bit).\r\n if (this._gl.RGBA16F !== 0x881A) {\r\n this._gl.RGBA16F = 0x881A; // RGBA 16-bit floating-point color-renderable internal sized format.\r\n }\r\n if (this._gl.RGBA32F !== 0x8814) {\r\n this._gl.RGBA32F = 0x8814; // RGBA 32-bit floating-point color-renderable internal sized format.\r\n }\r\n if (this._gl.DEPTH24_STENCIL8 !== 35056) {\r\n this._gl.DEPTH24_STENCIL8 = 35056;\r\n }\r\n // Extensions\r\n if (this._caps.timerQuery) {\r\n if (this._webGLVersion === 1) {\r\n this._gl.getQuery = this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery);\r\n }\r\n this._caps.canUseTimestampForTimerQuery = this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT, this._caps.timerQuery.QUERY_COUNTER_BITS_EXT) > 0;\r\n }\r\n this._caps.maxAnisotropy = this._caps.textureAnisotropicFilterExtension ? this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0;\r\n this._caps.textureFloatLinearFiltering = this._caps.textureFloat && this._gl.getExtension('OES_texture_float_linear') ? true : false;\r\n this._caps.textureFloatRender = this._caps.textureFloat && this._canRenderToFloatFramebuffer() ? true : false;\r\n this._caps.textureHalfFloatLinearFiltering = (this._webGLVersion > 1 || (this._caps.textureHalfFloat && this._gl.getExtension('OES_texture_half_float_linear'))) ? true : false;\r\n // Checks if some of the format renders first to allow the use of webgl inspector.\r\n if (this._webGLVersion > 1) {\r\n this._gl.HALF_FLOAT_OES = 0x140B;\r\n }\r\n this._caps.textureHalfFloatRender = this._caps.textureHalfFloat && this._canRenderToHalfFloatFramebuffer();\r\n // Draw buffers\r\n if (this._webGLVersion > 1) {\r\n this._caps.drawBuffersExtension = true;\r\n this._caps.maxMSAASamples = this._gl.getParameter(this._gl.MAX_SAMPLES);\r\n }\r\n else {\r\n var drawBuffersExtension = this._gl.getExtension('WEBGL_draw_buffers');\r\n if (drawBuffersExtension !== null) {\r\n this._caps.drawBuffersExtension = true;\r\n this._gl.drawBuffers = drawBuffersExtension.drawBuffersWEBGL.bind(drawBuffersExtension);\r\n this._gl.DRAW_FRAMEBUFFER = this._gl.FRAMEBUFFER;\r\n for (var i = 0; i < 16; i++) {\r\n this._gl[\"COLOR_ATTACHMENT\" + i + \"_WEBGL\"] = drawBuffersExtension[\"COLOR_ATTACHMENT\" + i + \"_WEBGL\"];\r\n }\r\n }\r\n }\r\n // Depth Texture\r\n if (this._webGLVersion > 1) {\r\n this._caps.depthTextureExtension = true;\r\n }\r\n else {\r\n var depthTextureExtension = this._gl.getExtension('WEBGL_depth_texture');\r\n if (depthTextureExtension != null) {\r\n this._caps.depthTextureExtension = true;\r\n this._gl.UNSIGNED_INT_24_8 = depthTextureExtension.UNSIGNED_INT_24_8_WEBGL;\r\n }\r\n }\r\n // Vertex array object\r\n if (this.disableVertexArrayObjects) {\r\n this._caps.vertexArrayObject = false;\r\n }\r\n else if (this._webGLVersion > 1) {\r\n this._caps.vertexArrayObject = true;\r\n }\r\n else {\r\n var vertexArrayObjectExtension = this._gl.getExtension('OES_vertex_array_object');\r\n if (vertexArrayObjectExtension != null) {\r\n this._caps.vertexArrayObject = true;\r\n this._gl.createVertexArray = vertexArrayObjectExtension.createVertexArrayOES.bind(vertexArrayObjectExtension);\r\n this._gl.bindVertexArray = vertexArrayObjectExtension.bindVertexArrayOES.bind(vertexArrayObjectExtension);\r\n this._gl.deleteVertexArray = vertexArrayObjectExtension.deleteVertexArrayOES.bind(vertexArrayObjectExtension);\r\n }\r\n }\r\n // Instances count\r\n if (this._webGLVersion > 1) {\r\n this._caps.instancedArrays = true;\r\n }\r\n else {\r\n var instanceExtension = this._gl.getExtension('ANGLE_instanced_arrays');\r\n if (instanceExtension != null) {\r\n this._caps.instancedArrays = true;\r\n this._gl.drawArraysInstanced = instanceExtension.drawArraysInstancedANGLE.bind(instanceExtension);\r\n this._gl.drawElementsInstanced = instanceExtension.drawElementsInstancedANGLE.bind(instanceExtension);\r\n this._gl.vertexAttribDivisor = instanceExtension.vertexAttribDivisorANGLE.bind(instanceExtension);\r\n }\r\n else {\r\n this._caps.instancedArrays = false;\r\n }\r\n }\r\n // Intelligently add supported compressed formats in order to check for.\r\n // Check for ASTC support first as it is most powerful and to be very cross platform.\r\n // Next PVRTC & DXT, which are probably superior to ETC1/2.\r\n // Likely no hardware which supports both PVR & DXT, so order matters little.\r\n // ETC2 is newer and handles ETC1 (no alpha capability), so check for first.\r\n if (this._caps.astc) {\r\n this.texturesSupported.push('-astc.ktx');\r\n }\r\n if (this._caps.s3tc) {\r\n this.texturesSupported.push('-dxt.ktx');\r\n }\r\n if (this._caps.pvrtc) {\r\n this.texturesSupported.push('-pvrtc.ktx');\r\n }\r\n if (this._caps.etc2) {\r\n this.texturesSupported.push('-etc2.ktx');\r\n }\r\n if (this._caps.etc1) {\r\n this.texturesSupported.push('-etc1.ktx');\r\n }\r\n if (this._gl.getShaderPrecisionFormat) {\r\n var vertex_highp = this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER, this._gl.HIGH_FLOAT);\r\n var fragment_highp = this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER, this._gl.HIGH_FLOAT);\r\n if (vertex_highp && fragment_highp) {\r\n this._caps.highPrecisionShaderSupported = vertex_highp.precision !== 0 && fragment_highp.precision !== 0;\r\n }\r\n }\r\n if (this._webGLVersion > 1) {\r\n this._caps.blendMinMax = true;\r\n }\r\n else {\r\n var blendMinMaxExtension = this._gl.getExtension('EXT_blend_minmax');\r\n if (blendMinMaxExtension != null) {\r\n this._caps.blendMinMax = true;\r\n this._gl.MAX = blendMinMaxExtension.MAX_EXT;\r\n this._gl.MIN = blendMinMaxExtension.MIN_EXT;\r\n }\r\n }\r\n // Depth buffer\r\n this._depthCullingState.depthTest = true;\r\n this._depthCullingState.depthFunc = this._gl.LEQUAL;\r\n this._depthCullingState.depthMask = true;\r\n // Texture maps\r\n this._maxSimultaneousTextures = this._caps.maxCombinedTexturesImageUnits;\r\n for (var slot = 0; slot < this._maxSimultaneousTextures; slot++) {\r\n this._nextFreeTextureSlots.push(slot);\r\n }\r\n };\r\n Object.defineProperty(ThinEngine.prototype, \"webGLVersion\", {\r\n /**\r\n * Gets version of the current webGL context\r\n */\r\n get: function () {\r\n return this._webGLVersion;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a string identifying the name of the class\r\n * @returns \"Engine\" string\r\n */\r\n ThinEngine.prototype.getClassName = function () {\r\n return \"ThinEngine\";\r\n };\r\n Object.defineProperty(ThinEngine.prototype, \"isStencilEnable\", {\r\n /**\r\n * Returns true if the stencil buffer has been enabled through the creation option of the context.\r\n */\r\n get: function () {\r\n return this._isStencilEnable;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /** @hidden */\r\n ThinEngine.prototype._prepareWorkingCanvas = function () {\r\n if (this._workingCanvas) {\r\n return;\r\n }\r\n this._workingCanvas = CanvasGenerator.CreateCanvas(1, 1);\r\n var context = this._workingCanvas.getContext(\"2d\");\r\n if (context) {\r\n this._workingContext = context;\r\n }\r\n };\r\n /**\r\n * Reset the texture cache to empty state\r\n */\r\n ThinEngine.prototype.resetTextureCache = function () {\r\n for (var key in this._boundTexturesCache) {\r\n if (!this._boundTexturesCache.hasOwnProperty(key)) {\r\n continue;\r\n }\r\n this._boundTexturesCache[key] = null;\r\n }\r\n this._currentTextureChannel = -1;\r\n };\r\n /**\r\n * Gets an object containing information about the current webGL context\r\n * @returns an object containing the vender, the renderer and the version of the current webGL context\r\n */\r\n ThinEngine.prototype.getGlInfo = function () {\r\n return {\r\n vendor: this._glVendor,\r\n renderer: this._glRenderer,\r\n version: this._glVersion\r\n };\r\n };\r\n /**\r\n * Defines the hardware scaling level.\r\n * By default the hardware scaling level is computed from the window device ratio.\r\n * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.\r\n * @param level defines the level to use\r\n */\r\n ThinEngine.prototype.setHardwareScalingLevel = function (level) {\r\n this._hardwareScalingLevel = level;\r\n this.resize();\r\n };\r\n /**\r\n * Gets the current hardware scaling level.\r\n * By default the hardware scaling level is computed from the window device ratio.\r\n * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.\r\n * @returns a number indicating the current hardware scaling level\r\n */\r\n ThinEngine.prototype.getHardwareScalingLevel = function () {\r\n return this._hardwareScalingLevel;\r\n };\r\n /**\r\n * Gets the list of loaded textures\r\n * @returns an array containing all loaded textures\r\n */\r\n ThinEngine.prototype.getLoadedTexturesCache = function () {\r\n return this._internalTexturesCache;\r\n };\r\n /**\r\n * Gets the object containing all engine capabilities\r\n * @returns the EngineCapabilities object\r\n */\r\n ThinEngine.prototype.getCaps = function () {\r\n return this._caps;\r\n };\r\n /**\r\n * stop executing a render loop function and remove it from the execution array\r\n * @param renderFunction defines the function to be removed. If not provided all functions will be removed.\r\n */\r\n ThinEngine.prototype.stopRenderLoop = function (renderFunction) {\r\n if (!renderFunction) {\r\n this._activeRenderLoops = [];\r\n return;\r\n }\r\n var index = this._activeRenderLoops.indexOf(renderFunction);\r\n if (index >= 0) {\r\n this._activeRenderLoops.splice(index, 1);\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._renderLoop = function () {\r\n if (!this._contextWasLost) {\r\n var shouldRender = true;\r\n if (!this.renderEvenInBackground && this._windowIsBackground) {\r\n shouldRender = false;\r\n }\r\n if (shouldRender) {\r\n // Start new frame\r\n this.beginFrame();\r\n for (var index = 0; index < this._activeRenderLoops.length; index++) {\r\n var renderFunction = this._activeRenderLoops[index];\r\n renderFunction();\r\n }\r\n // Present\r\n this.endFrame();\r\n }\r\n }\r\n if (this._activeRenderLoops.length > 0) {\r\n this._frameHandler = this._queueNewFrame(this._bindedRenderFunction, this.getHostWindow());\r\n }\r\n else {\r\n this._renderingQueueLaunched = false;\r\n }\r\n };\r\n /**\r\n * Gets the HTML canvas attached with the current webGL context\r\n * @returns a HTML canvas\r\n */\r\n ThinEngine.prototype.getRenderingCanvas = function () {\r\n return this._renderingCanvas;\r\n };\r\n /**\r\n * Gets host window\r\n * @returns the host window object\r\n */\r\n ThinEngine.prototype.getHostWindow = function () {\r\n if (!DomManagement.IsWindowObjectExist()) {\r\n return null;\r\n }\r\n if (this._renderingCanvas && this._renderingCanvas.ownerDocument && this._renderingCanvas.ownerDocument.defaultView) {\r\n return this._renderingCanvas.ownerDocument.defaultView;\r\n }\r\n return window;\r\n };\r\n /**\r\n * Gets the current render width\r\n * @param useScreen defines if screen size must be used (or the current render target if any)\r\n * @returns a number defining the current render width\r\n */\r\n ThinEngine.prototype.getRenderWidth = function (useScreen) {\r\n if (useScreen === void 0) { useScreen = false; }\r\n if (!useScreen && this._currentRenderTarget) {\r\n return this._currentRenderTarget.width;\r\n }\r\n return this._gl.drawingBufferWidth;\r\n };\r\n /**\r\n * Gets the current render height\r\n * @param useScreen defines if screen size must be used (or the current render target if any)\r\n * @returns a number defining the current render height\r\n */\r\n ThinEngine.prototype.getRenderHeight = function (useScreen) {\r\n if (useScreen === void 0) { useScreen = false; }\r\n if (!useScreen && this._currentRenderTarget) {\r\n return this._currentRenderTarget.height;\r\n }\r\n return this._gl.drawingBufferHeight;\r\n };\r\n /**\r\n * Can be used to override the current requestAnimationFrame requester.\r\n * @hidden\r\n */\r\n ThinEngine.prototype._queueNewFrame = function (bindedRenderFunction, requester) {\r\n return ThinEngine.QueueNewFrame(bindedRenderFunction, requester);\r\n };\r\n /**\r\n * Register and execute a render loop. The engine can have more than one render function\r\n * @param renderFunction defines the function to continuously execute\r\n */\r\n ThinEngine.prototype.runRenderLoop = function (renderFunction) {\r\n if (this._activeRenderLoops.indexOf(renderFunction) !== -1) {\r\n return;\r\n }\r\n this._activeRenderLoops.push(renderFunction);\r\n if (!this._renderingQueueLaunched) {\r\n this._renderingQueueLaunched = true;\r\n this._bindedRenderFunction = this._renderLoop.bind(this);\r\n this._frameHandler = this._queueNewFrame(this._bindedRenderFunction, this.getHostWindow());\r\n }\r\n };\r\n /**\r\n * Clear the current render buffer or the current render target (if any is set up)\r\n * @param color defines the color to use\r\n * @param backBuffer defines if the back buffer must be cleared\r\n * @param depth defines if the depth buffer must be cleared\r\n * @param stencil defines if the stencil buffer must be cleared\r\n */\r\n ThinEngine.prototype.clear = function (color, backBuffer, depth, stencil) {\r\n if (stencil === void 0) { stencil = false; }\r\n this.applyStates();\r\n var mode = 0;\r\n if (backBuffer && color) {\r\n this._gl.clearColor(color.r, color.g, color.b, color.a !== undefined ? color.a : 1.0);\r\n mode |= this._gl.COLOR_BUFFER_BIT;\r\n }\r\n if (depth) {\r\n this._gl.clearDepth(1.0);\r\n mode |= this._gl.DEPTH_BUFFER_BIT;\r\n }\r\n if (stencil) {\r\n this._gl.clearStencil(0);\r\n mode |= this._gl.STENCIL_BUFFER_BIT;\r\n }\r\n this._gl.clear(mode);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._viewport = function (x, y, width, height) {\r\n if (x !== this._viewportCached.x ||\r\n y !== this._viewportCached.y ||\r\n width !== this._viewportCached.z ||\r\n height !== this._viewportCached.w) {\r\n this._viewportCached.x = x;\r\n this._viewportCached.y = y;\r\n this._viewportCached.z = width;\r\n this._viewportCached.w = height;\r\n this._gl.viewport(x, y, width, height);\r\n }\r\n };\r\n /**\r\n * Set the WebGL's viewport\r\n * @param viewport defines the viewport element to be used\r\n * @param requiredWidth defines the width required for rendering. If not provided the rendering canvas' width is used\r\n * @param requiredHeight defines the height required for rendering. If not provided the rendering canvas' height is used\r\n */\r\n ThinEngine.prototype.setViewport = function (viewport, requiredWidth, requiredHeight) {\r\n var width = requiredWidth || this.getRenderWidth();\r\n var height = requiredHeight || this.getRenderHeight();\r\n var x = viewport.x || 0;\r\n var y = viewport.y || 0;\r\n this._cachedViewport = viewport;\r\n this._viewport(x * width, y * height, width * viewport.width, height * viewport.height);\r\n };\r\n /**\r\n * Begin a new frame\r\n */\r\n ThinEngine.prototype.beginFrame = function () {\r\n };\r\n /**\r\n * Enf the current frame\r\n */\r\n ThinEngine.prototype.endFrame = function () {\r\n // Force a flush in case we are using a bad OS.\r\n if (this._badOS) {\r\n this.flushFramebuffer();\r\n }\r\n };\r\n /**\r\n * Resize the view according to the canvas' size\r\n */\r\n ThinEngine.prototype.resize = function () {\r\n var width;\r\n var height;\r\n if (DomManagement.IsWindowObjectExist()) {\r\n width = this._renderingCanvas ? this._renderingCanvas.clientWidth : window.innerWidth;\r\n height = this._renderingCanvas ? this._renderingCanvas.clientHeight : window.innerHeight;\r\n }\r\n else {\r\n width = this._renderingCanvas ? this._renderingCanvas.width : 100;\r\n height = this._renderingCanvas ? this._renderingCanvas.height : 100;\r\n }\r\n this.setSize(width / this._hardwareScalingLevel, height / this._hardwareScalingLevel);\r\n };\r\n /**\r\n * Force a specific size of the canvas\r\n * @param width defines the new canvas' width\r\n * @param height defines the new canvas' height\r\n */\r\n ThinEngine.prototype.setSize = function (width, height) {\r\n if (!this._renderingCanvas) {\r\n return;\r\n }\r\n width = width | 0;\r\n height = height | 0;\r\n if (this._renderingCanvas.width === width && this._renderingCanvas.height === height) {\r\n return;\r\n }\r\n this._renderingCanvas.width = width;\r\n this._renderingCanvas.height = height;\r\n };\r\n /**\r\n * Binds the frame buffer to the specified texture.\r\n * @param texture The texture to render to or null for the default canvas\r\n * @param faceIndex The face of the texture to render to in case of cube texture\r\n * @param requiredWidth The width of the target to render to\r\n * @param requiredHeight The height of the target to render to\r\n * @param forceFullscreenViewport Forces the viewport to be the entire texture/screen if true\r\n * @param depthStencilTexture The depth stencil texture to use to render\r\n * @param lodLevel defines le lod level to bind to the frame buffer\r\n */\r\n ThinEngine.prototype.bindFramebuffer = function (texture, faceIndex, requiredWidth, requiredHeight, forceFullscreenViewport, depthStencilTexture, lodLevel) {\r\n if (lodLevel === void 0) { lodLevel = 0; }\r\n if (this._currentRenderTarget) {\r\n this.unBindFramebuffer(this._currentRenderTarget);\r\n }\r\n this._currentRenderTarget = texture;\r\n this._bindUnboundFramebuffer(texture._MSAAFramebuffer ? texture._MSAAFramebuffer : texture._framebuffer);\r\n var gl = this._gl;\r\n if (texture.isCube) {\r\n if (faceIndex === undefined) {\r\n faceIndex = 0;\r\n }\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, texture._webGLTexture, lodLevel);\r\n if (depthStencilTexture) {\r\n if (depthStencilTexture._generateStencilBuffer) {\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, depthStencilTexture._webGLTexture, lodLevel);\r\n }\r\n else {\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, depthStencilTexture._webGLTexture, lodLevel);\r\n }\r\n }\r\n }\r\n if (this._cachedViewport && !forceFullscreenViewport) {\r\n this.setViewport(this._cachedViewport, requiredWidth, requiredHeight);\r\n }\r\n else {\r\n if (!requiredWidth) {\r\n requiredWidth = texture.width;\r\n if (lodLevel) {\r\n requiredWidth = requiredWidth / Math.pow(2, lodLevel);\r\n }\r\n }\r\n if (!requiredHeight) {\r\n requiredHeight = texture.height;\r\n if (lodLevel) {\r\n requiredHeight = requiredHeight / Math.pow(2, lodLevel);\r\n }\r\n }\r\n this._viewport(0, 0, requiredWidth, requiredHeight);\r\n }\r\n this.wipeCaches();\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._bindUnboundFramebuffer = function (framebuffer) {\r\n if (this._currentFramebuffer !== framebuffer) {\r\n this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, framebuffer);\r\n this._currentFramebuffer = framebuffer;\r\n }\r\n };\r\n /**\r\n * Unbind the current render target texture from the webGL context\r\n * @param texture defines the render target texture to unbind\r\n * @param disableGenerateMipMaps defines a boolean indicating that mipmaps must not be generated\r\n * @param onBeforeUnbind defines a function which will be called before the effective unbind\r\n */\r\n ThinEngine.prototype.unBindFramebuffer = function (texture, disableGenerateMipMaps, onBeforeUnbind) {\r\n if (disableGenerateMipMaps === void 0) { disableGenerateMipMaps = false; }\r\n this._currentRenderTarget = null;\r\n // If MSAA, we need to bitblt back to main texture\r\n var gl = this._gl;\r\n if (texture._MSAAFramebuffer) {\r\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, texture._MSAAFramebuffer);\r\n gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, texture._framebuffer);\r\n gl.blitFramebuffer(0, 0, texture.width, texture.height, 0, 0, texture.width, texture.height, gl.COLOR_BUFFER_BIT, gl.NEAREST);\r\n }\r\n if (texture.generateMipMaps && !disableGenerateMipMaps && !texture.isCube) {\r\n this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n this._bindTextureDirectly(gl.TEXTURE_2D, null);\r\n }\r\n if (onBeforeUnbind) {\r\n if (texture._MSAAFramebuffer) {\r\n // Bind the correct framebuffer\r\n this._bindUnboundFramebuffer(texture._framebuffer);\r\n }\r\n onBeforeUnbind();\r\n }\r\n this._bindUnboundFramebuffer(null);\r\n };\r\n /**\r\n * Force a webGL flush (ie. a flush of all waiting webGL commands)\r\n */\r\n ThinEngine.prototype.flushFramebuffer = function () {\r\n this._gl.flush();\r\n };\r\n /**\r\n * Unbind the current render target and bind the default framebuffer\r\n */\r\n ThinEngine.prototype.restoreDefaultFramebuffer = function () {\r\n if (this._currentRenderTarget) {\r\n this.unBindFramebuffer(this._currentRenderTarget);\r\n }\r\n else {\r\n this._bindUnboundFramebuffer(null);\r\n }\r\n if (this._cachedViewport) {\r\n this.setViewport(this._cachedViewport);\r\n }\r\n this.wipeCaches();\r\n };\r\n // VBOs\r\n /** @hidden */\r\n ThinEngine.prototype._resetVertexBufferBinding = function () {\r\n this.bindArrayBuffer(null);\r\n this._cachedVertexBuffers = null;\r\n };\r\n /**\r\n * Creates a vertex buffer\r\n * @param data the data for the vertex buffer\r\n * @returns the new WebGL static buffer\r\n */\r\n ThinEngine.prototype.createVertexBuffer = function (data) {\r\n return this._createVertexBuffer(data, this._gl.STATIC_DRAW);\r\n };\r\n ThinEngine.prototype._createVertexBuffer = function (data, usage) {\r\n var vbo = this._gl.createBuffer();\r\n if (!vbo) {\r\n throw new Error(\"Unable to create vertex buffer\");\r\n }\r\n var dataBuffer = new WebGLDataBuffer(vbo);\r\n this.bindArrayBuffer(dataBuffer);\r\n if (data instanceof Array) {\r\n this._gl.bufferData(this._gl.ARRAY_BUFFER, new Float32Array(data), this._gl.STATIC_DRAW);\r\n }\r\n else {\r\n this._gl.bufferData(this._gl.ARRAY_BUFFER, data, this._gl.STATIC_DRAW);\r\n }\r\n this._resetVertexBufferBinding();\r\n dataBuffer.references = 1;\r\n return dataBuffer;\r\n };\r\n /**\r\n * Creates a dynamic vertex buffer\r\n * @param data the data for the dynamic vertex buffer\r\n * @returns the new WebGL dynamic buffer\r\n */\r\n ThinEngine.prototype.createDynamicVertexBuffer = function (data) {\r\n return this._createVertexBuffer(data, this._gl.DYNAMIC_DRAW);\r\n };\r\n ThinEngine.prototype._resetIndexBufferBinding = function () {\r\n this.bindIndexBuffer(null);\r\n this._cachedIndexBuffer = null;\r\n };\r\n /**\r\n * Creates a new index buffer\r\n * @param indices defines the content of the index buffer\r\n * @param updatable defines if the index buffer must be updatable\r\n * @returns a new webGL buffer\r\n */\r\n ThinEngine.prototype.createIndexBuffer = function (indices, updatable) {\r\n var vbo = this._gl.createBuffer();\r\n var dataBuffer = new WebGLDataBuffer(vbo);\r\n if (!vbo) {\r\n throw new Error(\"Unable to create index buffer\");\r\n }\r\n this.bindIndexBuffer(dataBuffer);\r\n var data = this._normalizeIndexData(indices);\r\n this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, data, updatable ? this._gl.DYNAMIC_DRAW : this._gl.STATIC_DRAW);\r\n this._resetIndexBufferBinding();\r\n dataBuffer.references = 1;\r\n dataBuffer.is32Bits = (data.BYTES_PER_ELEMENT === 4);\r\n return dataBuffer;\r\n };\r\n ThinEngine.prototype._normalizeIndexData = function (indices) {\r\n if (indices instanceof Uint16Array) {\r\n return indices;\r\n }\r\n // Check 32 bit support\r\n if (this._caps.uintIndices) {\r\n if (indices instanceof Uint32Array) {\r\n return indices;\r\n }\r\n else {\r\n // number[] or Int32Array, check if 32 bit is necessary\r\n for (var index = 0; index < indices.length; index++) {\r\n if (indices[index] >= 65535) {\r\n return new Uint32Array(indices);\r\n }\r\n }\r\n return new Uint16Array(indices);\r\n }\r\n }\r\n // No 32 bit support, force conversion to 16 bit (values greater 16 bit are lost)\r\n return new Uint16Array(indices);\r\n };\r\n /**\r\n * Bind a webGL buffer to the webGL context\r\n * @param buffer defines the buffer to bind\r\n */\r\n ThinEngine.prototype.bindArrayBuffer = function (buffer) {\r\n if (!this._vaoRecordInProgress) {\r\n this._unbindVertexArrayObject();\r\n }\r\n this.bindBuffer(buffer, this._gl.ARRAY_BUFFER);\r\n };\r\n /**\r\n * Bind a specific block at a given index in a specific shader program\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param blockName defines the block name\r\n * @param index defines the index where to bind the block\r\n */\r\n ThinEngine.prototype.bindUniformBlock = function (pipelineContext, blockName, index) {\r\n var program = pipelineContext.program;\r\n var uniformLocation = this._gl.getUniformBlockIndex(program, blockName);\r\n this._gl.uniformBlockBinding(program, uniformLocation, index);\r\n };\r\n ThinEngine.prototype.bindIndexBuffer = function (buffer) {\r\n if (!this._vaoRecordInProgress) {\r\n this._unbindVertexArrayObject();\r\n }\r\n this.bindBuffer(buffer, this._gl.ELEMENT_ARRAY_BUFFER);\r\n };\r\n ThinEngine.prototype.bindBuffer = function (buffer, target) {\r\n if (this._vaoRecordInProgress || this._currentBoundBuffer[target] !== buffer) {\r\n this._gl.bindBuffer(target, buffer ? buffer.underlyingResource : null);\r\n this._currentBoundBuffer[target] = buffer;\r\n }\r\n };\r\n /**\r\n * update the bound buffer with the given data\r\n * @param data defines the data to update\r\n */\r\n ThinEngine.prototype.updateArrayBuffer = function (data) {\r\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\r\n };\r\n ThinEngine.prototype._vertexAttribPointer = function (buffer, indx, size, type, normalized, stride, offset) {\r\n var pointer = this._currentBufferPointers[indx];\r\n var changed = false;\r\n if (!pointer.active) {\r\n changed = true;\r\n pointer.active = true;\r\n pointer.index = indx;\r\n pointer.size = size;\r\n pointer.type = type;\r\n pointer.normalized = normalized;\r\n pointer.stride = stride;\r\n pointer.offset = offset;\r\n pointer.buffer = buffer;\r\n }\r\n else {\r\n if (pointer.buffer !== buffer) {\r\n pointer.buffer = buffer;\r\n changed = true;\r\n }\r\n if (pointer.size !== size) {\r\n pointer.size = size;\r\n changed = true;\r\n }\r\n if (pointer.type !== type) {\r\n pointer.type = type;\r\n changed = true;\r\n }\r\n if (pointer.normalized !== normalized) {\r\n pointer.normalized = normalized;\r\n changed = true;\r\n }\r\n if (pointer.stride !== stride) {\r\n pointer.stride = stride;\r\n changed = true;\r\n }\r\n if (pointer.offset !== offset) {\r\n pointer.offset = offset;\r\n changed = true;\r\n }\r\n }\r\n if (changed || this._vaoRecordInProgress) {\r\n this.bindArrayBuffer(buffer);\r\n this._gl.vertexAttribPointer(indx, size, type, normalized, stride, offset);\r\n }\r\n };\r\n ThinEngine.prototype._bindIndexBufferWithCache = function (indexBuffer) {\r\n if (indexBuffer == null) {\r\n return;\r\n }\r\n if (this._cachedIndexBuffer !== indexBuffer) {\r\n this._cachedIndexBuffer = indexBuffer;\r\n this.bindIndexBuffer(indexBuffer);\r\n this._uintIndicesCurrentlySet = indexBuffer.is32Bits;\r\n }\r\n };\r\n ThinEngine.prototype._bindVertexBuffersAttributes = function (vertexBuffers, effect) {\r\n var attributes = effect.getAttributesNames();\r\n if (!this._vaoRecordInProgress) {\r\n this._unbindVertexArrayObject();\r\n }\r\n this.unbindAllAttributes();\r\n for (var index = 0; index < attributes.length; index++) {\r\n var order = effect.getAttributeLocation(index);\r\n if (order >= 0) {\r\n var vertexBuffer = vertexBuffers[attributes[index]];\r\n if (!vertexBuffer) {\r\n continue;\r\n }\r\n this._gl.enableVertexAttribArray(order);\r\n if (!this._vaoRecordInProgress) {\r\n this._vertexAttribArraysEnabled[order] = true;\r\n }\r\n var buffer = vertexBuffer.getBuffer();\r\n if (buffer) {\r\n this._vertexAttribPointer(buffer, order, vertexBuffer.getSize(), vertexBuffer.type, vertexBuffer.normalized, vertexBuffer.byteStride, vertexBuffer.byteOffset);\r\n if (vertexBuffer.getIsInstanced()) {\r\n this._gl.vertexAttribDivisor(order, vertexBuffer.getInstanceDivisor());\r\n if (!this._vaoRecordInProgress) {\r\n this._currentInstanceLocations.push(order);\r\n this._currentInstanceBuffers.push(buffer);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Records a vertex array object\r\n * @see http://doc.babylonjs.com/features/webgl2#vertex-array-objects\r\n * @param vertexBuffers defines the list of vertex buffers to store\r\n * @param indexBuffer defines the index buffer to store\r\n * @param effect defines the effect to store\r\n * @returns the new vertex array object\r\n */\r\n ThinEngine.prototype.recordVertexArrayObject = function (vertexBuffers, indexBuffer, effect) {\r\n var vao = this._gl.createVertexArray();\r\n this._vaoRecordInProgress = true;\r\n this._gl.bindVertexArray(vao);\r\n this._mustWipeVertexAttributes = true;\r\n this._bindVertexBuffersAttributes(vertexBuffers, effect);\r\n this.bindIndexBuffer(indexBuffer);\r\n this._vaoRecordInProgress = false;\r\n this._gl.bindVertexArray(null);\r\n return vao;\r\n };\r\n /**\r\n * Bind a specific vertex array object\r\n * @see http://doc.babylonjs.com/features/webgl2#vertex-array-objects\r\n * @param vertexArrayObject defines the vertex array object to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n */\r\n ThinEngine.prototype.bindVertexArrayObject = function (vertexArrayObject, indexBuffer) {\r\n if (this._cachedVertexArrayObject !== vertexArrayObject) {\r\n this._cachedVertexArrayObject = vertexArrayObject;\r\n this._gl.bindVertexArray(vertexArrayObject);\r\n this._cachedVertexBuffers = null;\r\n this._cachedIndexBuffer = null;\r\n this._uintIndicesCurrentlySet = indexBuffer != null && indexBuffer.is32Bits;\r\n this._mustWipeVertexAttributes = true;\r\n }\r\n };\r\n /**\r\n * Bind webGl buffers directly to the webGL context\r\n * @param vertexBuffer defines the vertex buffer to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n * @param vertexDeclaration defines the vertex declaration to use with the vertex buffer\r\n * @param vertexStrideSize defines the vertex stride of the vertex buffer\r\n * @param effect defines the effect associated with the vertex buffer\r\n */\r\n ThinEngine.prototype.bindBuffersDirectly = function (vertexBuffer, indexBuffer, vertexDeclaration, vertexStrideSize, effect) {\r\n if (this._cachedVertexBuffers !== vertexBuffer || this._cachedEffectForVertexBuffers !== effect) {\r\n this._cachedVertexBuffers = vertexBuffer;\r\n this._cachedEffectForVertexBuffers = effect;\r\n var attributesCount = effect.getAttributesCount();\r\n this._unbindVertexArrayObject();\r\n this.unbindAllAttributes();\r\n var offset = 0;\r\n for (var index = 0; index < attributesCount; index++) {\r\n if (index < vertexDeclaration.length) {\r\n var order = effect.getAttributeLocation(index);\r\n if (order >= 0) {\r\n this._gl.enableVertexAttribArray(order);\r\n this._vertexAttribArraysEnabled[order] = true;\r\n this._vertexAttribPointer(vertexBuffer, order, vertexDeclaration[index], this._gl.FLOAT, false, vertexStrideSize, offset);\r\n }\r\n offset += vertexDeclaration[index] * 4;\r\n }\r\n }\r\n }\r\n this._bindIndexBufferWithCache(indexBuffer);\r\n };\r\n ThinEngine.prototype._unbindVertexArrayObject = function () {\r\n if (!this._cachedVertexArrayObject) {\r\n return;\r\n }\r\n this._cachedVertexArrayObject = null;\r\n this._gl.bindVertexArray(null);\r\n };\r\n /**\r\n * Bind a list of vertex buffers to the webGL context\r\n * @param vertexBuffers defines the list of vertex buffers to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n * @param effect defines the effect associated with the vertex buffers\r\n */\r\n ThinEngine.prototype.bindBuffers = function (vertexBuffers, indexBuffer, effect) {\r\n if (this._cachedVertexBuffers !== vertexBuffers || this._cachedEffectForVertexBuffers !== effect) {\r\n this._cachedVertexBuffers = vertexBuffers;\r\n this._cachedEffectForVertexBuffers = effect;\r\n this._bindVertexBuffersAttributes(vertexBuffers, effect);\r\n }\r\n this._bindIndexBufferWithCache(indexBuffer);\r\n };\r\n /**\r\n * Unbind all instance attributes\r\n */\r\n ThinEngine.prototype.unbindInstanceAttributes = function () {\r\n var boundBuffer;\r\n for (var i = 0, ul = this._currentInstanceLocations.length; i < ul; i++) {\r\n var instancesBuffer = this._currentInstanceBuffers[i];\r\n if (boundBuffer != instancesBuffer && instancesBuffer.references) {\r\n boundBuffer = instancesBuffer;\r\n this.bindArrayBuffer(instancesBuffer);\r\n }\r\n var offsetLocation = this._currentInstanceLocations[i];\r\n this._gl.vertexAttribDivisor(offsetLocation, 0);\r\n }\r\n this._currentInstanceBuffers.length = 0;\r\n this._currentInstanceLocations.length = 0;\r\n };\r\n /**\r\n * Release and free the memory of a vertex array object\r\n * @param vao defines the vertex array object to delete\r\n */\r\n ThinEngine.prototype.releaseVertexArrayObject = function (vao) {\r\n this._gl.deleteVertexArray(vao);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._releaseBuffer = function (buffer) {\r\n buffer.references--;\r\n if (buffer.references === 0) {\r\n this._deleteBuffer(buffer);\r\n return true;\r\n }\r\n return false;\r\n };\r\n ThinEngine.prototype._deleteBuffer = function (buffer) {\r\n this._gl.deleteBuffer(buffer.underlyingResource);\r\n };\r\n /**\r\n * Update the content of a webGL buffer used with instanciation and bind it to the webGL context\r\n * @param instancesBuffer defines the webGL buffer to update and bind\r\n * @param data defines the data to store in the buffer\r\n * @param offsetLocations defines the offsets or attributes information used to determine where data must be stored in the buffer\r\n */\r\n ThinEngine.prototype.updateAndBindInstancesBuffer = function (instancesBuffer, data, offsetLocations) {\r\n this.bindArrayBuffer(instancesBuffer);\r\n if (data) {\r\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\r\n }\r\n if (offsetLocations[0].index !== undefined) {\r\n var stride = 0;\r\n for (var i = 0; i < offsetLocations.length; i++) {\r\n var ai = offsetLocations[i];\r\n stride += ai.attributeSize * 4;\r\n }\r\n for (var i = 0; i < offsetLocations.length; i++) {\r\n var ai = offsetLocations[i];\r\n if (!this._vertexAttribArraysEnabled[ai.index]) {\r\n this._gl.enableVertexAttribArray(ai.index);\r\n this._vertexAttribArraysEnabled[ai.index] = true;\r\n }\r\n this._vertexAttribPointer(instancesBuffer, ai.index, ai.attributeSize, ai.attributeType || this._gl.FLOAT, ai.normalized || false, stride, ai.offset);\r\n this._gl.vertexAttribDivisor(ai.index, 1);\r\n this._currentInstanceLocations.push(ai.index);\r\n this._currentInstanceBuffers.push(instancesBuffer);\r\n }\r\n }\r\n else {\r\n for (var index = 0; index < 4; index++) {\r\n var offsetLocation = offsetLocations[index];\r\n if (!this._vertexAttribArraysEnabled[offsetLocation]) {\r\n this._gl.enableVertexAttribArray(offsetLocation);\r\n this._vertexAttribArraysEnabled[offsetLocation] = true;\r\n }\r\n this._vertexAttribPointer(instancesBuffer, offsetLocation, 4, this._gl.FLOAT, false, 64, index * 16);\r\n this._gl.vertexAttribDivisor(offsetLocation, 1);\r\n this._currentInstanceLocations.push(offsetLocation);\r\n this._currentInstanceBuffers.push(instancesBuffer);\r\n }\r\n }\r\n };\r\n /**\r\n * Apply all cached states (depth, culling, stencil and alpha)\r\n */\r\n ThinEngine.prototype.applyStates = function () {\r\n this._depthCullingState.apply(this._gl);\r\n this._stencilState.apply(this._gl);\r\n this._alphaState.apply(this._gl);\r\n };\r\n /**\r\n * Send a draw order\r\n * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)\r\n * @param indexStart defines the starting index\r\n * @param indexCount defines the number of index to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.draw = function (useTriangles, indexStart, indexCount, instancesCount) {\r\n this.drawElementsType(useTriangles ? 0 : 1, indexStart, indexCount, instancesCount);\r\n };\r\n /**\r\n * Draw a list of points\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawPointClouds = function (verticesStart, verticesCount, instancesCount) {\r\n this.drawArraysType(2, verticesStart, verticesCount, instancesCount);\r\n };\r\n /**\r\n * Draw a list of unindexed primitives\r\n * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawUnIndexed = function (useTriangles, verticesStart, verticesCount, instancesCount) {\r\n this.drawArraysType(useTriangles ? 0 : 1, verticesStart, verticesCount, instancesCount);\r\n };\r\n /**\r\n * Draw a list of indexed primitives\r\n * @param fillMode defines the primitive to use\r\n * @param indexStart defines the starting index\r\n * @param indexCount defines the number of index to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawElementsType = function (fillMode, indexStart, indexCount, instancesCount) {\r\n // Apply states\r\n this.applyStates();\r\n this._reportDrawCall();\r\n // Render\r\n var drawMode = this._drawMode(fillMode);\r\n var indexFormat = this._uintIndicesCurrentlySet ? this._gl.UNSIGNED_INT : this._gl.UNSIGNED_SHORT;\r\n var mult = this._uintIndicesCurrentlySet ? 4 : 2;\r\n if (instancesCount) {\r\n this._gl.drawElementsInstanced(drawMode, indexCount, indexFormat, indexStart * mult, instancesCount);\r\n }\r\n else {\r\n this._gl.drawElements(drawMode, indexCount, indexFormat, indexStart * mult);\r\n }\r\n };\r\n /**\r\n * Draw a list of unindexed primitives\r\n * @param fillMode defines the primitive to use\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawArraysType = function (fillMode, verticesStart, verticesCount, instancesCount) {\r\n // Apply states\r\n this.applyStates();\r\n this._reportDrawCall();\r\n var drawMode = this._drawMode(fillMode);\r\n if (instancesCount) {\r\n this._gl.drawArraysInstanced(drawMode, verticesStart, verticesCount, instancesCount);\r\n }\r\n else {\r\n this._gl.drawArrays(drawMode, verticesStart, verticesCount);\r\n }\r\n };\r\n ThinEngine.prototype._drawMode = function (fillMode) {\r\n switch (fillMode) {\r\n // Triangle views\r\n case 0:\r\n return this._gl.TRIANGLES;\r\n case 2:\r\n return this._gl.POINTS;\r\n case 1:\r\n return this._gl.LINES;\r\n // Draw modes\r\n case 3:\r\n return this._gl.POINTS;\r\n case 4:\r\n return this._gl.LINES;\r\n case 5:\r\n return this._gl.LINE_LOOP;\r\n case 6:\r\n return this._gl.LINE_STRIP;\r\n case 7:\r\n return this._gl.TRIANGLE_STRIP;\r\n case 8:\r\n return this._gl.TRIANGLE_FAN;\r\n default:\r\n return this._gl.TRIANGLES;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._reportDrawCall = function () {\r\n // Will be implemented by children\r\n };\r\n // Shaders\r\n /** @hidden */\r\n ThinEngine.prototype._releaseEffect = function (effect) {\r\n if (this._compiledEffects[effect._key]) {\r\n delete this._compiledEffects[effect._key];\r\n this._deletePipelineContext(effect.getPipelineContext());\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._deletePipelineContext = function (pipelineContext) {\r\n var webGLPipelineContext = pipelineContext;\r\n if (webGLPipelineContext && webGLPipelineContext.program) {\r\n webGLPipelineContext.program.__SPECTOR_rebuildProgram = null;\r\n this._gl.deleteProgram(webGLPipelineContext.program);\r\n }\r\n };\r\n /**\r\n * Create a new effect (used to store vertex/fragment shaders)\r\n * @param baseName defines the base name of the effect (The name of file without .fragment.fx or .vertex.fx)\r\n * @param attributesNamesOrOptions defines either a list of attribute names or an IEffectCreationOptions object\r\n * @param uniformsNamesOrEngine defines either a list of uniform names or the engine to use\r\n * @param samplers defines an array of string used to represent textures\r\n * @param defines defines the string containing the defines to use to compile the shaders\r\n * @param fallbacks defines the list of potential fallbacks to use if shader conmpilation fails\r\n * @param onCompiled defines a function to call when the effect creation is successful\r\n * @param onError defines a function to call when the effect creation has failed\r\n * @param indexParameters defines an object containing the index values to use to compile shaders (like the maximum number of simultaneous lights)\r\n * @returns the new Effect\r\n */\r\n ThinEngine.prototype.createEffect = function (baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, defines, fallbacks, onCompiled, onError, indexParameters) {\r\n var vertex = baseName.vertexElement || baseName.vertex || baseName;\r\n var fragment = baseName.fragmentElement || baseName.fragment || baseName;\r\n var name = vertex + \"+\" + fragment + \"@\" + (defines ? defines : attributesNamesOrOptions.defines);\r\n if (this._compiledEffects[name]) {\r\n var compiledEffect = this._compiledEffects[name];\r\n if (onCompiled && compiledEffect.isReady()) {\r\n onCompiled(compiledEffect);\r\n }\r\n return compiledEffect;\r\n }\r\n var effect = new Effect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, this, defines, fallbacks, onCompiled, onError, indexParameters);\r\n effect._key = name;\r\n this._compiledEffects[name] = effect;\r\n return effect;\r\n };\r\n ThinEngine._ConcatenateShader = function (source, defines, shaderVersion) {\r\n if (shaderVersion === void 0) { shaderVersion = \"\"; }\r\n return shaderVersion + (defines ? defines + \"\\n\" : \"\") + source;\r\n };\r\n ThinEngine.prototype._compileShader = function (source, type, defines, shaderVersion) {\r\n return this._compileRawShader(ThinEngine._ConcatenateShader(source, defines, shaderVersion), type);\r\n };\r\n ThinEngine.prototype._compileRawShader = function (source, type) {\r\n var gl = this._gl;\r\n var shader = gl.createShader(type === \"vertex\" ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER);\r\n if (!shader) {\r\n throw new Error(\"Something went wrong while compile the shader.\");\r\n }\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n return shader;\r\n };\r\n /**\r\n * Directly creates a webGL program\r\n * @param pipelineContext defines the pipeline context to attach to\r\n * @param vertexCode defines the vertex shader code to use\r\n * @param fragmentCode defines the fragment shader code to use\r\n * @param context defines the webGL context to use (if not set, the current one will be used)\r\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\r\n * @returns the new webGL program\r\n */\r\n ThinEngine.prototype.createRawShaderProgram = function (pipelineContext, vertexCode, fragmentCode, context, transformFeedbackVaryings) {\r\n if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }\r\n context = context || this._gl;\r\n var vertexShader = this._compileRawShader(vertexCode, \"vertex\");\r\n var fragmentShader = this._compileRawShader(fragmentCode, \"fragment\");\r\n return this._createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings);\r\n };\r\n /**\r\n * Creates a webGL program\r\n * @param pipelineContext defines the pipeline context to attach to\r\n * @param vertexCode defines the vertex shader code to use\r\n * @param fragmentCode defines the fragment shader code to use\r\n * @param defines defines the string containing the defines to use to compile the shaders\r\n * @param context defines the webGL context to use (if not set, the current one will be used)\r\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\r\n * @returns the new webGL program\r\n */\r\n ThinEngine.prototype.createShaderProgram = function (pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings) {\r\n if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }\r\n context = context || this._gl;\r\n var shaderVersion = (this._webGLVersion > 1) ? \"#version 300 es\\n#define WEBGL2 \\n\" : \"\";\r\n var vertexShader = this._compileShader(vertexCode, \"vertex\", defines, shaderVersion);\r\n var fragmentShader = this._compileShader(fragmentCode, \"fragment\", defines, shaderVersion);\r\n return this._createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings);\r\n };\r\n /**\r\n * Creates a new pipeline context\r\n * @returns the new pipeline\r\n */\r\n ThinEngine.prototype.createPipelineContext = function () {\r\n var pipelineContext = new WebGLPipelineContext();\r\n pipelineContext.engine = this;\r\n if (this._caps.parallelShaderCompile) {\r\n pipelineContext.isParallelCompiled = true;\r\n }\r\n return pipelineContext;\r\n };\r\n ThinEngine.prototype._createShaderProgram = function (pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings) {\r\n if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }\r\n var shaderProgram = context.createProgram();\r\n pipelineContext.program = shaderProgram;\r\n if (!shaderProgram) {\r\n throw new Error(\"Unable to create program\");\r\n }\r\n context.attachShader(shaderProgram, vertexShader);\r\n context.attachShader(shaderProgram, fragmentShader);\r\n context.linkProgram(shaderProgram);\r\n pipelineContext.context = context;\r\n pipelineContext.vertexShader = vertexShader;\r\n pipelineContext.fragmentShader = fragmentShader;\r\n if (!pipelineContext.isParallelCompiled) {\r\n this._finalizePipelineContext(pipelineContext);\r\n }\r\n return shaderProgram;\r\n };\r\n ThinEngine.prototype._finalizePipelineContext = function (pipelineContext) {\r\n var context = pipelineContext.context;\r\n var vertexShader = pipelineContext.vertexShader;\r\n var fragmentShader = pipelineContext.fragmentShader;\r\n var program = pipelineContext.program;\r\n var linked = context.getProgramParameter(program, context.LINK_STATUS);\r\n if (!linked) { // Get more info\r\n // Vertex\r\n if (!this._gl.getShaderParameter(vertexShader, this._gl.COMPILE_STATUS)) {\r\n var log = this._gl.getShaderInfoLog(vertexShader);\r\n if (log) {\r\n throw new Error(\"VERTEX SHADER \" + log);\r\n }\r\n }\r\n // Fragment\r\n if (!this._gl.getShaderParameter(fragmentShader, this._gl.COMPILE_STATUS)) {\r\n var log = this._gl.getShaderInfoLog(fragmentShader);\r\n if (log) {\r\n throw new Error(\"FRAGMENT SHADER \" + log);\r\n }\r\n }\r\n var error = context.getProgramInfoLog(program);\r\n if (error) {\r\n throw new Error(error);\r\n }\r\n }\r\n if (this.validateShaderPrograms) {\r\n context.validateProgram(program);\r\n var validated = context.getProgramParameter(program, context.VALIDATE_STATUS);\r\n if (!validated) {\r\n var error = context.getProgramInfoLog(program);\r\n if (error) {\r\n throw new Error(error);\r\n }\r\n }\r\n }\r\n context.deleteShader(vertexShader);\r\n context.deleteShader(fragmentShader);\r\n pipelineContext.vertexShader = undefined;\r\n pipelineContext.fragmentShader = undefined;\r\n if (pipelineContext.onCompiled) {\r\n pipelineContext.onCompiled();\r\n pipelineContext.onCompiled = undefined;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._preparePipelineContext = function (pipelineContext, vertexSourceCode, fragmentSourceCode, createAsRaw, rebuildRebind, defines, transformFeedbackVaryings) {\r\n var webGLRenderingState = pipelineContext;\r\n if (createAsRaw) {\r\n webGLRenderingState.program = this.createRawShaderProgram(webGLRenderingState, vertexSourceCode, fragmentSourceCode, undefined, transformFeedbackVaryings);\r\n }\r\n else {\r\n webGLRenderingState.program = this.createShaderProgram(webGLRenderingState, vertexSourceCode, fragmentSourceCode, defines, undefined, transformFeedbackVaryings);\r\n }\r\n webGLRenderingState.program.__SPECTOR_rebuildProgram = rebuildRebind;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._isRenderingStateCompiled = function (pipelineContext) {\r\n var webGLPipelineContext = pipelineContext;\r\n if (this._gl.getProgramParameter(webGLPipelineContext.program, this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)) {\r\n this._finalizePipelineContext(webGLPipelineContext);\r\n return true;\r\n }\r\n return false;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._executeWhenRenderingStateIsCompiled = function (pipelineContext, action) {\r\n var webGLPipelineContext = pipelineContext;\r\n if (!webGLPipelineContext.isParallelCompiled) {\r\n action();\r\n return;\r\n }\r\n webGLPipelineContext.onCompiled = action;\r\n };\r\n /**\r\n * Gets the list of webGL uniform locations associated with a specific program based on a list of uniform names\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param uniformsNames defines the list of uniform names\r\n * @returns an array of webGL uniform locations\r\n */\r\n ThinEngine.prototype.getUniforms = function (pipelineContext, uniformsNames) {\r\n var results = new Array();\r\n var webGLPipelineContext = pipelineContext;\r\n for (var index = 0; index < uniformsNames.length; index++) {\r\n results.push(this._gl.getUniformLocation(webGLPipelineContext.program, uniformsNames[index]));\r\n }\r\n return results;\r\n };\r\n /**\r\n * Gets the lsit of active attributes for a given webGL program\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param attributesNames defines the list of attribute names to get\r\n * @returns an array of indices indicating the offset of each attribute\r\n */\r\n ThinEngine.prototype.getAttributes = function (pipelineContext, attributesNames) {\r\n var results = [];\r\n var webGLPipelineContext = pipelineContext;\r\n for (var index = 0; index < attributesNames.length; index++) {\r\n try {\r\n results.push(this._gl.getAttribLocation(webGLPipelineContext.program, attributesNames[index]));\r\n }\r\n catch (e) {\r\n results.push(-1);\r\n }\r\n }\r\n return results;\r\n };\r\n /**\r\n * Activates an effect, mkaing it the current one (ie. the one used for rendering)\r\n * @param effect defines the effect to activate\r\n */\r\n ThinEngine.prototype.enableEffect = function (effect) {\r\n if (!effect || effect === this._currentEffect) {\r\n return;\r\n }\r\n // Use program\r\n this.bindSamplers(effect);\r\n this._currentEffect = effect;\r\n if (effect.onBind) {\r\n effect.onBind(effect);\r\n }\r\n if (effect._onBindObservable) {\r\n effect._onBindObservable.notifyObservers(effect);\r\n }\r\n };\r\n /**\r\n * Set the value of an uniform to a number (int)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param value defines the int number to store\r\n */\r\n ThinEngine.prototype.setInt = function (uniform, value) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1i(uniform, value);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray = function (uniform, array) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray2 = function (uniform, array) {\r\n if (!uniform || array.length % 2 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform2iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray3 = function (uniform, array) {\r\n if (!uniform || array.length % 3 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform3iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray4 = function (uniform, array) {\r\n if (!uniform || array.length % 4 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform4iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray = function (uniform, array) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray2 = function (uniform, array) {\r\n if (!uniform || array.length % 2 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform2fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray3 = function (uniform, array) {\r\n if (!uniform || array.length % 3 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform3fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray4 = function (uniform, array) {\r\n if (!uniform || array.length % 4 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform4fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as matrices)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrices defines the array of float32 to store\r\n */\r\n ThinEngine.prototype.setMatrices = function (uniform, matrices) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniformMatrix4fv(uniform, false, matrices);\r\n };\r\n /**\r\n * Set the value of an uniform to a matrix (3x3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrix defines the Float32Array representing the 3x3 matrix to store\r\n */\r\n ThinEngine.prototype.setMatrix3x3 = function (uniform, matrix) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniformMatrix3fv(uniform, false, matrix);\r\n };\r\n /**\r\n * Set the value of an uniform to a matrix (2x2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrix defines the Float32Array representing the 2x2 matrix to store\r\n */\r\n ThinEngine.prototype.setMatrix2x2 = function (uniform, matrix) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniformMatrix2fv(uniform, false, matrix);\r\n };\r\n /**\r\n * Set the value of an uniform to a number (float)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param value defines the float number to store\r\n */\r\n ThinEngine.prototype.setFloat = function (uniform, value) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1f(uniform, value);\r\n };\r\n /**\r\n * Set the value of an uniform to a vec2\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n */\r\n ThinEngine.prototype.setFloat2 = function (uniform, x, y) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform2f(uniform, x, y);\r\n };\r\n /**\r\n * Set the value of an uniform to a vec3\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @param z defines the 3rd component of the value\r\n */\r\n ThinEngine.prototype.setFloat3 = function (uniform, x, y, z) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform3f(uniform, x, y, z);\r\n };\r\n /**\r\n * Set the value of an uniform to a vec4\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @param z defines the 3rd component of the value\r\n * @param w defines the 4th component of the value\r\n */\r\n ThinEngine.prototype.setFloat4 = function (uniform, x, y, z, w) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform4f(uniform, x, y, z, w);\r\n };\r\n Object.defineProperty(ThinEngine.prototype, \"depthCullingState\", {\r\n // States\r\n /**\r\n * Gets the depth culling state manager\r\n */\r\n get: function () {\r\n return this._depthCullingState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"alphaState\", {\r\n /**\r\n * Gets the alpha state manager\r\n */\r\n get: function () {\r\n return this._alphaState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"stencilState\", {\r\n /**\r\n * Gets the stencil state manager\r\n */\r\n get: function () {\r\n return this._stencilState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Textures\r\n /**\r\n * Clears the list of texture accessible through engine.\r\n * This can help preventing texture load conflict due to name collision.\r\n */\r\n ThinEngine.prototype.clearInternalTexturesCache = function () {\r\n this._internalTexturesCache = [];\r\n };\r\n /**\r\n * Force the entire cache to be cleared\r\n * You should not have to use this function unless your engine needs to share the webGL context with another engine\r\n * @param bruteForce defines a boolean to force clearing ALL caches (including stencil, detoh and alpha states)\r\n */\r\n ThinEngine.prototype.wipeCaches = function (bruteForce) {\r\n if (this.preventCacheWipeBetweenFrames && !bruteForce) {\r\n return;\r\n }\r\n this._currentEffect = null;\r\n this._viewportCached.x = 0;\r\n this._viewportCached.y = 0;\r\n this._viewportCached.z = 0;\r\n this._viewportCached.w = 0;\r\n if (bruteForce) {\r\n this.resetTextureCache();\r\n this._currentProgram = null;\r\n this._stencilState.reset();\r\n this._depthCullingState.reset();\r\n this._depthCullingState.depthFunc = this._gl.LEQUAL;\r\n this._alphaState.reset();\r\n this._unpackFlipYCached = null;\r\n this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this._gl.NONE);\r\n this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);\r\n }\r\n this._resetVertexBufferBinding();\r\n this._cachedIndexBuffer = null;\r\n this._cachedEffectForVertexBuffers = null;\r\n this._unbindVertexArrayObject();\r\n this.bindIndexBuffer(null);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getSamplingParameters = function (samplingMode, generateMipMaps) {\r\n var gl = this._gl;\r\n var magFilter = gl.NEAREST;\r\n var minFilter = gl.NEAREST;\r\n switch (samplingMode) {\r\n case 2:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case 3:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case 1:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case 4:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case 5:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case 6:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case 7:\r\n magFilter = gl.NEAREST;\r\n minFilter = gl.LINEAR;\r\n break;\r\n case 8:\r\n magFilter = gl.NEAREST;\r\n minFilter = gl.NEAREST;\r\n break;\r\n case 9:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case 10:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case 11:\r\n magFilter = gl.LINEAR;\r\n minFilter = gl.LINEAR;\r\n break;\r\n case 12:\r\n magFilter = gl.LINEAR;\r\n minFilter = gl.NEAREST;\r\n break;\r\n }\r\n return {\r\n min: minFilter,\r\n mag: magFilter\r\n };\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._createTexture = function () {\r\n var texture = this._gl.createTexture();\r\n if (!texture) {\r\n throw new Error(\"Unable to create texture\");\r\n }\r\n return texture;\r\n };\r\n /**\r\n * Usually called from Texture.ts.\r\n * Passed information to create a WebGLTexture\r\n * @param urlArg defines a value which contains one of the following:\r\n * * A conventional http URL, e.g. 'http://...' or 'file://...'\r\n * * A base64 string of in-line texture data, e.g. 'data:image/jpg;base64,/...'\r\n * * An indicator that data being passed using the buffer parameter, e.g. 'data:mytexture.jpg'\r\n * @param noMipmap defines a boolean indicating that no mipmaps shall be generated. Ignored for compressed textures. They must be in the file\r\n * @param invertY when true, image is flipped when loaded. You probably want true. Certain compressed textures may invert this if their default is inverted (eg. ktx)\r\n * @param scene needed for loading to the correct scene\r\n * @param samplingMode mode with should be used sample / access the texture (Default: Texture.TRILINEAR_SAMPLINGMODE)\r\n * @param onLoad optional callback to be called upon successful completion\r\n * @param onError optional callback to be called upon failure\r\n * @param buffer a source of a file previously fetched as either a base64 string, an ArrayBuffer (compressed or image format), HTMLImageElement (image format), or a Blob\r\n * @param fallback an internal argument in case the function must be called again, due to etc1 not having alpha capabilities\r\n * @param format internal format. Default: RGB when extension is '.jpg' else RGBA. Ignored for compressed textures\r\n * @param forcedExtension defines the extension to use to pick the right loader\r\n * @param excludeLoaders array of texture loaders that should be excluded when picking a loader for the texture (default: empty array)\r\n * @param mimeType defines an optional mime type\r\n * @returns a InternalTexture for assignment back into BABYLON.Texture\r\n */\r\n ThinEngine.prototype.createTexture = function (urlArg, noMipmap, invertY, scene, samplingMode, onLoad, onError, buffer, fallback, format, forcedExtension, excludeLoaders, mimeType) {\r\n var _this = this;\r\n if (samplingMode === void 0) { samplingMode = 3; }\r\n if (onLoad === void 0) { onLoad = null; }\r\n if (onError === void 0) { onError = null; }\r\n if (buffer === void 0) { buffer = null; }\r\n if (fallback === void 0) { fallback = null; }\r\n if (format === void 0) { format = null; }\r\n if (forcedExtension === void 0) { forcedExtension = null; }\r\n if (excludeLoaders === void 0) { excludeLoaders = []; }\r\n var url = String(urlArg); // assign a new string, so that the original is still available in case of fallback\r\n var fromData = url.substr(0, 5) === \"data:\";\r\n var fromBlob = url.substr(0, 5) === \"blob:\";\r\n var isBase64 = fromData && url.indexOf(\";base64,\") !== -1;\r\n var texture = fallback ? fallback : new InternalTexture(this, InternalTextureSource.Url);\r\n // establish the file extension, if possible\r\n var lastDot = url.lastIndexOf('.');\r\n var extension = forcedExtension ? forcedExtension : (lastDot > -1 ? url.substring(lastDot).toLowerCase() : \"\");\r\n var loader = null;\r\n for (var _i = 0, _a = ThinEngine._TextureLoaders; _i < _a.length; _i++) {\r\n var availableLoader = _a[_i];\r\n if (excludeLoaders.indexOf(availableLoader) === -1 && availableLoader.canLoad(extension, this._textureFormatInUse, fallback, isBase64, buffer ? true : false)) {\r\n loader = availableLoader;\r\n break;\r\n }\r\n }\r\n if (loader) {\r\n url = loader.transformUrl(url, this._textureFormatInUse);\r\n }\r\n if (scene) {\r\n scene._addPendingData(texture);\r\n }\r\n texture.url = url;\r\n texture.generateMipMaps = !noMipmap;\r\n texture.samplingMode = samplingMode;\r\n texture.invertY = invertY;\r\n if (!this._doNotHandleContextLost) {\r\n // Keep a link to the buffer only if we plan to handle context lost\r\n texture._buffer = buffer;\r\n }\r\n var onLoadObserver = null;\r\n if (onLoad && !fallback) {\r\n onLoadObserver = texture.onLoadedObservable.add(onLoad);\r\n }\r\n if (!fallback) {\r\n this._internalTexturesCache.push(texture);\r\n }\r\n var onInternalError = function (message, exception) {\r\n if (scene) {\r\n scene._removePendingData(texture);\r\n }\r\n var customFallback = false;\r\n if (loader) {\r\n var fallbackUrl = loader.getFallbackTextureUrl(url, _this._textureFormatInUse);\r\n if (fallbackUrl) {\r\n // Add Back\r\n customFallback = true;\r\n excludeLoaders.push(loader);\r\n _this.createTexture(urlArg, noMipmap, texture.invertY, scene, samplingMode, null, onError, buffer, texture, undefined, undefined, excludeLoaders);\r\n return;\r\n }\r\n }\r\n if (!customFallback) {\r\n if (onLoadObserver) {\r\n texture.onLoadedObservable.remove(onLoadObserver);\r\n }\r\n if (EngineStore.UseFallbackTexture) {\r\n _this.createTexture(EngineStore.FallbackTexture, noMipmap, texture.invertY, scene, samplingMode, null, onError, buffer, texture);\r\n return;\r\n }\r\n }\r\n if (onError) {\r\n onError(message || \"Unknown error\", exception);\r\n }\r\n };\r\n // processing for non-image formats\r\n if (loader) {\r\n var callback = function (data) {\r\n loader.loadData(data, texture, function (width, height, loadMipmap, isCompressed, done, loadFailed) {\r\n if (loadFailed) {\r\n onInternalError(\"TextureLoader failed to load data\");\r\n }\r\n else {\r\n _this._prepareWebGLTexture(texture, scene, width, height, texture.invertY, !loadMipmap, isCompressed, function () {\r\n done();\r\n return false;\r\n }, samplingMode);\r\n }\r\n });\r\n };\r\n if (!buffer) {\r\n this._loadFile(url, callback, undefined, scene ? scene.offlineProvider : undefined, true, function (request, exception) {\r\n onInternalError(\"Unable to load \" + (request ? request.responseURL : url, exception));\r\n });\r\n }\r\n else {\r\n //callback(buffer as ArrayBuffer);\r\n if (buffer instanceof ArrayBuffer) {\r\n callback(buffer);\r\n }\r\n else {\r\n if (onError) {\r\n onError(\"Unable to load: only ArrayBuffer supported here\", null);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n var onload = function (img) {\r\n if (fromBlob && !_this._doNotHandleContextLost) {\r\n // We need to store the image if we need to rebuild the texture\r\n // in case of a webgl context lost\r\n texture._buffer = img;\r\n }\r\n _this._prepareWebGLTexture(texture, scene, img.width, img.height, texture.invertY, noMipmap, false, function (potWidth, potHeight, continuationCallback) {\r\n var gl = _this._gl;\r\n var isPot = (img.width === potWidth && img.height === potHeight);\r\n var internalFormat = format ? _this._getInternalFormat(format) : ((extension === \".jpg\") ? gl.RGB : gl.RGBA);\r\n if (isPot) {\r\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, img);\r\n return false;\r\n }\r\n var maxTextureSize = _this._caps.maxTextureSize;\r\n if (img.width > maxTextureSize || img.height > maxTextureSize || !_this._supportsHardwareTextureRescaling) {\r\n _this._prepareWorkingCanvas();\r\n if (!_this._workingCanvas || !_this._workingContext) {\r\n return false;\r\n }\r\n _this._workingCanvas.width = potWidth;\r\n _this._workingCanvas.height = potHeight;\r\n _this._workingContext.drawImage(img, 0, 0, img.width, img.height, 0, 0, potWidth, potHeight);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, _this._workingCanvas);\r\n texture.width = potWidth;\r\n texture.height = potHeight;\r\n return false;\r\n }\r\n else {\r\n // Using shaders when possible to rescale because canvas.drawImage is lossy\r\n var source_1 = new InternalTexture(_this, InternalTextureSource.Temp);\r\n _this._bindTextureDirectly(gl.TEXTURE_2D, source_1, true);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, img);\r\n _this._rescaleTexture(source_1, texture, scene, internalFormat, function () {\r\n _this._releaseTexture(source_1);\r\n _this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\r\n continuationCallback();\r\n });\r\n }\r\n return true;\r\n }, samplingMode);\r\n };\r\n if (!fromData || isBase64) {\r\n if (buffer && (buffer.decoding || buffer.close)) {\r\n onload(buffer);\r\n }\r\n else {\r\n FileTools.LoadImage(url, onload, onInternalError, scene ? scene.offlineProvider : null, mimeType);\r\n }\r\n }\r\n else if (typeof buffer === \"string\" || buffer instanceof ArrayBuffer || ArrayBuffer.isView(buffer) || buffer instanceof Blob) {\r\n FileTools.LoadImage(buffer, onload, onInternalError, scene ? scene.offlineProvider : null, mimeType);\r\n }\r\n else if (buffer) {\r\n onload(buffer);\r\n }\r\n }\r\n return texture;\r\n };\r\n /**\r\n * @hidden\r\n */\r\n ThinEngine.prototype._rescaleTexture = function (source, destination, scene, internalFormat, onComplete) {\r\n };\r\n /**\r\n * Creates a raw texture\r\n * @param data defines the data to store in the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param format defines the format of the data\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @returns the raw texture inside an InternalTexture\r\n */\r\n ThinEngine.prototype.createRawTexture = function (data, width, height, format, generateMipMaps, invertY, samplingMode, compression, type) {\r\n if (compression === void 0) { compression = null; }\r\n if (type === void 0) { type = 0; }\r\n throw _DevTools.WarnImport(\"Engine.RawTexture\");\r\n };\r\n /**\r\n * Creates a new raw cube texture\r\n * @param data defines the array of data to use to create each face\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compression used (null by default)\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n ThinEngine.prototype.createRawCubeTexture = function (data, size, format, type, generateMipMaps, invertY, samplingMode, compression) {\r\n if (compression === void 0) { compression = null; }\r\n throw _DevTools.WarnImport(\"Engine.RawTexture\");\r\n };\r\n /**\r\n * Creates a new raw 3D texture\r\n * @param data defines the data used to create the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param depth defines the depth of the texture\r\n * @param format defines the format of the texture\r\n * @param generateMipMaps defines if the engine must generate mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compressed used (can be null)\r\n * @param textureType defines the compressed used (can be null)\r\n * @returns a new raw 3D texture (stored in an InternalTexture)\r\n */\r\n ThinEngine.prototype.createRawTexture3D = function (data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression, textureType) {\r\n if (compression === void 0) { compression = null; }\r\n if (textureType === void 0) { textureType = 0; }\r\n throw _DevTools.WarnImport(\"Engine.RawTexture\");\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._unpackFlipY = function (value) {\r\n if (this._unpackFlipYCached !== value) {\r\n this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL, value ? 1 : 0);\r\n if (this.enableUnpackFlipYCached) {\r\n this._unpackFlipYCached = value;\r\n }\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getUnpackAlignement = function () {\r\n return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT);\r\n };\r\n /**\r\n * Update the sampling mode of a given texture\r\n * @param samplingMode defines the required sampling mode\r\n * @param texture defines the texture to update\r\n */\r\n ThinEngine.prototype.updateTextureSamplingMode = function (samplingMode, texture) {\r\n var filters = this._getSamplingParameters(samplingMode, texture.generateMipMaps);\r\n if (texture.isCube) {\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_MIN_FILTER, filters.min);\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\r\n }\r\n else if (texture.is3D) {\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_MIN_FILTER, filters.min);\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\r\n }\r\n else {\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, filters.min);\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\r\n }\r\n texture.samplingMode = samplingMode;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._setupDepthStencilTexture = function (internalTexture, size, generateStencil, bilinearFiltering, comparisonFunction) {\r\n var width = size.width || size;\r\n var height = size.height || size;\r\n internalTexture.baseWidth = width;\r\n internalTexture.baseHeight = height;\r\n internalTexture.width = width;\r\n internalTexture.height = height;\r\n internalTexture.isReady = true;\r\n internalTexture.samples = 1;\r\n internalTexture.generateMipMaps = false;\r\n internalTexture._generateDepthBuffer = true;\r\n internalTexture._generateStencilBuffer = generateStencil;\r\n internalTexture.samplingMode = bilinearFiltering ? 2 : 1;\r\n internalTexture.type = 0;\r\n internalTexture._comparisonFunction = comparisonFunction;\r\n var gl = this._gl;\r\n var target = internalTexture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\r\n var samplingParameters = this._getSamplingParameters(internalTexture.samplingMode, false);\r\n gl.texParameteri(target, gl.TEXTURE_MAG_FILTER, samplingParameters.mag);\r\n gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, samplingParameters.min);\r\n gl.texParameteri(target, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(target, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (comparisonFunction === 0) {\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_FUNC, 515);\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_MODE, gl.NONE);\r\n }\r\n else {\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_FUNC, comparisonFunction);\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._uploadCompressedDataToTextureDirectly = function (texture, internalFormat, width, height, data, faceIndex, lod) {\r\n if (faceIndex === void 0) { faceIndex = 0; }\r\n if (lod === void 0) { lod = 0; }\r\n var gl = this._gl;\r\n var target = gl.TEXTURE_2D;\r\n if (texture.isCube) {\r\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\r\n }\r\n this._gl.compressedTexImage2D(target, lod, internalFormat, width, height, 0, data);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._uploadDataToTextureDirectly = function (texture, imageData, faceIndex, lod, babylonInternalFormat, useTextureWidthAndHeight) {\r\n if (faceIndex === void 0) { faceIndex = 0; }\r\n if (lod === void 0) { lod = 0; }\r\n if (useTextureWidthAndHeight === void 0) { useTextureWidthAndHeight = false; }\r\n var gl = this._gl;\r\n var textureType = this._getWebGLTextureType(texture.type);\r\n var format = this._getInternalFormat(texture.format);\r\n var internalFormat = babylonInternalFormat === undefined ? this._getRGBABufferInternalSizedFormat(texture.type, format) : this._getInternalFormat(babylonInternalFormat);\r\n this._unpackFlipY(texture.invertY);\r\n var target = gl.TEXTURE_2D;\r\n if (texture.isCube) {\r\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\r\n }\r\n var lodMaxWidth = Math.round(Math.log(texture.width) * Math.LOG2E);\r\n var lodMaxHeight = Math.round(Math.log(texture.height) * Math.LOG2E);\r\n var width = useTextureWidthAndHeight ? texture.width : Math.pow(2, Math.max(lodMaxWidth - lod, 0));\r\n var height = useTextureWidthAndHeight ? texture.height : Math.pow(2, Math.max(lodMaxHeight - lod, 0));\r\n gl.texImage2D(target, lod, internalFormat, width, height, 0, format, textureType, imageData);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._uploadArrayBufferViewToTexture = function (texture, imageData, faceIndex, lod) {\r\n if (faceIndex === void 0) { faceIndex = 0; }\r\n if (lod === void 0) { lod = 0; }\r\n var gl = this._gl;\r\n var bindTarget = texture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\r\n this._bindTextureDirectly(bindTarget, texture, true);\r\n this._uploadDataToTextureDirectly(texture, imageData, faceIndex, lod);\r\n this._bindTextureDirectly(bindTarget, null, true);\r\n };\r\n ThinEngine.prototype._prepareWebGLTextureContinuation = function (texture, scene, noMipmap, isCompressed, samplingMode) {\r\n var gl = this._gl;\r\n if (!gl) {\r\n return;\r\n }\r\n var filters = this._getSamplingParameters(samplingMode, !noMipmap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filters.mag);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filters.min);\r\n if (!noMipmap && !isCompressed) {\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n }\r\n this._bindTextureDirectly(gl.TEXTURE_2D, null);\r\n // this.resetTextureCache();\r\n if (scene) {\r\n scene._removePendingData(texture);\r\n }\r\n texture.onLoadedObservable.notifyObservers(texture);\r\n texture.onLoadedObservable.clear();\r\n };\r\n ThinEngine.prototype._prepareWebGLTexture = function (texture, scene, width, height, invertY, noMipmap, isCompressed, processFunction, samplingMode) {\r\n var _this = this;\r\n if (samplingMode === void 0) { samplingMode = 3; }\r\n var maxTextureSize = this.getCaps().maxTextureSize;\r\n var potWidth = Math.min(maxTextureSize, this.needPOTTextures ? ThinEngine.GetExponentOfTwo(width, maxTextureSize) : width);\r\n var potHeight = Math.min(maxTextureSize, this.needPOTTextures ? ThinEngine.GetExponentOfTwo(height, maxTextureSize) : height);\r\n var gl = this._gl;\r\n if (!gl) {\r\n return;\r\n }\r\n if (!texture._webGLTexture) {\r\n // this.resetTextureCache();\r\n if (scene) {\r\n scene._removePendingData(texture);\r\n }\r\n return;\r\n }\r\n this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\r\n this._unpackFlipY(invertY === undefined ? true : (invertY ? true : false));\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.width = potWidth;\r\n texture.height = potHeight;\r\n texture.isReady = true;\r\n if (processFunction(potWidth, potHeight, function () {\r\n _this._prepareWebGLTextureContinuation(texture, scene, noMipmap, isCompressed, samplingMode);\r\n })) {\r\n // Returning as texture needs extra async steps\r\n return;\r\n }\r\n this._prepareWebGLTextureContinuation(texture, scene, noMipmap, isCompressed, samplingMode);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._setupFramebufferDepthAttachments = function (generateStencilBuffer, generateDepthBuffer, width, height, samples) {\r\n if (samples === void 0) { samples = 1; }\r\n var depthStencilBuffer = null;\r\n var gl = this._gl;\r\n // Create the depth/stencil buffer\r\n if (generateStencilBuffer) {\r\n depthStencilBuffer = gl.createRenderbuffer();\r\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);\r\n if (samples > 1) {\r\n gl.renderbufferStorageMultisample(gl.RENDERBUFFER, samples, gl.DEPTH24_STENCIL8, width, height);\r\n }\r\n else {\r\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height);\r\n }\r\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, depthStencilBuffer);\r\n }\r\n else if (generateDepthBuffer) {\r\n depthStencilBuffer = gl.createRenderbuffer();\r\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);\r\n if (samples > 1) {\r\n gl.renderbufferStorageMultisample(gl.RENDERBUFFER, samples, gl.DEPTH_COMPONENT16, width, height);\r\n }\r\n else {\r\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, width, height);\r\n }\r\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthStencilBuffer);\r\n }\r\n return depthStencilBuffer;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._releaseFramebufferObjects = function (texture) {\r\n var gl = this._gl;\r\n if (texture._framebuffer) {\r\n gl.deleteFramebuffer(texture._framebuffer);\r\n texture._framebuffer = null;\r\n }\r\n if (texture._depthStencilBuffer) {\r\n gl.deleteRenderbuffer(texture._depthStencilBuffer);\r\n texture._depthStencilBuffer = null;\r\n }\r\n if (texture._MSAAFramebuffer) {\r\n gl.deleteFramebuffer(texture._MSAAFramebuffer);\r\n texture._MSAAFramebuffer = null;\r\n }\r\n if (texture._MSAARenderBuffer) {\r\n gl.deleteRenderbuffer(texture._MSAARenderBuffer);\r\n texture._MSAARenderBuffer = null;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._releaseTexture = function (texture) {\r\n this._releaseFramebufferObjects(texture);\r\n this._deleteTexture(texture._webGLTexture);\r\n // Unbind channels\r\n this.unbindAllTextures();\r\n var index = this._internalTexturesCache.indexOf(texture);\r\n if (index !== -1) {\r\n this._internalTexturesCache.splice(index, 1);\r\n }\r\n // Integrated fixed lod samplers.\r\n if (texture._lodTextureHigh) {\r\n texture._lodTextureHigh.dispose();\r\n }\r\n if (texture._lodTextureMid) {\r\n texture._lodTextureMid.dispose();\r\n }\r\n if (texture._lodTextureLow) {\r\n texture._lodTextureLow.dispose();\r\n }\r\n // Integrated irradiance map.\r\n if (texture._irradianceTexture) {\r\n texture._irradianceTexture.dispose();\r\n }\r\n };\r\n ThinEngine.prototype._deleteTexture = function (texture) {\r\n this._gl.deleteTexture(texture);\r\n };\r\n ThinEngine.prototype._setProgram = function (program) {\r\n if (this._currentProgram !== program) {\r\n this._gl.useProgram(program);\r\n this._currentProgram = program;\r\n }\r\n };\r\n /**\r\n * Binds an effect to the webGL context\r\n * @param effect defines the effect to bind\r\n */\r\n ThinEngine.prototype.bindSamplers = function (effect) {\r\n var webGLPipelineContext = effect.getPipelineContext();\r\n this._setProgram(webGLPipelineContext.program);\r\n var samplers = effect.getSamplers();\r\n for (var index = 0; index < samplers.length; index++) {\r\n var uniform = effect.getUniform(samplers[index]);\r\n if (uniform) {\r\n this._boundUniforms[index] = uniform;\r\n }\r\n }\r\n this._currentEffect = null;\r\n };\r\n ThinEngine.prototype._activateCurrentTexture = function () {\r\n if (this._currentTextureChannel !== this._activeChannel) {\r\n this._gl.activeTexture(this._gl.TEXTURE0 + this._activeChannel);\r\n this._currentTextureChannel = this._activeChannel;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._bindTextureDirectly = function (target, texture, forTextureDataUpdate, force) {\r\n if (forTextureDataUpdate === void 0) { forTextureDataUpdate = false; }\r\n if (force === void 0) { force = false; }\r\n var wasPreviouslyBound = false;\r\n var isTextureForRendering = texture && texture._associatedChannel > -1;\r\n if (forTextureDataUpdate && isTextureForRendering) {\r\n this._activeChannel = texture._associatedChannel;\r\n }\r\n var currentTextureBound = this._boundTexturesCache[this._activeChannel];\r\n if (currentTextureBound !== texture || force) {\r\n this._activateCurrentTexture();\r\n if (texture && texture.isMultiview) {\r\n this._gl.bindTexture(target, texture ? texture._colorTextureArray : null);\r\n }\r\n else {\r\n this._gl.bindTexture(target, texture ? texture._webGLTexture : null);\r\n }\r\n this._boundTexturesCache[this._activeChannel] = texture;\r\n if (texture) {\r\n texture._associatedChannel = this._activeChannel;\r\n }\r\n }\r\n else if (forTextureDataUpdate) {\r\n wasPreviouslyBound = true;\r\n this._activateCurrentTexture();\r\n }\r\n if (isTextureForRendering && !forTextureDataUpdate) {\r\n this._bindSamplerUniformToChannel(texture._associatedChannel, this._activeChannel);\r\n }\r\n return wasPreviouslyBound;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._bindTexture = function (channel, texture) {\r\n if (channel === undefined) {\r\n return;\r\n }\r\n if (texture) {\r\n texture._associatedChannel = channel;\r\n }\r\n this._activeChannel = channel;\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture);\r\n };\r\n /**\r\n * Unbind all textures from the webGL context\r\n */\r\n ThinEngine.prototype.unbindAllTextures = function () {\r\n for (var channel = 0; channel < this._maxSimultaneousTextures; channel++) {\r\n this._activeChannel = channel;\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\r\n if (this.webGLVersion > 1) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets a texture to the according uniform.\r\n * @param channel The texture channel\r\n * @param uniform The uniform to set\r\n * @param texture The texture to apply\r\n */\r\n ThinEngine.prototype.setTexture = function (channel, uniform, texture) {\r\n if (channel === undefined) {\r\n return;\r\n }\r\n if (uniform) {\r\n this._boundUniforms[channel] = uniform;\r\n }\r\n this._setTexture(channel, texture);\r\n };\r\n ThinEngine.prototype._bindSamplerUniformToChannel = function (sourceSlot, destination) {\r\n var uniform = this._boundUniforms[sourceSlot];\r\n if (!uniform || uniform._currentState === destination) {\r\n return;\r\n }\r\n this._gl.uniform1i(uniform, destination);\r\n uniform._currentState = destination;\r\n };\r\n ThinEngine.prototype._getTextureWrapMode = function (mode) {\r\n switch (mode) {\r\n case 1:\r\n return this._gl.REPEAT;\r\n case 0:\r\n return this._gl.CLAMP_TO_EDGE;\r\n case 2:\r\n return this._gl.MIRRORED_REPEAT;\r\n }\r\n return this._gl.REPEAT;\r\n };\r\n ThinEngine.prototype._setTexture = function (channel, texture, isPartOfTextureArray, depthStencilTexture) {\r\n if (isPartOfTextureArray === void 0) { isPartOfTextureArray = false; }\r\n if (depthStencilTexture === void 0) { depthStencilTexture = false; }\r\n // Not ready?\r\n if (!texture) {\r\n if (this._boundTexturesCache[channel] != null) {\r\n this._activeChannel = channel;\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\r\n if (this.webGLVersion > 1) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\r\n }\r\n }\r\n return false;\r\n }\r\n // Video\r\n if (texture.video) {\r\n this._activeChannel = channel;\r\n texture.update();\r\n }\r\n else if (texture.delayLoadState === 4) { // Delay loading\r\n texture.delayLoad();\r\n return false;\r\n }\r\n var internalTexture;\r\n if (depthStencilTexture) {\r\n internalTexture = texture.depthStencilTexture;\r\n }\r\n else if (texture.isReady()) {\r\n internalTexture = texture.getInternalTexture();\r\n }\r\n else if (texture.isCube) {\r\n internalTexture = this.emptyCubeTexture;\r\n }\r\n else if (texture.is3D) {\r\n internalTexture = this.emptyTexture3D;\r\n }\r\n else {\r\n internalTexture = this.emptyTexture;\r\n }\r\n if (!isPartOfTextureArray && internalTexture) {\r\n internalTexture._associatedChannel = channel;\r\n }\r\n var needToBind = true;\r\n if (this._boundTexturesCache[channel] === internalTexture) {\r\n if (!isPartOfTextureArray) {\r\n this._bindSamplerUniformToChannel(internalTexture._associatedChannel, channel);\r\n }\r\n needToBind = false;\r\n }\r\n this._activeChannel = channel;\r\n if (internalTexture && internalTexture.isMultiview) {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY, internalTexture, isPartOfTextureArray);\r\n }\r\n }\r\n else if (internalTexture && internalTexture.is3D) {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, internalTexture, isPartOfTextureArray);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapU !== texture.wrapU) {\r\n internalTexture._cachedWrapU = texture.wrapU;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_WRAP_S, this._getTextureWrapMode(texture.wrapU), internalTexture);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapV !== texture.wrapV) {\r\n internalTexture._cachedWrapV = texture.wrapV;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_WRAP_T, this._getTextureWrapMode(texture.wrapV), internalTexture);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapR !== texture.wrapR) {\r\n internalTexture._cachedWrapR = texture.wrapR;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_WRAP_R, this._getTextureWrapMode(texture.wrapR), internalTexture);\r\n }\r\n this._setAnisotropicLevel(this._gl.TEXTURE_3D, texture);\r\n }\r\n else if (internalTexture && internalTexture.isCube) {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, internalTexture, isPartOfTextureArray);\r\n }\r\n if (internalTexture._cachedCoordinatesMode !== texture.coordinatesMode) {\r\n internalTexture._cachedCoordinatesMode = texture.coordinatesMode;\r\n // CUBIC_MODE and SKYBOX_MODE both require CLAMP_TO_EDGE. All other modes use REPEAT.\r\n var textureWrapMode = (texture.coordinatesMode !== 3 && texture.coordinatesMode !== 5) ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_S, textureWrapMode, internalTexture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_T, textureWrapMode);\r\n }\r\n this._setAnisotropicLevel(this._gl.TEXTURE_CUBE_MAP, texture);\r\n }\r\n else {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, internalTexture, isPartOfTextureArray);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapU !== texture.wrapU) {\r\n internalTexture._cachedWrapU = texture.wrapU;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_S, this._getTextureWrapMode(texture.wrapU), internalTexture);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapV !== texture.wrapV) {\r\n internalTexture._cachedWrapV = texture.wrapV;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_T, this._getTextureWrapMode(texture.wrapV), internalTexture);\r\n }\r\n this._setAnisotropicLevel(this._gl.TEXTURE_2D, texture);\r\n }\r\n return true;\r\n };\r\n /**\r\n * Sets an array of texture to the webGL context\r\n * @param channel defines the channel where the texture array must be set\r\n * @param uniform defines the associated uniform location\r\n * @param textures defines the array of textures to bind\r\n */\r\n ThinEngine.prototype.setTextureArray = function (channel, uniform, textures) {\r\n if (channel === undefined || !uniform) {\r\n return;\r\n }\r\n if (!this._textureUnits || this._textureUnits.length !== textures.length) {\r\n this._textureUnits = new Int32Array(textures.length);\r\n }\r\n for (var i = 0; i < textures.length; i++) {\r\n var texture = textures[i].getInternalTexture();\r\n if (texture) {\r\n this._textureUnits[i] = channel + i;\r\n texture._associatedChannel = channel + i;\r\n }\r\n else {\r\n this._textureUnits[i] = -1;\r\n }\r\n }\r\n this._gl.uniform1iv(uniform, this._textureUnits);\r\n for (var index = 0; index < textures.length; index++) {\r\n this._setTexture(this._textureUnits[index], textures[index], true);\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._setAnisotropicLevel = function (target, texture) {\r\n var internalTexture = texture.getInternalTexture();\r\n if (!internalTexture) {\r\n return;\r\n }\r\n var anisotropicFilterExtension = this._caps.textureAnisotropicFilterExtension;\r\n var value = texture.anisotropicFilteringLevel;\r\n if (internalTexture.samplingMode !== 2\r\n && internalTexture.samplingMode !== 3\r\n && internalTexture.samplingMode !== 11) {\r\n value = 1; // Forcing the anisotropic to 1 because else webgl will force filters to linear\r\n }\r\n if (anisotropicFilterExtension && internalTexture._cachedAnisotropicFilteringLevel !== value) {\r\n this._setTextureParameterFloat(target, anisotropicFilterExtension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(value, this._caps.maxAnisotropy), internalTexture);\r\n internalTexture._cachedAnisotropicFilteringLevel = value;\r\n }\r\n };\r\n ThinEngine.prototype._setTextureParameterFloat = function (target, parameter, value, texture) {\r\n this._bindTextureDirectly(target, texture, true, true);\r\n this._gl.texParameterf(target, parameter, value);\r\n };\r\n ThinEngine.prototype._setTextureParameterInteger = function (target, parameter, value, texture) {\r\n if (texture) {\r\n this._bindTextureDirectly(target, texture, true, true);\r\n }\r\n this._gl.texParameteri(target, parameter, value);\r\n };\r\n /**\r\n * Unbind all vertex attributes from the webGL context\r\n */\r\n ThinEngine.prototype.unbindAllAttributes = function () {\r\n if (this._mustWipeVertexAttributes) {\r\n this._mustWipeVertexAttributes = false;\r\n for (var i = 0; i < this._caps.maxVertexAttribs; i++) {\r\n this._gl.disableVertexAttribArray(i);\r\n this._vertexAttribArraysEnabled[i] = false;\r\n this._currentBufferPointers[i].active = false;\r\n }\r\n return;\r\n }\r\n for (var i = 0, ul = this._vertexAttribArraysEnabled.length; i < ul; i++) {\r\n if (i >= this._caps.maxVertexAttribs || !this._vertexAttribArraysEnabled[i]) {\r\n continue;\r\n }\r\n this._gl.disableVertexAttribArray(i);\r\n this._vertexAttribArraysEnabled[i] = false;\r\n this._currentBufferPointers[i].active = false;\r\n }\r\n };\r\n /**\r\n * Force the engine to release all cached effects. This means that next effect compilation will have to be done completely even if a similar effect was already compiled\r\n */\r\n ThinEngine.prototype.releaseEffects = function () {\r\n for (var name in this._compiledEffects) {\r\n var webGLPipelineContext = this._compiledEffects[name].getPipelineContext();\r\n this._deletePipelineContext(webGLPipelineContext);\r\n }\r\n this._compiledEffects = {};\r\n };\r\n /**\r\n * Dispose and release all associated resources\r\n */\r\n ThinEngine.prototype.dispose = function () {\r\n this.stopRenderLoop();\r\n // Clear observables\r\n if (this.onBeforeTextureInitObservable) {\r\n this.onBeforeTextureInitObservable.clear();\r\n }\r\n // Empty texture\r\n if (this._emptyTexture) {\r\n this._releaseTexture(this._emptyTexture);\r\n this._emptyTexture = null;\r\n }\r\n if (this._emptyCubeTexture) {\r\n this._releaseTexture(this._emptyCubeTexture);\r\n this._emptyCubeTexture = null;\r\n }\r\n // Release effects\r\n this.releaseEffects();\r\n // Unbind\r\n this.unbindAllAttributes();\r\n this._boundUniforms = [];\r\n // Events\r\n if (DomManagement.IsWindowObjectExist()) {\r\n if (this._renderingCanvas) {\r\n if (!this._doNotHandleContextLost) {\r\n this._renderingCanvas.removeEventListener(\"webglcontextlost\", this._onContextLost);\r\n this._renderingCanvas.removeEventListener(\"webglcontextrestored\", this._onContextRestored);\r\n }\r\n }\r\n }\r\n this._workingCanvas = null;\r\n this._workingContext = null;\r\n this._currentBufferPointers = [];\r\n this._renderingCanvas = null;\r\n this._currentProgram = null;\r\n this._bindedRenderFunction = null;\r\n Effect.ResetCache();\r\n // Abort active requests\r\n for (var _i = 0, _a = this._activeRequests; _i < _a.length; _i++) {\r\n var request = _a[_i];\r\n request.abort();\r\n }\r\n };\r\n /**\r\n * Attach a new callback raised when context lost event is fired\r\n * @param callback defines the callback to call\r\n */\r\n ThinEngine.prototype.attachContextLostEvent = function (callback) {\r\n if (this._renderingCanvas) {\r\n this._renderingCanvas.addEventListener(\"webglcontextlost\", callback, false);\r\n }\r\n };\r\n /**\r\n * Attach a new callback raised when context restored event is fired\r\n * @param callback defines the callback to call\r\n */\r\n ThinEngine.prototype.attachContextRestoredEvent = function (callback) {\r\n if (this._renderingCanvas) {\r\n this._renderingCanvas.addEventListener(\"webglcontextrestored\", callback, false);\r\n }\r\n };\r\n /**\r\n * Get the current error code of the webGL context\r\n * @returns the error code\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError\r\n */\r\n ThinEngine.prototype.getError = function () {\r\n return this._gl.getError();\r\n };\r\n ThinEngine.prototype._canRenderToFloatFramebuffer = function () {\r\n if (this._webGLVersion > 1) {\r\n return this._caps.colorBufferFloat;\r\n }\r\n return this._canRenderToFramebuffer(1);\r\n };\r\n ThinEngine.prototype._canRenderToHalfFloatFramebuffer = function () {\r\n if (this._webGLVersion > 1) {\r\n return this._caps.colorBufferFloat;\r\n }\r\n return this._canRenderToFramebuffer(2);\r\n };\r\n // Thank you : http://stackoverflow.com/questions/28827511/webgl-ios-render-to-floating-point-texture\r\n ThinEngine.prototype._canRenderToFramebuffer = function (type) {\r\n var gl = this._gl;\r\n //clear existing errors\r\n while (gl.getError() !== gl.NO_ERROR) { }\r\n var successful = true;\r\n var texture = gl.createTexture();\r\n gl.bindTexture(gl.TEXTURE_2D, texture);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, this._getRGBABufferInternalSizedFormat(type), 1, 1, 0, gl.RGBA, this._getWebGLTextureType(type), null);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\r\n var fb = gl.createFramebuffer();\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, fb);\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\r\n var status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\r\n successful = successful && (status === gl.FRAMEBUFFER_COMPLETE);\r\n successful = successful && (gl.getError() === gl.NO_ERROR);\r\n //try render by clearing frame buffer's color buffer\r\n if (successful) {\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n successful = successful && (gl.getError() === gl.NO_ERROR);\r\n }\r\n //try reading from frame to ensure render occurs (just creating the FBO is not sufficient to determine if rendering is supported)\r\n if (successful) {\r\n //in practice it's sufficient to just read from the backbuffer rather than handle potentially issues reading from the texture\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n var readFormat = gl.RGBA;\r\n var readType = gl.UNSIGNED_BYTE;\r\n var buffer = new Uint8Array(4);\r\n gl.readPixels(0, 0, 1, 1, readFormat, readType, buffer);\r\n successful = successful && (gl.getError() === gl.NO_ERROR);\r\n }\r\n //clean up\r\n gl.deleteTexture(texture);\r\n gl.deleteFramebuffer(fb);\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n //clear accumulated errors\r\n while (!successful && (gl.getError() !== gl.NO_ERROR)) { }\r\n return successful;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getWebGLTextureType = function (type) {\r\n if (this._webGLVersion === 1) {\r\n switch (type) {\r\n case 1:\r\n return this._gl.FLOAT;\r\n case 2:\r\n return this._gl.HALF_FLOAT_OES;\r\n case 0:\r\n return this._gl.UNSIGNED_BYTE;\r\n case 8:\r\n return this._gl.UNSIGNED_SHORT_4_4_4_4;\r\n case 9:\r\n return this._gl.UNSIGNED_SHORT_5_5_5_1;\r\n case 10:\r\n return this._gl.UNSIGNED_SHORT_5_6_5;\r\n }\r\n return this._gl.UNSIGNED_BYTE;\r\n }\r\n switch (type) {\r\n case 3:\r\n return this._gl.BYTE;\r\n case 0:\r\n return this._gl.UNSIGNED_BYTE;\r\n case 4:\r\n return this._gl.SHORT;\r\n case 5:\r\n return this._gl.UNSIGNED_SHORT;\r\n case 6:\r\n return this._gl.INT;\r\n case 7: // Refers to UNSIGNED_INT\r\n return this._gl.UNSIGNED_INT;\r\n case 1:\r\n return this._gl.FLOAT;\r\n case 2:\r\n return this._gl.HALF_FLOAT;\r\n case 8:\r\n return this._gl.UNSIGNED_SHORT_4_4_4_4;\r\n case 9:\r\n return this._gl.UNSIGNED_SHORT_5_5_5_1;\r\n case 10:\r\n return this._gl.UNSIGNED_SHORT_5_6_5;\r\n case 11:\r\n return this._gl.UNSIGNED_INT_2_10_10_10_REV;\r\n case 12:\r\n return this._gl.UNSIGNED_INT_24_8;\r\n case 13:\r\n return this._gl.UNSIGNED_INT_10F_11F_11F_REV;\r\n case 14:\r\n return this._gl.UNSIGNED_INT_5_9_9_9_REV;\r\n case 15:\r\n return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV;\r\n }\r\n return this._gl.UNSIGNED_BYTE;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getInternalFormat = function (format) {\r\n var internalFormat = this._gl.RGBA;\r\n switch (format) {\r\n case 0:\r\n internalFormat = this._gl.ALPHA;\r\n break;\r\n case 1:\r\n internalFormat = this._gl.LUMINANCE;\r\n break;\r\n case 2:\r\n internalFormat = this._gl.LUMINANCE_ALPHA;\r\n break;\r\n case 6:\r\n internalFormat = this._gl.RED;\r\n break;\r\n case 7:\r\n internalFormat = this._gl.RG;\r\n break;\r\n case 4:\r\n internalFormat = this._gl.RGB;\r\n break;\r\n case 5:\r\n internalFormat = this._gl.RGBA;\r\n break;\r\n }\r\n if (this._webGLVersion > 1) {\r\n switch (format) {\r\n case 8:\r\n internalFormat = this._gl.RED_INTEGER;\r\n break;\r\n case 9:\r\n internalFormat = this._gl.RG_INTEGER;\r\n break;\r\n case 10:\r\n internalFormat = this._gl.RGB_INTEGER;\r\n break;\r\n case 11:\r\n internalFormat = this._gl.RGBA_INTEGER;\r\n break;\r\n }\r\n }\r\n return internalFormat;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getRGBABufferInternalSizedFormat = function (type, format) {\r\n if (this._webGLVersion === 1) {\r\n if (format !== undefined) {\r\n switch (format) {\r\n case 0:\r\n return this._gl.ALPHA;\r\n case 1:\r\n return this._gl.LUMINANCE;\r\n case 2:\r\n return this._gl.LUMINANCE_ALPHA;\r\n }\r\n }\r\n return this._gl.RGBA;\r\n }\r\n switch (type) {\r\n case 3:\r\n switch (format) {\r\n case 6:\r\n return this._gl.R8_SNORM;\r\n case 7:\r\n return this._gl.RG8_SNORM;\r\n case 4:\r\n return this._gl.RGB8_SNORM;\r\n case 8:\r\n return this._gl.R8I;\r\n case 9:\r\n return this._gl.RG8I;\r\n case 10:\r\n return this._gl.RGB8I;\r\n case 11:\r\n return this._gl.RGBA8I;\r\n default:\r\n return this._gl.RGBA8_SNORM;\r\n }\r\n case 0:\r\n switch (format) {\r\n case 6:\r\n return this._gl.R8;\r\n case 7:\r\n return this._gl.RG8;\r\n case 4:\r\n return this._gl.RGB8; // By default. Other possibilities are RGB565, SRGB8.\r\n case 5:\r\n return this._gl.RGBA8; // By default. Other possibilities are RGB5_A1, RGBA4, SRGB8_ALPHA8.\r\n case 8:\r\n return this._gl.R8UI;\r\n case 9:\r\n return this._gl.RG8UI;\r\n case 10:\r\n return this._gl.RGB8UI;\r\n case 11:\r\n return this._gl.RGBA8UI;\r\n case 0:\r\n return this._gl.ALPHA;\r\n case 1:\r\n return this._gl.LUMINANCE;\r\n case 2:\r\n return this._gl.LUMINANCE_ALPHA;\r\n default:\r\n return this._gl.RGBA8;\r\n }\r\n case 4:\r\n switch (format) {\r\n case 8:\r\n return this._gl.R16I;\r\n case 9:\r\n return this._gl.RG16I;\r\n case 10:\r\n return this._gl.RGB16I;\r\n case 11:\r\n return this._gl.RGBA16I;\r\n default:\r\n return this._gl.RGBA16I;\r\n }\r\n case 5:\r\n switch (format) {\r\n case 8:\r\n return this._gl.R16UI;\r\n case 9:\r\n return this._gl.RG16UI;\r\n case 10:\r\n return this._gl.RGB16UI;\r\n case 11:\r\n return this._gl.RGBA16UI;\r\n default:\r\n return this._gl.RGBA16UI;\r\n }\r\n case 6:\r\n switch (format) {\r\n case 8:\r\n return this._gl.R32I;\r\n case 9:\r\n return this._gl.RG32I;\r\n case 10:\r\n return this._gl.RGB32I;\r\n case 11:\r\n return this._gl.RGBA32I;\r\n default:\r\n return this._gl.RGBA32I;\r\n }\r\n case 7: // Refers to UNSIGNED_INT\r\n switch (format) {\r\n case 8:\r\n return this._gl.R32UI;\r\n case 9:\r\n return this._gl.RG32UI;\r\n case 10:\r\n return this._gl.RGB32UI;\r\n case 11:\r\n return this._gl.RGBA32UI;\r\n default:\r\n return this._gl.RGBA32UI;\r\n }\r\n case 1:\r\n switch (format) {\r\n case 6:\r\n return this._gl.R32F; // By default. Other possibility is R16F.\r\n case 7:\r\n return this._gl.RG32F; // By default. Other possibility is RG16F.\r\n case 4:\r\n return this._gl.RGB32F; // By default. Other possibilities are RGB16F, R11F_G11F_B10F, RGB9_E5.\r\n case 5:\r\n return this._gl.RGBA32F; // By default. Other possibility is RGBA16F.\r\n default:\r\n return this._gl.RGBA32F;\r\n }\r\n case 2:\r\n switch (format) {\r\n case 6:\r\n return this._gl.R16F;\r\n case 7:\r\n return this._gl.RG16F;\r\n case 4:\r\n return this._gl.RGB16F; // By default. Other possibilities are R11F_G11F_B10F, RGB9_E5.\r\n case 5:\r\n return this._gl.RGBA16F;\r\n default:\r\n return this._gl.RGBA16F;\r\n }\r\n case 10:\r\n return this._gl.RGB565;\r\n case 13:\r\n return this._gl.R11F_G11F_B10F;\r\n case 14:\r\n return this._gl.RGB9_E5;\r\n case 8:\r\n return this._gl.RGBA4;\r\n case 9:\r\n return this._gl.RGB5_A1;\r\n case 11:\r\n switch (format) {\r\n case 5:\r\n return this._gl.RGB10_A2; // By default. Other possibility is RGB5_A1.\r\n case 11:\r\n return this._gl.RGB10_A2UI;\r\n default:\r\n return this._gl.RGB10_A2;\r\n }\r\n }\r\n return this._gl.RGBA8;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getRGBAMultiSampleBufferFormat = function (type) {\r\n if (type === 1) {\r\n return this._gl.RGBA32F;\r\n }\r\n else if (type === 2) {\r\n return this._gl.RGBA16F;\r\n }\r\n return this._gl.RGBA8;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._loadFile = function (url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError) {\r\n var _this = this;\r\n var request = FileTools.LoadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError);\r\n this._activeRequests.push(request);\r\n request.onCompleteObservable.add(function (request) {\r\n _this._activeRequests.splice(_this._activeRequests.indexOf(request), 1);\r\n });\r\n return request;\r\n };\r\n // Statics\r\n /**\r\n * Gets a boolean indicating if the engine can be instanciated (ie. if a webGL context can be found)\r\n * @returns true if the engine can be created\r\n * @ignorenaming\r\n */\r\n ThinEngine.isSupported = function () {\r\n try {\r\n var tempcanvas = CanvasGenerator.CreateCanvas(1, 1);\r\n var gl = tempcanvas.getContext(\"webgl\") || tempcanvas.getContext(\"experimental-webgl\");\r\n return gl != null && !!window.WebGLRenderingContext;\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Find the next highest power of two.\r\n * @param x Number to start search from.\r\n * @return Next highest power of two.\r\n */\r\n ThinEngine.CeilingPOT = function (x) {\r\n x--;\r\n x |= x >> 1;\r\n x |= x >> 2;\r\n x |= x >> 4;\r\n x |= x >> 8;\r\n x |= x >> 16;\r\n x++;\r\n return x;\r\n };\r\n /**\r\n * Find the next lowest power of two.\r\n * @param x Number to start search from.\r\n * @return Next lowest power of two.\r\n */\r\n ThinEngine.FloorPOT = function (x) {\r\n x = x | (x >> 1);\r\n x = x | (x >> 2);\r\n x = x | (x >> 4);\r\n x = x | (x >> 8);\r\n x = x | (x >> 16);\r\n return x - (x >> 1);\r\n };\r\n /**\r\n * Find the nearest power of two.\r\n * @param x Number to start search from.\r\n * @return Next nearest power of two.\r\n */\r\n ThinEngine.NearestPOT = function (x) {\r\n var c = ThinEngine.CeilingPOT(x);\r\n var f = ThinEngine.FloorPOT(x);\r\n return (c - x) > (x - f) ? f : c;\r\n };\r\n /**\r\n * Get the closest exponent of two\r\n * @param value defines the value to approximate\r\n * @param max defines the maximum value to return\r\n * @param mode defines how to define the closest value\r\n * @returns closest exponent of two of the given value\r\n */\r\n ThinEngine.GetExponentOfTwo = function (value, max, mode) {\r\n if (mode === void 0) { mode = 2; }\r\n var pot;\r\n switch (mode) {\r\n case 1:\r\n pot = ThinEngine.FloorPOT(value);\r\n break;\r\n case 2:\r\n pot = ThinEngine.NearestPOT(value);\r\n break;\r\n case 3:\r\n default:\r\n pot = ThinEngine.CeilingPOT(value);\r\n break;\r\n }\r\n return Math.min(pot, max);\r\n };\r\n /**\r\n * Queue a new function into the requested animation frame pool (ie. this function will be executed byt the browser for the next frame)\r\n * @param func - the function to be called\r\n * @param requester - the object that will request the next frame. Falls back to window.\r\n * @returns frame number\r\n */\r\n ThinEngine.QueueNewFrame = function (func, requester) {\r\n if (!DomManagement.IsWindowObjectExist()) {\r\n if (typeof requestAnimationFrame !== \"undefined\") {\r\n return requestAnimationFrame(func);\r\n }\r\n return setTimeout(func, 16);\r\n }\r\n if (!requester) {\r\n requester = window;\r\n }\r\n if (requester.requestAnimationFrame) {\r\n return requester.requestAnimationFrame(func);\r\n }\r\n else if (requester.msRequestAnimationFrame) {\r\n return requester.msRequestAnimationFrame(func);\r\n }\r\n else if (requester.webkitRequestAnimationFrame) {\r\n return requester.webkitRequestAnimationFrame(func);\r\n }\r\n else if (requester.mozRequestAnimationFrame) {\r\n return requester.mozRequestAnimationFrame(func);\r\n }\r\n else if (requester.oRequestAnimationFrame) {\r\n return requester.oRequestAnimationFrame(func);\r\n }\r\n else {\r\n return window.setTimeout(func, 16);\r\n }\r\n };\r\n /** Use this array to turn off some WebGL2 features on known buggy browsers version */\r\n ThinEngine.ExceptionList = [\r\n { key: \"Chrome\\/63\\.0\", capture: \"63\\\\.0\\\\.3239\\\\.(\\\\d+)\", captureConstraint: 108, targets: [\"uniformBuffer\"] },\r\n { key: \"Firefox\\/58\", capture: null, captureConstraint: null, targets: [\"uniformBuffer\"] },\r\n { key: \"Firefox\\/59\", capture: null, captureConstraint: null, targets: [\"uniformBuffer\"] },\r\n { key: \"Chrome\\/72.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Chrome\\/73.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Chrome\\/74.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Mac OS.+Chrome\\/71\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Mac OS.+Chrome\\/72\", capture: null, captureConstraint: null, targets: [\"vao\"] }\r\n ];\r\n /** @hidden */\r\n ThinEngine._TextureLoaders = [];\r\n // Updatable statics so stick with vars here\r\n /**\r\n * Gets or sets the epsilon value used by collision engine\r\n */\r\n ThinEngine.CollisionsEpsilon = 0.001;\r\n return ThinEngine;\r\n}());\r\nexport { ThinEngine };\r\n//# sourceMappingURL=thinEngine.js.map"
  1451. },
  1452. {
  1453. "id": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1454. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  1455. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1456. "index": 28,
  1457. "index2": 27,
  1458. "size": 17052,
  1459. "cacheable": true,
  1460. "built": true,
  1461. "optional": false,
  1462. "prefetched": false,
  1463. "chunks": [
  1464. "thinEngineOnly"
  1465. ],
  1466. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1467. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1468. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1469. "issuerPath": [
  1470. {
  1471. "id": "./thinEngineOnly.ts",
  1472. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1473. "name": "./thinEngineOnly.ts",
  1474. "profile": {
  1475. "factory": 25,
  1476. "building": 1793
  1477. }
  1478. },
  1479. {
  1480. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1481. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1482. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1483. "profile": {
  1484. "factory": 10,
  1485. "building": 63
  1486. }
  1487. }
  1488. ],
  1489. "profile": {
  1490. "factory": 6,
  1491. "building": 38,
  1492. "dependencies": 28
  1493. },
  1494. "failed": false,
  1495. "errors": 0,
  1496. "warnings": 0,
  1497. "assets": [],
  1498. "reasons": [
  1499. {
  1500. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1501. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1502. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1503. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1504. "type": "harmony side effect evaluation",
  1505. "userRequest": "../Materials/Textures/internalTexture",
  1506. "loc": "8:0-95"
  1507. },
  1508. {
  1509. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1510. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1511. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1512. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1513. "type": "harmony import specifier",
  1514. "userRequest": "../Materials/Textures/internalTexture",
  1515. "loc": "2237:48-63"
  1516. },
  1517. {
  1518. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1519. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1520. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1521. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1522. "type": "harmony import specifier",
  1523. "userRequest": "../Materials/Textures/internalTexture",
  1524. "loc": "2237:70-91"
  1525. },
  1526. {
  1527. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1528. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1529. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1530. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1531. "type": "harmony import specifier",
  1532. "userRequest": "../Materials/Textures/internalTexture",
  1533. "loc": "2361:43-58"
  1534. },
  1535. {
  1536. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1537. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1538. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1539. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1540. "type": "harmony import specifier",
  1541. "userRequest": "../Materials/Textures/internalTexture",
  1542. "loc": "2361:66-87"
  1543. }
  1544. ],
  1545. "providedExports": [
  1546. "InternalTextureSource",
  1547. "InternalTexture"
  1548. ],
  1549. "optimizationBailout": [],
  1550. "depth": 2,
  1551. "source": "import { Observable } from \"../../Misc/observable\";\r\nimport { RenderTargetCreationOptions } from \"../../Materials/Textures/renderTargetCreationOptions\";\r\nimport { _DevTools } from '../../Misc/devTools';\r\n/**\r\n * Defines the source of the internal texture\r\n */\r\nexport var InternalTextureSource;\r\n(function (InternalTextureSource) {\r\n /**\r\n * The source of the texture data is unknown\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Unknown\"] = 0] = \"Unknown\";\r\n /**\r\n * Texture data comes from an URL\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Url\"] = 1] = \"Url\";\r\n /**\r\n * Texture data is only used for temporary storage\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Temp\"] = 2] = \"Temp\";\r\n /**\r\n * Texture data comes from raw data (ArrayBuffer)\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Raw\"] = 3] = \"Raw\";\r\n /**\r\n * Texture content is dynamic (video or dynamic texture)\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Dynamic\"] = 4] = \"Dynamic\";\r\n /**\r\n * Texture content is generated by rendering to it\r\n */\r\n InternalTextureSource[InternalTextureSource[\"RenderTarget\"] = 5] = \"RenderTarget\";\r\n /**\r\n * Texture content is part of a multi render target process\r\n */\r\n InternalTextureSource[InternalTextureSource[\"MultiRenderTarget\"] = 6] = \"MultiRenderTarget\";\r\n /**\r\n * Texture data comes from a cube data file\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Cube\"] = 7] = \"Cube\";\r\n /**\r\n * Texture data comes from a raw cube data\r\n */\r\n InternalTextureSource[InternalTextureSource[\"CubeRaw\"] = 8] = \"CubeRaw\";\r\n /**\r\n * Texture data come from a prefiltered cube data file\r\n */\r\n InternalTextureSource[InternalTextureSource[\"CubePrefiltered\"] = 9] = \"CubePrefiltered\";\r\n /**\r\n * Texture content is raw 3D data\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Raw3D\"] = 10] = \"Raw3D\";\r\n /**\r\n * Texture content is a depth texture\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Depth\"] = 11] = \"Depth\";\r\n /**\r\n * Texture data comes from a raw cube data encoded with RGBD\r\n */\r\n InternalTextureSource[InternalTextureSource[\"CubeRawRGBD\"] = 12] = \"CubeRawRGBD\";\r\n})(InternalTextureSource || (InternalTextureSource = {}));\r\n/**\r\n * Class used to store data associated with WebGL texture data for the engine\r\n * This class should not be used directly\r\n */\r\nvar InternalTexture = /** @class */ (function () {\r\n /**\r\n * Creates a new InternalTexture\r\n * @param engine defines the engine to use\r\n * @param source defines the type of data that will be used\r\n * @param delayAllocation if the texture allocation should be delayed (default: false)\r\n */\r\n function InternalTexture(engine, source, delayAllocation) {\r\n if (delayAllocation === void 0) { delayAllocation = false; }\r\n /**\r\n * Defines if the texture is ready\r\n */\r\n this.isReady = false;\r\n /**\r\n * Defines if the texture is a cube texture\r\n */\r\n this.isCube = false;\r\n /**\r\n * Defines if the texture contains 3D data\r\n */\r\n this.is3D = false;\r\n /**\r\n * Defines if the texture contains multiview data\r\n */\r\n this.isMultiview = false;\r\n /**\r\n * Gets the URL used to load this texture\r\n */\r\n this.url = \"\";\r\n /**\r\n * Gets the sampling mode of the texture\r\n */\r\n this.samplingMode = -1;\r\n /**\r\n * Gets a boolean indicating if the texture needs mipmaps generation\r\n */\r\n this.generateMipMaps = false;\r\n /**\r\n * Gets the number of samples used by the texture (WebGL2+ only)\r\n */\r\n this.samples = 0;\r\n /**\r\n * Gets the type of the texture (int, float...)\r\n */\r\n this.type = -1;\r\n /**\r\n * Gets the format of the texture (RGB, RGBA...)\r\n */\r\n this.format = -1;\r\n /**\r\n * Observable called when the texture is loaded\r\n */\r\n this.onLoadedObservable = new Observable();\r\n /**\r\n * Gets the width of the texture\r\n */\r\n this.width = 0;\r\n /**\r\n * Gets the height of the texture\r\n */\r\n this.height = 0;\r\n /**\r\n * Gets the depth of the texture\r\n */\r\n this.depth = 0;\r\n /**\r\n * Gets the initial width of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n this.baseWidth = 0;\r\n /**\r\n * Gets the initial height of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n this.baseHeight = 0;\r\n /**\r\n * Gets the initial depth of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n this.baseDepth = 0;\r\n /**\r\n * Gets a boolean indicating if the texture is inverted on Y axis\r\n */\r\n this.invertY = false;\r\n // Private\r\n /** @hidden */\r\n this._invertVScale = false;\r\n /** @hidden */\r\n this._associatedChannel = -1;\r\n /** @hidden */\r\n this._source = InternalTextureSource.Unknown;\r\n /** @hidden */\r\n this._buffer = null;\r\n /** @hidden */\r\n this._bufferView = null;\r\n /** @hidden */\r\n this._bufferViewArray = null;\r\n /** @hidden */\r\n this._bufferViewArrayArray = null;\r\n /** @hidden */\r\n this._size = 0;\r\n /** @hidden */\r\n this._extension = \"\";\r\n /** @hidden */\r\n this._files = null;\r\n /** @hidden */\r\n this._workingCanvas = null;\r\n /** @hidden */\r\n this._workingContext = null;\r\n /** @hidden */\r\n this._framebuffer = null;\r\n /** @hidden */\r\n this._depthStencilBuffer = null;\r\n /** @hidden */\r\n this._MSAAFramebuffer = null;\r\n /** @hidden */\r\n this._MSAARenderBuffer = null;\r\n /** @hidden */\r\n this._attachments = null;\r\n /** @hidden */\r\n this._cachedCoordinatesMode = null;\r\n /** @hidden */\r\n this._cachedWrapU = null;\r\n /** @hidden */\r\n this._cachedWrapV = null;\r\n /** @hidden */\r\n this._cachedWrapR = null;\r\n /** @hidden */\r\n this._cachedAnisotropicFilteringLevel = null;\r\n /** @hidden */\r\n this._isDisabled = false;\r\n /** @hidden */\r\n this._compression = null;\r\n /** @hidden */\r\n this._generateStencilBuffer = false;\r\n /** @hidden */\r\n this._generateDepthBuffer = false;\r\n /** @hidden */\r\n this._comparisonFunction = 0;\r\n /** @hidden */\r\n this._sphericalPolynomial = null;\r\n /** @hidden */\r\n this._lodGenerationScale = 0;\r\n /** @hidden */\r\n this._lodGenerationOffset = 0;\r\n // Multiview\r\n /** @hidden */\r\n this._colorTextureArray = null;\r\n /** @hidden */\r\n this._depthStencilTextureArray = null;\r\n // The following three fields helps sharing generated fixed LODs for texture filtering\r\n // In environment not supporting the textureLOD extension like EDGE. They are for internal use only.\r\n // They are at the level of the gl texture to benefit from the cache.\r\n /** @hidden */\r\n this._lodTextureHigh = null;\r\n /** @hidden */\r\n this._lodTextureMid = null;\r\n /** @hidden */\r\n this._lodTextureLow = null;\r\n /** @hidden */\r\n this._isRGBD = false;\r\n /** @hidden */\r\n this._linearSpecularLOD = false;\r\n /** @hidden */\r\n this._irradianceTexture = null;\r\n /** @hidden */\r\n this._webGLTexture = null;\r\n /** @hidden */\r\n this._references = 1;\r\n this._engine = engine;\r\n this._source = source;\r\n if (!delayAllocation) {\r\n this._webGLTexture = engine._createTexture();\r\n }\r\n }\r\n /**\r\n * Gets the Engine the texture belongs to.\r\n * @returns The babylon engine\r\n */\r\n InternalTexture.prototype.getEngine = function () {\r\n return this._engine;\r\n };\r\n Object.defineProperty(InternalTexture.prototype, \"source\", {\r\n /**\r\n * Gets the data source type of the texture\r\n */\r\n get: function () {\r\n return this._source;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Increments the number of references (ie. the number of Texture that point to it)\r\n */\r\n InternalTexture.prototype.incrementReferences = function () {\r\n this._references++;\r\n };\r\n /**\r\n * Change the size of the texture (not the size of the content)\r\n * @param width defines the new width\r\n * @param height defines the new height\r\n * @param depth defines the new depth (1 by default)\r\n */\r\n InternalTexture.prototype.updateSize = function (width, height, depth) {\r\n if (depth === void 0) { depth = 1; }\r\n this.width = width;\r\n this.height = height;\r\n this.depth = depth;\r\n this.baseWidth = width;\r\n this.baseHeight = height;\r\n this.baseDepth = depth;\r\n this._size = width * height * depth;\r\n };\r\n /** @hidden */\r\n InternalTexture.prototype._rebuild = function () {\r\n var _this = this;\r\n var proxy;\r\n this.isReady = false;\r\n this._cachedCoordinatesMode = null;\r\n this._cachedWrapU = null;\r\n this._cachedWrapV = null;\r\n this._cachedAnisotropicFilteringLevel = null;\r\n switch (this.source) {\r\n case InternalTextureSource.Temp:\r\n return;\r\n case InternalTextureSource.Url:\r\n proxy = this._engine.createTexture(this.url, !this.generateMipMaps, this.invertY, null, this.samplingMode, function () {\r\n proxy._swapAndDie(_this);\r\n _this.isReady = true;\r\n }, null, this._buffer, undefined, this.format);\r\n return;\r\n case InternalTextureSource.Raw:\r\n proxy = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTextureSource.Raw3D:\r\n proxy = this._engine.createRawTexture3D(this._bufferView, this.baseWidth, this.baseHeight, this.baseDepth, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTextureSource.Dynamic:\r\n proxy = this._engine.createDynamicTexture(this.baseWidth, this.baseHeight, this.generateMipMaps, this.samplingMode);\r\n proxy._swapAndDie(this);\r\n this._engine.updateDynamicTexture(this, this._engine.getRenderingCanvas(), this.invertY, undefined, undefined, true);\r\n // The engine will make sure to update content so no need to flag it as isReady = true\r\n return;\r\n case InternalTextureSource.RenderTarget:\r\n var options = new RenderTargetCreationOptions();\r\n options.generateDepthBuffer = this._generateDepthBuffer;\r\n options.generateMipMaps = this.generateMipMaps;\r\n options.generateStencilBuffer = this._generateStencilBuffer;\r\n options.samplingMode = this.samplingMode;\r\n options.type = this.type;\r\n if (this.isCube) {\r\n proxy = this._engine.createRenderTargetCubeTexture(this.width, options);\r\n }\r\n else {\r\n var size = {\r\n width: this.width,\r\n height: this.height\r\n };\r\n proxy = this._engine.createRenderTargetTexture(size, options);\r\n }\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTextureSource.Depth:\r\n var depthTextureOptions = {\r\n bilinearFiltering: this.samplingMode !== 2,\r\n comparisonFunction: this._comparisonFunction,\r\n generateStencil: this._generateStencilBuffer,\r\n isCube: this.isCube\r\n };\r\n proxy = this._engine.createDepthStencilTexture({ width: this.width, height: this.height }, depthTextureOptions);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTextureSource.Cube:\r\n proxy = this._engine.createCubeTexture(this.url, null, this._files, !this.generateMipMaps, function () {\r\n proxy._swapAndDie(_this);\r\n _this.isReady = true;\r\n }, null, this.format, this._extension);\r\n return;\r\n case InternalTextureSource.CubeRaw:\r\n proxy = this._engine.createRawCubeTexture(this._bufferViewArray, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTextureSource.CubeRawRGBD:\r\n proxy = this._engine.createRawCubeTexture(null, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n InternalTexture._UpdateRGBDAsync(proxy, this._bufferViewArrayArray, this._sphericalPolynomial, this._lodGenerationScale, this._lodGenerationOffset).then(function () {\r\n proxy._swapAndDie(_this);\r\n _this.isReady = true;\r\n });\r\n return;\r\n case InternalTextureSource.CubePrefiltered:\r\n proxy = this._engine.createPrefilteredCubeTexture(this.url, null, this._lodGenerationScale, this._lodGenerationOffset, function (proxy) {\r\n if (proxy) {\r\n proxy._swapAndDie(_this);\r\n }\r\n _this.isReady = true;\r\n }, null, this.format, this._extension);\r\n proxy._sphericalPolynomial = this._sphericalPolynomial;\r\n return;\r\n }\r\n };\r\n /** @hidden */\r\n InternalTexture.prototype._swapAndDie = function (target) {\r\n target._webGLTexture = this._webGLTexture;\r\n target._isRGBD = this._isRGBD;\r\n if (this._framebuffer) {\r\n target._framebuffer = this._framebuffer;\r\n }\r\n if (this._depthStencilBuffer) {\r\n target._depthStencilBuffer = this._depthStencilBuffer;\r\n }\r\n if (this._lodTextureHigh) {\r\n if (target._lodTextureHigh) {\r\n target._lodTextureHigh.dispose();\r\n }\r\n target._lodTextureHigh = this._lodTextureHigh;\r\n }\r\n if (this._lodTextureMid) {\r\n if (target._lodTextureMid) {\r\n target._lodTextureMid.dispose();\r\n }\r\n target._lodTextureMid = this._lodTextureMid;\r\n }\r\n if (this._lodTextureLow) {\r\n if (target._lodTextureLow) {\r\n target._lodTextureLow.dispose();\r\n }\r\n target._lodTextureLow = this._lodTextureLow;\r\n }\r\n if (this._irradianceTexture) {\r\n if (target._irradianceTexture) {\r\n target._irradianceTexture.dispose();\r\n }\r\n target._irradianceTexture = this._irradianceTexture;\r\n }\r\n var cache = this._engine.getLoadedTexturesCache();\r\n var index = cache.indexOf(this);\r\n if (index !== -1) {\r\n cache.splice(index, 1);\r\n }\r\n var index = cache.indexOf(target);\r\n if (index === -1) {\r\n cache.push(target);\r\n }\r\n };\r\n /**\r\n * Dispose the current allocated resources\r\n */\r\n InternalTexture.prototype.dispose = function () {\r\n if (!this._webGLTexture) {\r\n return;\r\n }\r\n this._references--;\r\n if (this._references === 0) {\r\n this._engine._releaseTexture(this);\r\n this._webGLTexture = null;\r\n }\r\n };\r\n /** @hidden */\r\n InternalTexture._UpdateRGBDAsync = function (internalTexture, data, sphericalPolynomial, lodScale, lodOffset) {\r\n throw _DevTools.WarnImport(\"environmentTextureTools\");\r\n };\r\n return InternalTexture;\r\n}());\r\nexport { InternalTexture };\r\n//# sourceMappingURL=internalTexture.js.map"
  1552. },
  1553. {
  1554. "id": "../../.temp/packageES6Dev/core/Materials/Textures/renderTargetCreationOptions.js",
  1555. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\renderTargetCreationOptions.js",
  1556. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/renderTargetCreationOptions.js",
  1557. "index": 29,
  1558. "index2": 26,
  1559. "size": 329,
  1560. "cacheable": true,
  1561. "built": true,
  1562. "optional": false,
  1563. "prefetched": false,
  1564. "chunks": [
  1565. "thinEngineOnly"
  1566. ],
  1567. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  1568. "issuerId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1569. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1570. "issuerPath": [
  1571. {
  1572. "id": "./thinEngineOnly.ts",
  1573. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1574. "name": "./thinEngineOnly.ts",
  1575. "profile": {
  1576. "factory": 25,
  1577. "building": 1793
  1578. }
  1579. },
  1580. {
  1581. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1582. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1583. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1584. "profile": {
  1585. "factory": 10,
  1586. "building": 63
  1587. }
  1588. },
  1589. {
  1590. "id": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1591. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  1592. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1593. "profile": {
  1594. "factory": 6,
  1595. "building": 38,
  1596. "dependencies": 28
  1597. }
  1598. }
  1599. ],
  1600. "profile": {
  1601. "factory": 15,
  1602. "building": 6
  1603. },
  1604. "failed": false,
  1605. "errors": 0,
  1606. "warnings": 0,
  1607. "assets": [],
  1608. "reasons": [
  1609. {
  1610. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1611. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  1612. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1613. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1614. "type": "harmony side effect evaluation",
  1615. "userRequest": "../../Materials/Textures/renderTargetCreationOptions",
  1616. "loc": "2:0-99"
  1617. },
  1618. {
  1619. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1620. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  1621. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1622. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  1623. "type": "harmony import specifier",
  1624. "userRequest": "../../Materials/Textures/renderTargetCreationOptions",
  1625. "loc": "312:34-61"
  1626. }
  1627. ],
  1628. "providedExports": [
  1629. "RenderTargetCreationOptions"
  1630. ],
  1631. "optimizationBailout": [],
  1632. "depth": 3,
  1633. "source": "/**\r\n * Define options used to create a render target texture\r\n */\r\nvar RenderTargetCreationOptions = /** @class */ (function () {\r\n function RenderTargetCreationOptions() {\r\n }\r\n return RenderTargetCreationOptions;\r\n}());\r\nexport { RenderTargetCreationOptions };\r\n//# sourceMappingURL=renderTargetCreationOptions.js.map"
  1634. },
  1635. {
  1636. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  1637. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  1638. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  1639. "index": 3,
  1640. "index2": 21,
  1641. "size": 42975,
  1642. "cacheable": true,
  1643. "built": true,
  1644. "optional": false,
  1645. "prefetched": false,
  1646. "chunks": [
  1647. "thinEngineOnly"
  1648. ],
  1649. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1650. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1651. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1652. "issuerPath": [
  1653. {
  1654. "id": "./thinEngineOnly.ts",
  1655. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1656. "name": "./thinEngineOnly.ts",
  1657. "profile": {
  1658. "factory": 25,
  1659. "building": 1793
  1660. }
  1661. },
  1662. {
  1663. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1664. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1665. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1666. "profile": {
  1667. "factory": 10,
  1668. "building": 63
  1669. }
  1670. }
  1671. ],
  1672. "profile": {
  1673. "factory": 6,
  1674. "building": 38,
  1675. "dependencies": 28
  1676. },
  1677. "failed": false,
  1678. "errors": 0,
  1679. "warnings": 0,
  1680. "assets": [],
  1681. "reasons": [
  1682. {
  1683. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1684. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1685. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1686. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1687. "type": "harmony side effect evaluation",
  1688. "userRequest": "../Materials/effect",
  1689. "loc": "2:0-45"
  1690. },
  1691. {
  1692. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1693. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1694. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1695. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1696. "type": "harmony import specifier",
  1697. "userRequest": "../Materials/effect",
  1698. "loc": "344:19-25"
  1699. },
  1700. {
  1701. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1702. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1703. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1704. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1705. "type": "harmony import specifier",
  1706. "userRequest": "../Materials/effect",
  1707. "loc": "347:12-18"
  1708. },
  1709. {
  1710. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1711. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1712. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1713. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1714. "type": "harmony import specifier",
  1715. "userRequest": "../Materials/effect",
  1716. "loc": "486:8-14"
  1717. },
  1718. {
  1719. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1720. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1721. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1722. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1723. "type": "harmony import specifier",
  1724. "userRequest": "../Materials/effect",
  1725. "loc": "1631:25-31"
  1726. },
  1727. {
  1728. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1729. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1730. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1731. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1732. "type": "harmony import specifier",
  1733. "userRequest": "../Materials/effect",
  1734. "loc": "3034:8-14"
  1735. }
  1736. ],
  1737. "providedExports": [
  1738. "Effect"
  1739. ],
  1740. "optimizationBailout": [],
  1741. "depth": 2,
  1742. "source": "import { Observable } from \"../Misc/observable\";\r\nimport { DomManagement } from \"../Misc/domManagement\";\r\nimport { Logger } from \"../Misc/logger\";\r\nimport { ShaderProcessor } from '../Engines/Processors/shaderProcessor';\r\n/**\r\n * Effect containing vertex and fragment shader that can be executed on an object.\r\n */\r\nvar Effect = /** @class */ (function () {\r\n /**\r\n * Instantiates an effect.\r\n * An effect can be used to create/manage/execute vertex and fragment shaders.\r\n * @param baseName Name of the effect.\r\n * @param attributesNamesOrOptions List of attribute names that will be passed to the shader or set of all options to create the effect.\r\n * @param uniformsNamesOrEngine List of uniform variable names that will be passed to the shader or the engine that will be used to render effect.\r\n * @param samplers List of sampler variables that will be passed to the shader.\r\n * @param engine Engine to be used to render the effect\r\n * @param defines Define statements to be added to the shader.\r\n * @param fallbacks Possible fallbacks for this effect to improve performance when needed.\r\n * @param onCompiled Callback that will be called when the shader is compiled.\r\n * @param onError Callback that will be called if an error occurs during shader compilation.\r\n * @param indexParameters Parameters to be used with Babylons include syntax to iterate over an array (eg. {lights: 10})\r\n */\r\n function Effect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, engine, defines, fallbacks, onCompiled, onError, indexParameters) {\r\n var _this = this;\r\n if (samplers === void 0) { samplers = null; }\r\n if (defines === void 0) { defines = null; }\r\n if (fallbacks === void 0) { fallbacks = null; }\r\n if (onCompiled === void 0) { onCompiled = null; }\r\n if (onError === void 0) { onError = null; }\r\n /**\r\n * Name of the effect.\r\n */\r\n this.name = null;\r\n /**\r\n * String container all the define statements that should be set on the shader.\r\n */\r\n this.defines = \"\";\r\n /**\r\n * Callback that will be called when the shader is compiled.\r\n */\r\n this.onCompiled = null;\r\n /**\r\n * Callback that will be called if an error occurs during shader compilation.\r\n */\r\n this.onError = null;\r\n /**\r\n * Callback that will be called when effect is bound.\r\n */\r\n this.onBind = null;\r\n /**\r\n * Unique ID of the effect.\r\n */\r\n this.uniqueId = 0;\r\n /**\r\n * Observable that will be called when the shader is compiled.\r\n * It is recommended to use executeWhenCompile() or to make sure that scene.isReady() is called to get this observable raised.\r\n */\r\n this.onCompileObservable = new Observable();\r\n /**\r\n * Observable that will be called if an error occurs during shader compilation.\r\n */\r\n this.onErrorObservable = new Observable();\r\n /** @hidden */\r\n this._onBindObservable = null;\r\n /** @hidden */\r\n this._bonesComputationForcedToCPU = false;\r\n this._uniformBuffersNames = {};\r\n this._samplers = {};\r\n this._isReady = false;\r\n this._compilationError = \"\";\r\n this._allFallbacksProcessed = false;\r\n this._uniforms = {};\r\n /**\r\n * Key for the effect.\r\n * @hidden\r\n */\r\n this._key = \"\";\r\n this._fallbacks = null;\r\n this._vertexSourceCode = \"\";\r\n this._fragmentSourceCode = \"\";\r\n this._vertexSourceCodeOverride = \"\";\r\n this._fragmentSourceCodeOverride = \"\";\r\n this._transformFeedbackVaryings = null;\r\n /**\r\n * Compiled shader to webGL program.\r\n * @hidden\r\n */\r\n this._pipelineContext = null;\r\n this._valueCache = {};\r\n this.name = baseName;\r\n if (attributesNamesOrOptions.attributes) {\r\n var options = attributesNamesOrOptions;\r\n this._engine = uniformsNamesOrEngine;\r\n this._attributesNames = options.attributes;\r\n this._uniformsNames = options.uniformsNames.concat(options.samplers);\r\n this._samplerList = options.samplers.slice();\r\n this.defines = options.defines;\r\n this.onError = options.onError;\r\n this.onCompiled = options.onCompiled;\r\n this._fallbacks = options.fallbacks;\r\n this._indexParameters = options.indexParameters;\r\n this._transformFeedbackVaryings = options.transformFeedbackVaryings || null;\r\n if (options.uniformBuffersNames) {\r\n for (var i = 0; i < options.uniformBuffersNames.length; i++) {\r\n this._uniformBuffersNames[options.uniformBuffersNames[i]] = i;\r\n }\r\n }\r\n }\r\n else {\r\n this._engine = engine;\r\n this.defines = (defines == null ? \"\" : defines);\r\n this._uniformsNames = uniformsNamesOrEngine.concat(samplers);\r\n this._samplerList = samplers ? samplers.slice() : [];\r\n this._attributesNames = attributesNamesOrOptions;\r\n this.onError = onError;\r\n this.onCompiled = onCompiled;\r\n this._indexParameters = indexParameters;\r\n this._fallbacks = fallbacks;\r\n }\r\n this.uniqueId = Effect._uniqueIdSeed++;\r\n var vertexSource;\r\n var fragmentSource;\r\n if (baseName.vertexSource) {\r\n vertexSource = \"source:\" + baseName.vertexSource;\r\n }\r\n else if (baseName.vertexElement) {\r\n vertexSource = document.getElementById(baseName.vertexElement);\r\n if (!vertexSource) {\r\n vertexSource = baseName.vertexElement;\r\n }\r\n }\r\n else {\r\n vertexSource = baseName.vertex || baseName;\r\n }\r\n if (baseName.fragmentSource) {\r\n fragmentSource = \"source:\" + baseName.fragmentSource;\r\n }\r\n else if (baseName.fragmentElement) {\r\n fragmentSource = document.getElementById(baseName.fragmentElement);\r\n if (!fragmentSource) {\r\n fragmentSource = baseName.fragmentElement;\r\n }\r\n }\r\n else {\r\n fragmentSource = baseName.fragment || baseName;\r\n }\r\n var processorOptions = {\r\n defines: this.defines.split(\"\\n\"),\r\n indexParameters: this._indexParameters,\r\n isFragment: false,\r\n shouldUseHighPrecisionShader: this._engine._shouldUseHighPrecisionShader,\r\n processor: this._engine._shaderProcessor,\r\n supportsUniformBuffers: this._engine.supportsUniformBuffers,\r\n shadersRepository: Effect.ShadersRepository,\r\n includesShadersStore: Effect.IncludesShadersStore,\r\n version: (this._engine.webGLVersion * 100).toString(),\r\n platformName: this._engine.webGLVersion >= 2 ? \"WEBGL2\" : \"WEBGL1\"\r\n };\r\n this._loadShader(vertexSource, \"Vertex\", \"\", function (vertexCode) {\r\n _this._loadShader(fragmentSource, \"Fragment\", \"Pixel\", function (fragmentCode) {\r\n ShaderProcessor.Process(vertexCode, processorOptions, function (migratedVertexCode) {\r\n processorOptions.isFragment = true;\r\n ShaderProcessor.Process(fragmentCode, processorOptions, function (migratedFragmentCode) {\r\n _this._useFinalCode(migratedVertexCode, migratedFragmentCode, baseName);\r\n });\r\n });\r\n });\r\n });\r\n }\r\n Object.defineProperty(Effect.prototype, \"onBindObservable\", {\r\n /**\r\n * Observable that will be called when effect is bound.\r\n */\r\n get: function () {\r\n if (!this._onBindObservable) {\r\n this._onBindObservable = new Observable();\r\n }\r\n return this._onBindObservable;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Effect.prototype._useFinalCode = function (migratedVertexCode, migratedFragmentCode, baseName) {\r\n if (baseName) {\r\n var vertex = baseName.vertexElement || baseName.vertex || baseName.spectorName || baseName;\r\n var fragment = baseName.fragmentElement || baseName.fragment || baseName.spectorName || baseName;\r\n this._vertexSourceCode = \"#define SHADER_NAME vertex:\" + vertex + \"\\n\" + migratedVertexCode;\r\n this._fragmentSourceCode = \"#define SHADER_NAME fragment:\" + fragment + \"\\n\" + migratedFragmentCode;\r\n }\r\n else {\r\n this._vertexSourceCode = migratedVertexCode;\r\n this._fragmentSourceCode = migratedFragmentCode;\r\n }\r\n this._prepareEffect();\r\n };\r\n Object.defineProperty(Effect.prototype, \"key\", {\r\n /**\r\n * Unique key for this effect\r\n */\r\n get: function () {\r\n return this._key;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * If the effect has been compiled and prepared.\r\n * @returns if the effect is compiled and prepared.\r\n */\r\n Effect.prototype.isReady = function () {\r\n try {\r\n return this._isReadyInternal();\r\n }\r\n catch (_a) {\r\n return false;\r\n }\r\n };\r\n Effect.prototype._isReadyInternal = function () {\r\n if (this._isReady) {\r\n return true;\r\n }\r\n if (this._pipelineContext) {\r\n return this._pipelineContext.isReady;\r\n }\r\n return false;\r\n };\r\n /**\r\n * The engine the effect was initialized with.\r\n * @returns the engine.\r\n */\r\n Effect.prototype.getEngine = function () {\r\n return this._engine;\r\n };\r\n /**\r\n * The pipeline context for this effect\r\n * @returns the associated pipeline context\r\n */\r\n Effect.prototype.getPipelineContext = function () {\r\n return this._pipelineContext;\r\n };\r\n /**\r\n * The set of names of attribute variables for the shader.\r\n * @returns An array of attribute names.\r\n */\r\n Effect.prototype.getAttributesNames = function () {\r\n return this._attributesNames;\r\n };\r\n /**\r\n * Returns the attribute at the given index.\r\n * @param index The index of the attribute.\r\n * @returns The location of the attribute.\r\n */\r\n Effect.prototype.getAttributeLocation = function (index) {\r\n return this._attributes[index];\r\n };\r\n /**\r\n * Returns the attribute based on the name of the variable.\r\n * @param name of the attribute to look up.\r\n * @returns the attribute location.\r\n */\r\n Effect.prototype.getAttributeLocationByName = function (name) {\r\n var index = this._attributesNames.indexOf(name);\r\n return this._attributes[index];\r\n };\r\n /**\r\n * The number of attributes.\r\n * @returns the numnber of attributes.\r\n */\r\n Effect.prototype.getAttributesCount = function () {\r\n return this._attributes.length;\r\n };\r\n /**\r\n * Gets the index of a uniform variable.\r\n * @param uniformName of the uniform to look up.\r\n * @returns the index.\r\n */\r\n Effect.prototype.getUniformIndex = function (uniformName) {\r\n return this._uniformsNames.indexOf(uniformName);\r\n };\r\n /**\r\n * Returns the attribute based on the name of the variable.\r\n * @param uniformName of the uniform to look up.\r\n * @returns the location of the uniform.\r\n */\r\n Effect.prototype.getUniform = function (uniformName) {\r\n return this._uniforms[uniformName];\r\n };\r\n /**\r\n * Returns an array of sampler variable names\r\n * @returns The array of sampler variable neames.\r\n */\r\n Effect.prototype.getSamplers = function () {\r\n return this._samplerList;\r\n };\r\n /**\r\n * The error from the last compilation.\r\n * @returns the error string.\r\n */\r\n Effect.prototype.getCompilationError = function () {\r\n return this._compilationError;\r\n };\r\n /**\r\n * Gets a boolean indicating that all fallbacks were used during compilation\r\n * @returns true if all fallbacks were used\r\n */\r\n Effect.prototype.allFallbacksProcessed = function () {\r\n return this._allFallbacksProcessed;\r\n };\r\n /**\r\n * Adds a callback to the onCompiled observable and call the callback imediatly if already ready.\r\n * @param func The callback to be used.\r\n */\r\n Effect.prototype.executeWhenCompiled = function (func) {\r\n var _this = this;\r\n if (this.isReady()) {\r\n func(this);\r\n return;\r\n }\r\n this.onCompileObservable.add(function (effect) {\r\n func(effect);\r\n });\r\n if (!this._pipelineContext || this._pipelineContext.isAsync) {\r\n setTimeout(function () {\r\n _this._checkIsReady();\r\n }, 16);\r\n }\r\n };\r\n Effect.prototype._checkIsReady = function () {\r\n var _this = this;\r\n try {\r\n if (this._isReadyInternal()) {\r\n return;\r\n }\r\n }\r\n catch (e) {\r\n this._processCompilationErrors(e);\r\n return;\r\n }\r\n setTimeout(function () {\r\n _this._checkIsReady();\r\n }, 16);\r\n };\r\n Effect.prototype._loadShader = function (shader, key, optionalKey, callback) {\r\n if (typeof (HTMLElement) !== \"undefined\") {\r\n // DOM element ?\r\n if (shader instanceof HTMLElement) {\r\n var shaderCode = DomManagement.GetDOMTextContent(shader);\r\n callback(shaderCode);\r\n return;\r\n }\r\n }\r\n // Direct source ?\r\n if (shader.substr(0, 7) === \"source:\") {\r\n callback(shader.substr(7));\r\n return;\r\n }\r\n // Base64 encoded ?\r\n if (shader.substr(0, 7) === \"base64:\") {\r\n var shaderBinary = window.atob(shader.substr(7));\r\n callback(shaderBinary);\r\n return;\r\n }\r\n // Is in local store ?\r\n if (Effect.ShadersStore[shader + key + \"Shader\"]) {\r\n callback(Effect.ShadersStore[shader + key + \"Shader\"]);\r\n return;\r\n }\r\n if (optionalKey && Effect.ShadersStore[shader + optionalKey + \"Shader\"]) {\r\n callback(Effect.ShadersStore[shader + optionalKey + \"Shader\"]);\r\n return;\r\n }\r\n var shaderUrl;\r\n if (shader[0] === \".\" || shader[0] === \"/\" || shader.indexOf(\"http\") > -1) {\r\n shaderUrl = shader;\r\n }\r\n else {\r\n shaderUrl = Effect.ShadersRepository + shader;\r\n }\r\n // Vertex shader\r\n this._engine._loadFile(shaderUrl + \".\" + key.toLowerCase() + \".fx\", callback);\r\n };\r\n /**\r\n * Recompiles the webGL program\r\n * @param vertexSourceCode The source code for the vertex shader.\r\n * @param fragmentSourceCode The source code for the fragment shader.\r\n * @param onCompiled Callback called when completed.\r\n * @param onError Callback called on error.\r\n * @hidden\r\n */\r\n Effect.prototype._rebuildProgram = function (vertexSourceCode, fragmentSourceCode, onCompiled, onError) {\r\n var _this = this;\r\n this._isReady = false;\r\n this._vertexSourceCodeOverride = vertexSourceCode;\r\n this._fragmentSourceCodeOverride = fragmentSourceCode;\r\n this.onError = function (effect, error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n };\r\n this.onCompiled = function () {\r\n var scenes = _this.getEngine().scenes;\r\n for (var i = 0; i < scenes.length; i++) {\r\n scenes[i].markAllMaterialsAsDirty(31);\r\n }\r\n _this._pipelineContext._handlesSpectorRebuildCallback(onCompiled);\r\n };\r\n this._fallbacks = null;\r\n this._prepareEffect();\r\n };\r\n /**\r\n * Prepares the effect\r\n * @hidden\r\n */\r\n Effect.prototype._prepareEffect = function () {\r\n var _this = this;\r\n var attributesNames = this._attributesNames;\r\n var defines = this.defines;\r\n this._valueCache = {};\r\n var previousPipelineContext = this._pipelineContext;\r\n try {\r\n var engine_1 = this._engine;\r\n this._pipelineContext = engine_1.createPipelineContext();\r\n var rebuildRebind = this._rebuildProgram.bind(this);\r\n if (this._vertexSourceCodeOverride && this._fragmentSourceCodeOverride) {\r\n engine_1._preparePipelineContext(this._pipelineContext, this._vertexSourceCodeOverride, this._fragmentSourceCodeOverride, true, rebuildRebind, null, this._transformFeedbackVaryings);\r\n }\r\n else {\r\n engine_1._preparePipelineContext(this._pipelineContext, this._vertexSourceCode, this._fragmentSourceCode, false, rebuildRebind, defines, this._transformFeedbackVaryings);\r\n }\r\n engine_1._executeWhenRenderingStateIsCompiled(this._pipelineContext, function () {\r\n if (engine_1.supportsUniformBuffers) {\r\n for (var name in _this._uniformBuffersNames) {\r\n _this.bindUniformBlock(name, _this._uniformBuffersNames[name]);\r\n }\r\n }\r\n var uniforms = engine_1.getUniforms(_this._pipelineContext, _this._uniformsNames);\r\n uniforms.forEach(function (uniform, index) {\r\n _this._uniforms[_this._uniformsNames[index]] = uniform;\r\n });\r\n _this._attributes = engine_1.getAttributes(_this._pipelineContext, attributesNames);\r\n var index;\r\n for (index = 0; index < _this._samplerList.length; index++) {\r\n var sampler = _this.getUniform(_this._samplerList[index]);\r\n if (sampler == null) {\r\n _this._samplerList.splice(index, 1);\r\n index--;\r\n }\r\n }\r\n _this._samplerList.forEach(function (name, index) {\r\n _this._samplers[name] = index;\r\n });\r\n engine_1.bindSamplers(_this);\r\n _this._compilationError = \"\";\r\n _this._isReady = true;\r\n if (_this.onCompiled) {\r\n _this.onCompiled(_this);\r\n }\r\n _this.onCompileObservable.notifyObservers(_this);\r\n _this.onCompileObservable.clear();\r\n // Unbind mesh reference in fallbacks\r\n if (_this._fallbacks) {\r\n _this._fallbacks.unBindMesh();\r\n }\r\n if (previousPipelineContext) {\r\n _this.getEngine()._deletePipelineContext(previousPipelineContext);\r\n }\r\n });\r\n if (this._pipelineContext.isAsync) {\r\n this._checkIsReady();\r\n }\r\n }\r\n catch (e) {\r\n this._processCompilationErrors(e, previousPipelineContext);\r\n }\r\n };\r\n Effect.prototype._processCompilationErrors = function (e, previousPipelineContext) {\r\n if (previousPipelineContext === void 0) { previousPipelineContext = null; }\r\n this._compilationError = e.message;\r\n var attributesNames = this._attributesNames;\r\n var fallbacks = this._fallbacks;\r\n // Let's go through fallbacks then\r\n Logger.Error(\"Unable to compile effect:\");\r\n Logger.Error(\"Uniforms: \" + this._uniformsNames.map(function (uniform) {\r\n return \" \" + uniform;\r\n }));\r\n Logger.Error(\"Attributes: \" + attributesNames.map(function (attribute) {\r\n return \" \" + attribute;\r\n }));\r\n Logger.Error(\"Defines:\\r\\n\" + this.defines);\r\n Logger.Error(\"Error: \" + this._compilationError);\r\n if (previousPipelineContext) {\r\n this._pipelineContext = previousPipelineContext;\r\n this._isReady = true;\r\n if (this.onError) {\r\n this.onError(this, this._compilationError);\r\n }\r\n this.onErrorObservable.notifyObservers(this);\r\n }\r\n if (fallbacks) {\r\n this._pipelineContext = null;\r\n if (fallbacks.hasMoreFallbacks) {\r\n this._allFallbacksProcessed = false;\r\n Logger.Error(\"Trying next fallback.\");\r\n this.defines = fallbacks.reduce(this.defines, this);\r\n this._prepareEffect();\r\n }\r\n else { // Sorry we did everything we can\r\n this._allFallbacksProcessed = true;\r\n if (this.onError) {\r\n this.onError(this, this._compilationError);\r\n }\r\n this.onErrorObservable.notifyObservers(this);\r\n this.onErrorObservable.clear();\r\n // Unbind mesh reference in fallbacks\r\n if (this._fallbacks) {\r\n this._fallbacks.unBindMesh();\r\n }\r\n }\r\n }\r\n else {\r\n this._allFallbacksProcessed = true;\r\n }\r\n };\r\n Object.defineProperty(Effect.prototype, \"isSupported\", {\r\n /**\r\n * Checks if the effect is supported. (Must be called after compilation)\r\n */\r\n get: function () {\r\n return this._compilationError === \"\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Binds a texture to the engine to be used as output of the shader.\r\n * @param channel Name of the output variable.\r\n * @param texture Texture to bind.\r\n * @hidden\r\n */\r\n Effect.prototype._bindTexture = function (channel, texture) {\r\n this._engine._bindTexture(this._samplers[channel], texture);\r\n };\r\n /**\r\n * Sets a texture on the engine to be used in the shader.\r\n * @param channel Name of the sampler variable.\r\n * @param texture Texture to set.\r\n */\r\n Effect.prototype.setTexture = function (channel, texture) {\r\n this._engine.setTexture(this._samplers[channel], this._uniforms[channel], texture);\r\n };\r\n /**\r\n * Sets a depth stencil texture from a render target on the engine to be used in the shader.\r\n * @param channel Name of the sampler variable.\r\n * @param texture Texture to set.\r\n */\r\n Effect.prototype.setDepthStencilTexture = function (channel, texture) {\r\n this._engine.setDepthStencilTexture(this._samplers[channel], this._uniforms[channel], texture);\r\n };\r\n /**\r\n * Sets an array of textures on the engine to be used in the shader.\r\n * @param channel Name of the variable.\r\n * @param textures Textures to set.\r\n */\r\n Effect.prototype.setTextureArray = function (channel, textures) {\r\n var exName = channel + \"Ex\";\r\n if (this._samplerList.indexOf(exName + \"0\") === -1) {\r\n var initialPos = this._samplerList.indexOf(channel);\r\n for (var index = 1; index < textures.length; index++) {\r\n var currentExName = exName + (index - 1).toString();\r\n this._samplerList.splice(initialPos + index, 0, currentExName);\r\n }\r\n // Reset every channels\r\n var channelIndex = 0;\r\n for (var _i = 0, _a = this._samplerList; _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n this._samplers[key] = channelIndex;\r\n channelIndex += 1;\r\n }\r\n }\r\n this._engine.setTextureArray(this._samplers[channel], this._uniforms[channel], textures);\r\n };\r\n /**\r\n * Sets a texture to be the input of the specified post process. (To use the output, pass in the next post process in the pipeline)\r\n * @param channel Name of the sampler variable.\r\n * @param postProcess Post process to get the input texture from.\r\n */\r\n Effect.prototype.setTextureFromPostProcess = function (channel, postProcess) {\r\n this._engine.setTextureFromPostProcess(this._samplers[channel], postProcess);\r\n };\r\n /**\r\n * (Warning! setTextureFromPostProcessOutput may be desired instead)\r\n * Sets the input texture of the passed in post process to be input of this effect. (To use the output of the passed in post process use setTextureFromPostProcessOutput)\r\n * @param channel Name of the sampler variable.\r\n * @param postProcess Post process to get the output texture from.\r\n */\r\n Effect.prototype.setTextureFromPostProcessOutput = function (channel, postProcess) {\r\n this._engine.setTextureFromPostProcessOutput(this._samplers[channel], postProcess);\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheMatrix = function (uniformName, matrix) {\r\n var cache = this._valueCache[uniformName];\r\n var flag = matrix.updateFlag;\r\n if (cache !== undefined && cache === flag) {\r\n return false;\r\n }\r\n this._valueCache[uniformName] = flag;\r\n return true;\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheFloat2 = function (uniformName, x, y) {\r\n var cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n var changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n return changed;\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheFloat3 = function (uniformName, x, y, z) {\r\n var cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y, z];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n var changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n if (cache[2] !== z) {\r\n cache[2] = z;\r\n changed = true;\r\n }\r\n return changed;\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheFloat4 = function (uniformName, x, y, z, w) {\r\n var cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y, z, w];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n var changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n if (cache[2] !== z) {\r\n cache[2] = z;\r\n changed = true;\r\n }\r\n if (cache[3] !== w) {\r\n cache[3] = w;\r\n changed = true;\r\n }\r\n return changed;\r\n };\r\n /**\r\n * Binds a buffer to a uniform.\r\n * @param buffer Buffer to bind.\r\n * @param name Name of the uniform variable to bind to.\r\n */\r\n Effect.prototype.bindUniformBuffer = function (buffer, name) {\r\n var bufferName = this._uniformBuffersNames[name];\r\n if (bufferName === undefined || Effect._baseCache[bufferName] === buffer) {\r\n return;\r\n }\r\n Effect._baseCache[bufferName] = buffer;\r\n this._engine.bindUniformBufferBase(buffer, bufferName);\r\n };\r\n /**\r\n * Binds block to a uniform.\r\n * @param blockName Name of the block to bind.\r\n * @param index Index to bind.\r\n */\r\n Effect.prototype.bindUniformBlock = function (blockName, index) {\r\n this._engine.bindUniformBlock(this._pipelineContext, blockName, index);\r\n };\r\n /**\r\n * Sets an interger value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setInt = function (uniformName, value) {\r\n var cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = value;\r\n this._engine.setInt(this._uniforms[uniformName], value);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray2 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray2(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray3 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray3(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray4 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray4(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray2 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray2(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray3 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray3(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray4 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray4(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray2 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray2(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray3 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray3(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray4 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray4(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets matrices on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrices matrices to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrices = function (uniformName, matrices) {\r\n if (!matrices) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrices(this._uniforms[uniformName], matrices);\r\n return this;\r\n };\r\n /**\r\n * Sets matrix on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrix = function (uniformName, matrix) {\r\n if (this._cacheMatrix(uniformName, matrix)) {\r\n this._engine.setMatrices(this._uniforms[uniformName], matrix.toArray());\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a 3x3 matrix on a uniform variable. (Speicified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrix3x3 = function (uniformName, matrix) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrix3x3(this._uniforms[uniformName], matrix);\r\n return this;\r\n };\r\n /**\r\n * Sets a 2x2 matrix on a uniform variable. (Speicified as [1,2,3,4] will result in [1,2][3,4] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrix2x2 = function (uniformName, matrix) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrix2x2(this._uniforms[uniformName], matrix);\r\n return this;\r\n };\r\n /**\r\n * Sets a float on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat = function (uniformName, value) {\r\n var cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = value;\r\n this._engine.setFloat(this._uniforms[uniformName], value);\r\n return this;\r\n };\r\n /**\r\n * Sets a boolean on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param bool value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setBool = function (uniformName, bool) {\r\n var cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === bool) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = bool;\r\n this._engine.setInt(this._uniforms[uniformName], bool ? 1 : 0);\r\n return this;\r\n };\r\n /**\r\n * Sets a Vector2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector2 vector2 to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setVector2 = function (uniformName, vector2) {\r\n if (this._cacheFloat2(uniformName, vector2.x, vector2.y)) {\r\n this._engine.setFloat2(this._uniforms[uniformName], vector2.x, vector2.y);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a float2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float2.\r\n * @param y Second float in float2.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat2 = function (uniformName, x, y) {\r\n if (this._cacheFloat2(uniformName, x, y)) {\r\n this._engine.setFloat2(this._uniforms[uniformName], x, y);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Vector3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector3 Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setVector3 = function (uniformName, vector3) {\r\n if (this._cacheFloat3(uniformName, vector3.x, vector3.y, vector3.z)) {\r\n this._engine.setFloat3(this._uniforms[uniformName], vector3.x, vector3.y, vector3.z);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a float3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float3.\r\n * @param y Second float in float3.\r\n * @param z Third float in float3.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat3 = function (uniformName, x, y, z) {\r\n if (this._cacheFloat3(uniformName, x, y, z)) {\r\n this._engine.setFloat3(this._uniforms[uniformName], x, y, z);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Vector4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector4 Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setVector4 = function (uniformName, vector4) {\r\n if (this._cacheFloat4(uniformName, vector4.x, vector4.y, vector4.z, vector4.w)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], vector4.x, vector4.y, vector4.z, vector4.w);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a float4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float4.\r\n * @param y Second float in float4.\r\n * @param z Third float in float4.\r\n * @param w Fourth float in float4.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat4 = function (uniformName, x, y, z, w) {\r\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], x, y, z, w);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Color3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setColor3 = function (uniformName, color3) {\r\n if (this._cacheFloat3(uniformName, color3.r, color3.g, color3.b)) {\r\n this._engine.setFloat3(this._uniforms[uniformName], color3.r, color3.g, color3.b);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Color4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n * @param alpha Alpha value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setColor4 = function (uniformName, color3, alpha) {\r\n if (this._cacheFloat4(uniformName, color3.r, color3.g, color3.b, alpha)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], color3.r, color3.g, color3.b, alpha);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Color4 on a uniform variable\r\n * @param uniformName defines the name of the variable\r\n * @param color4 defines the value to be set\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setDirectColor4 = function (uniformName, color4) {\r\n if (this._cacheFloat4(uniformName, color4.r, color4.g, color4.b, color4.a)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], color4.r, color4.g, color4.b, color4.a);\r\n }\r\n return this;\r\n };\r\n /** Release all associated resources */\r\n Effect.prototype.dispose = function () {\r\n this._engine._releaseEffect(this);\r\n };\r\n /**\r\n * This function will add a new shader to the shader store\r\n * @param name the name of the shader\r\n * @param pixelShader optional pixel shader content\r\n * @param vertexShader optional vertex shader content\r\n */\r\n Effect.RegisterShader = function (name, pixelShader, vertexShader) {\r\n if (pixelShader) {\r\n Effect.ShadersStore[name + \"PixelShader\"] = pixelShader;\r\n }\r\n if (vertexShader) {\r\n Effect.ShadersStore[name + \"VertexShader\"] = vertexShader;\r\n }\r\n };\r\n /**\r\n * Resets the cache of effects.\r\n */\r\n Effect.ResetCache = function () {\r\n Effect._baseCache = {};\r\n };\r\n /**\r\n * Gets or sets the relative url used to load shaders if using the engine in non-minified mode\r\n */\r\n Effect.ShadersRepository = \"src/Shaders/\";\r\n Effect._uniqueIdSeed = 0;\r\n Effect._baseCache = {};\r\n /**\r\n * Store of each shader (The can be looked up using effect.key)\r\n */\r\n Effect.ShadersStore = {};\r\n /**\r\n * Store of each included file for a shader (The can be looked up using effect.key)\r\n */\r\n Effect.IncludesShadersStore = {};\r\n return Effect;\r\n}());\r\nexport { Effect };\r\n//# sourceMappingURL=effect.js.map"
  1743. },
  1744. {
  1745. "id": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1746. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  1747. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1748. "index": 31,
  1749. "index2": 30,
  1750. "size": 685,
  1751. "cacheable": true,
  1752. "built": true,
  1753. "optional": false,
  1754. "prefetched": false,
  1755. "chunks": [
  1756. "thinEngineOnly"
  1757. ],
  1758. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1759. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1760. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1761. "issuerPath": [
  1762. {
  1763. "id": "./thinEngineOnly.ts",
  1764. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1765. "name": "./thinEngineOnly.ts",
  1766. "profile": {
  1767. "factory": 25,
  1768. "building": 1793
  1769. }
  1770. },
  1771. {
  1772. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1773. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1774. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1775. "profile": {
  1776. "factory": 10,
  1777. "building": 63
  1778. }
  1779. }
  1780. ],
  1781. "profile": {
  1782. "factory": 6,
  1783. "building": 38,
  1784. "dependencies": 28
  1785. },
  1786. "failed": false,
  1787. "errors": 0,
  1788. "warnings": 0,
  1789. "assets": [],
  1790. "reasons": [
  1791. {
  1792. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1793. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1794. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1795. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1796. "type": "harmony side effect evaluation",
  1797. "userRequest": "../Meshes/WebGL/webGLDataBuffer",
  1798. "loc": "12:0-66"
  1799. },
  1800. {
  1801. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1802. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1803. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1804. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1805. "type": "harmony import specifier",
  1806. "userRequest": "../Meshes/WebGL/webGLDataBuffer",
  1807. "loc": "1126:29-44"
  1808. },
  1809. {
  1810. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1811. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1812. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1813. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1814. "type": "harmony import specifier",
  1815. "userRequest": "../Meshes/WebGL/webGLDataBuffer",
  1816. "loc": "1158:29-44"
  1817. }
  1818. ],
  1819. "providedExports": [
  1820. "WebGLDataBuffer"
  1821. ],
  1822. "optimizationBailout": [],
  1823. "depth": 2,
  1824. "source": "import { __extends } from \"tslib\";\r\nimport { DataBuffer } from '../dataBuffer';\r\n/** @hidden */\r\nvar WebGLDataBuffer = /** @class */ (function (_super) {\r\n __extends(WebGLDataBuffer, _super);\r\n function WebGLDataBuffer(resource) {\r\n var _this = _super.call(this) || this;\r\n _this._buffer = resource;\r\n return _this;\r\n }\r\n Object.defineProperty(WebGLDataBuffer.prototype, \"underlyingResource\", {\r\n get: function () {\r\n return this._buffer;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return WebGLDataBuffer;\r\n}(DataBuffer));\r\nexport { WebGLDataBuffer };\r\n//# sourceMappingURL=webGLDataBuffer.js.map"
  1825. },
  1826. {
  1827. "id": "../../.temp/packageES6Dev/core/Meshes/dataBuffer.js",
  1828. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\dataBuffer.js",
  1829. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/dataBuffer.js",
  1830. "index": 32,
  1831. "index2": 29,
  1832. "size": 866,
  1833. "cacheable": true,
  1834. "built": true,
  1835. "optional": false,
  1836. "prefetched": false,
  1837. "chunks": [
  1838. "thinEngineOnly"
  1839. ],
  1840. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  1841. "issuerId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1842. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1843. "issuerPath": [
  1844. {
  1845. "id": "./thinEngineOnly.ts",
  1846. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1847. "name": "./thinEngineOnly.ts",
  1848. "profile": {
  1849. "factory": 25,
  1850. "building": 1793
  1851. }
  1852. },
  1853. {
  1854. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1855. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1856. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1857. "profile": {
  1858. "factory": 10,
  1859. "building": 63
  1860. }
  1861. },
  1862. {
  1863. "id": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1864. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  1865. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1866. "profile": {
  1867. "factory": 6,
  1868. "building": 38,
  1869. "dependencies": 28
  1870. }
  1871. }
  1872. ],
  1873. "profile": {
  1874. "factory": 28,
  1875. "building": 7
  1876. },
  1877. "failed": false,
  1878. "errors": 0,
  1879. "warnings": 0,
  1880. "assets": [],
  1881. "reasons": [
  1882. {
  1883. "moduleId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1884. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  1885. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1886. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1887. "type": "harmony side effect evaluation",
  1888. "userRequest": "../dataBuffer",
  1889. "loc": "2:0-43"
  1890. },
  1891. {
  1892. "moduleId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1893. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  1894. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1895. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  1896. "type": "harmony import specifier",
  1897. "userRequest": "../dataBuffer",
  1898. "loc": "19:2-12"
  1899. }
  1900. ],
  1901. "providedExports": [
  1902. "DataBuffer"
  1903. ],
  1904. "optimizationBailout": [],
  1905. "depth": 3,
  1906. "source": "/**\r\n * Class used to store gfx data (like WebGLBuffer)\r\n */\r\nvar DataBuffer = /** @class */ (function () {\r\n function DataBuffer() {\r\n /**\r\n * Gets or sets the number of objects referencing this buffer\r\n */\r\n this.references = 0;\r\n /** Gets or sets the size of the underlying buffer */\r\n this.capacity = 0;\r\n /**\r\n * Gets or sets a boolean indicating if the buffer contains 32bits indices\r\n */\r\n this.is32Bits = false;\r\n }\r\n Object.defineProperty(DataBuffer.prototype, \"underlyingResource\", {\r\n /**\r\n * Gets the underlying buffer\r\n */\r\n get: function () {\r\n return null;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return DataBuffer;\r\n}());\r\nexport { DataBuffer };\r\n//# sourceMappingURL=dataBuffer.js.map"
  1907. },
  1908. {
  1909. "id": "../../.temp/packageES6Dev/core/Misc/baseError.js",
  1910. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\baseError.js",
  1911. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/baseError.js",
  1912. "index": 23,
  1913. "index2": 18,
  1914. "size": 847,
  1915. "cacheable": true,
  1916. "built": true,
  1917. "optional": false,
  1918. "prefetched": false,
  1919. "chunks": [
  1920. "thinEngineOnly"
  1921. ],
  1922. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  1923. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  1924. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  1925. "issuerPath": [
  1926. {
  1927. "id": "./thinEngineOnly.ts",
  1928. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  1929. "name": "./thinEngineOnly.ts",
  1930. "profile": {
  1931. "factory": 25,
  1932. "building": 1793
  1933. }
  1934. },
  1935. {
  1936. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  1937. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  1938. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  1939. "profile": {
  1940. "factory": 10,
  1941. "building": 63
  1942. }
  1943. },
  1944. {
  1945. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  1946. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  1947. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  1948. "profile": {
  1949. "factory": 6,
  1950. "building": 38,
  1951. "dependencies": 28
  1952. }
  1953. }
  1954. ],
  1955. "profile": {
  1956. "factory": 33,
  1957. "building": 7,
  1958. "dependencies": 10
  1959. },
  1960. "failed": false,
  1961. "errors": 0,
  1962. "warnings": 0,
  1963. "assets": [],
  1964. "reasons": [
  1965. {
  1966. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  1967. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  1968. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  1969. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  1970. "type": "harmony side effect evaluation",
  1971. "userRequest": "./baseError",
  1972. "loc": "7:0-40"
  1973. },
  1974. {
  1975. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  1976. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  1977. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  1978. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  1979. "type": "harmony import specifier",
  1980. "userRequest": "./baseError",
  1981. "loc": "21:8-17"
  1982. },
  1983. {
  1984. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  1985. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  1986. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  1987. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  1988. "type": "harmony import specifier",
  1989. "userRequest": "./baseError",
  1990. "loc": "31:2-11"
  1991. },
  1992. {
  1993. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  1994. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  1995. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  1996. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  1997. "type": "harmony import specifier",
  1998. "userRequest": "./baseError",
  1999. "loc": "45:8-17"
  2000. },
  2001. {
  2002. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2003. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2004. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2005. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2006. "type": "harmony import specifier",
  2007. "userRequest": "./baseError",
  2008. "loc": "49:2-11"
  2009. },
  2010. {
  2011. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2012. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2013. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2014. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2015. "type": "harmony import specifier",
  2016. "userRequest": "./baseError",
  2017. "loc": "63:8-17"
  2018. },
  2019. {
  2020. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2021. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2022. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2023. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2024. "type": "harmony import specifier",
  2025. "userRequest": "./baseError",
  2026. "loc": "67:2-11"
  2027. }
  2028. ],
  2029. "providedExports": [
  2030. "BaseError"
  2031. ],
  2032. "optimizationBailout": [],
  2033. "depth": 3,
  2034. "source": "import { __extends } from \"tslib\";\r\n/**\r\n * @ignore\r\n * Application error to support additional information when loading a file\r\n */\r\nvar BaseError = /** @class */ (function (_super) {\r\n __extends(BaseError, _super);\r\n function BaseError() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n // See https://stackoverflow.com/questions/12915412/how-do-i-extend-a-host-object-e-g-error-in-typescript\r\n // and https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work\r\n // Polyfill for Object.setPrototypeOf if necessary.\r\n BaseError._setPrototypeOf = Object.setPrototypeOf || (function (o, proto) { o.__proto__ = proto; return o; });\r\n return BaseError;\r\n}(Error));\r\nexport { BaseError };\r\n//# sourceMappingURL=baseError.js.map"
  2035. },
  2036. {
  2037. "id": "../../.temp/packageES6Dev/core/Misc/canvasGenerator.js",
  2038. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\canvasGenerator.js",
  2039. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/canvasGenerator.js",
  2040. "index": 34,
  2041. "index2": 32,
  2042. "size": 845,
  2043. "cacheable": true,
  2044. "built": true,
  2045. "optional": false,
  2046. "prefetched": false,
  2047. "chunks": [
  2048. "thinEngineOnly"
  2049. ],
  2050. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2051. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2052. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2053. "issuerPath": [
  2054. {
  2055. "id": "./thinEngineOnly.ts",
  2056. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  2057. "name": "./thinEngineOnly.ts",
  2058. "profile": {
  2059. "factory": 25,
  2060. "building": 1793
  2061. }
  2062. },
  2063. {
  2064. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2065. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2066. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2067. "profile": {
  2068. "factory": 10,
  2069. "building": 63
  2070. }
  2071. }
  2072. ],
  2073. "profile": {
  2074. "factory": 6,
  2075. "building": 38,
  2076. "dependencies": 28
  2077. },
  2078. "failed": false,
  2079. "errors": 0,
  2080. "warnings": 0,
  2081. "assets": [],
  2082. "reasons": [
  2083. {
  2084. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2085. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2086. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2087. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2088. "type": "harmony side effect evaluation",
  2089. "userRequest": "../Misc/canvasGenerator",
  2090. "loc": "15:0-58"
  2091. },
  2092. {
  2093. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2094. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2095. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2096. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2097. "type": "harmony import specifier",
  2098. "userRequest": "../Misc/canvasGenerator",
  2099. "loc": "731:30-45"
  2100. },
  2101. {
  2102. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2103. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2104. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2105. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2106. "type": "harmony import specifier",
  2107. "userRequest": "../Misc/canvasGenerator",
  2108. "loc": "3408:29-44"
  2109. }
  2110. ],
  2111. "providedExports": [
  2112. "CanvasGenerator"
  2113. ],
  2114. "optimizationBailout": [],
  2115. "depth": 2,
  2116. "source": "/**\r\n * Helper class used to generate a canvas to manipulate images\r\n */\r\nvar CanvasGenerator = /** @class */ (function () {\r\n function CanvasGenerator() {\r\n }\r\n /**\r\n * Create a new canvas (or offscreen canvas depending on the context)\r\n * @param width defines the expected width\r\n * @param height defines the expected height\r\n * @return a new canvas or offscreen canvas\r\n */\r\n CanvasGenerator.CreateCanvas = function (width, height) {\r\n if (typeof document === \"undefined\") {\r\n return new OffscreenCanvas(width, height);\r\n }\r\n var canvas = document.createElement(\"canvas\");\r\n canvas.width = width;\r\n canvas.height = height;\r\n return canvas;\r\n };\r\n return CanvasGenerator;\r\n}());\r\nexport { CanvasGenerator };\r\n//# sourceMappingURL=canvasGenerator.js.map"
  2117. },
  2118. {
  2119. "id": "../../.temp/packageES6Dev/core/Misc/devTools.js",
  2120. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\devTools.js",
  2121. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/devTools.js",
  2122. "index": 24,
  2123. "index2": 22,
  2124. "size": 347,
  2125. "cacheable": true,
  2126. "built": true,
  2127. "optional": false,
  2128. "prefetched": false,
  2129. "chunks": [
  2130. "thinEngineOnly"
  2131. ],
  2132. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2133. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2134. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2135. "issuerPath": [
  2136. {
  2137. "id": "./thinEngineOnly.ts",
  2138. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  2139. "name": "./thinEngineOnly.ts",
  2140. "profile": {
  2141. "factory": 25,
  2142. "building": 1793
  2143. }
  2144. },
  2145. {
  2146. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2147. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2148. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2149. "profile": {
  2150. "factory": 10,
  2151. "building": 63
  2152. }
  2153. }
  2154. ],
  2155. "profile": {
  2156. "factory": 6,
  2157. "building": 38,
  2158. "dependencies": 28
  2159. },
  2160. "failed": false,
  2161. "errors": 0,
  2162. "warnings": 0,
  2163. "assets": [],
  2164. "reasons": [
  2165. {
  2166. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2167. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2168. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2169. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2170. "type": "harmony side effect evaluation",
  2171. "userRequest": "../Misc/devTools",
  2172. "loc": "3:0-45"
  2173. },
  2174. {
  2175. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2176. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2177. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2178. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2179. "type": "harmony import specifier",
  2180. "userRequest": "../Misc/devTools",
  2181. "loc": "2411:14-23"
  2182. },
  2183. {
  2184. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2185. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2186. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2187. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2188. "type": "harmony import specifier",
  2189. "userRequest": "../Misc/devTools",
  2190. "loc": "2427:14-23"
  2191. },
  2192. {
  2193. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2194. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2195. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2196. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2197. "type": "harmony import specifier",
  2198. "userRequest": "../Misc/devTools",
  2199. "loc": "2446:14-23"
  2200. },
  2201. {
  2202. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2203. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  2204. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2205. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2206. "type": "harmony side effect evaluation",
  2207. "userRequest": "../../Misc/devTools",
  2208. "loc": "3:0-48"
  2209. },
  2210. {
  2211. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2212. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  2213. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2214. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2215. "type": "harmony import specifier",
  2216. "userRequest": "../../Misc/devTools",
  2217. "loc": "430:14-23"
  2218. }
  2219. ],
  2220. "providedExports": [
  2221. "_DevTools"
  2222. ],
  2223. "optimizationBailout": [],
  2224. "depth": 2,
  2225. "source": "/** @hidden */\r\nvar _DevTools = /** @class */ (function () {\r\n function _DevTools() {\r\n }\r\n _DevTools.WarnImport = function (name) {\r\n return name + \" needs to be imported before as it contains a side-effect required by your code.\";\r\n };\r\n return _DevTools;\r\n}());\r\nexport { _DevTools };\r\n//# sourceMappingURL=devTools.js.map"
  2226. },
  2227. {
  2228. "id": "../../.temp/packageES6Dev/core/Misc/domManagement.js",
  2229. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\domManagement.js",
  2230. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/domManagement.js",
  2231. "index": 5,
  2232. "index2": 2,
  2233. "size": 1249,
  2234. "cacheable": true,
  2235. "built": true,
  2236. "optional": false,
  2237. "prefetched": false,
  2238. "chunks": [
  2239. "thinEngineOnly"
  2240. ],
  2241. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2242. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2243. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2244. "issuerPath": [
  2245. {
  2246. "id": "./thinEngineOnly.ts",
  2247. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  2248. "name": "./thinEngineOnly.ts",
  2249. "profile": {
  2250. "factory": 25,
  2251. "building": 1793
  2252. }
  2253. },
  2254. {
  2255. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2256. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2257. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2258. "profile": {
  2259. "factory": 10,
  2260. "building": 63
  2261. }
  2262. }
  2263. ],
  2264. "profile": {
  2265. "factory": 6,
  2266. "building": 38,
  2267. "dependencies": 28
  2268. },
  2269. "failed": false,
  2270. "errors": 0,
  2271. "warnings": 0,
  2272. "assets": [],
  2273. "reasons": [
  2274. {
  2275. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2276. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2277. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2278. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2279. "type": "harmony side effect evaluation",
  2280. "userRequest": "../Misc/domManagement",
  2281. "loc": "10:0-54"
  2282. },
  2283. {
  2284. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2285. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2286. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2287. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2288. "type": "harmony import specifier",
  2289. "userRequest": "../Misc/domManagement",
  2290. "loc": "284:31-44"
  2291. },
  2292. {
  2293. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2294. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2295. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2296. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2297. "type": "harmony import specifier",
  2298. "userRequest": "../Misc/domManagement",
  2299. "loc": "844:13-26"
  2300. },
  2301. {
  2302. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2303. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2304. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2305. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2306. "type": "harmony import specifier",
  2307. "userRequest": "../Misc/domManagement",
  2308. "loc": "970:12-25"
  2309. },
  2310. {
  2311. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2312. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2313. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2314. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2315. "type": "harmony import specifier",
  2316. "userRequest": "../Misc/domManagement",
  2317. "loc": "3020:12-25"
  2318. },
  2319. {
  2320. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2321. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2322. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2323. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2324. "type": "harmony import specifier",
  2325. "userRequest": "../Misc/domManagement",
  2326. "loc": "3485:13-26"
  2327. },
  2328. {
  2329. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2330. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2331. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2332. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2333. "type": "harmony side effect evaluation",
  2334. "userRequest": "../Misc/domManagement",
  2335. "loc": "2:0-54"
  2336. },
  2337. {
  2338. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2339. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2340. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2341. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2342. "type": "harmony import specifier",
  2343. "userRequest": "../Misc/domManagement",
  2344. "loc": "347:33-46"
  2345. },
  2346. {
  2347. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2348. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2349. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2350. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2351. "type": "harmony side effect evaluation",
  2352. "userRequest": "./domManagement",
  2353. "loc": "3:0-48"
  2354. },
  2355. {
  2356. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2357. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2358. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2359. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2360. "type": "harmony import specifier",
  2361. "userRequest": "./domManagement",
  2362. "loc": "334:106-119"
  2363. }
  2364. ],
  2365. "providedExports": [
  2366. "DomManagement"
  2367. ],
  2368. "optimizationBailout": [],
  2369. "depth": 2,
  2370. "source": "/**\r\n * Sets of helpers dealing with the DOM and some of the recurrent functions needed in\r\n * Babylon.js\r\n */\r\nvar DomManagement = /** @class */ (function () {\r\n function DomManagement() {\r\n }\r\n /**\r\n * Checks if the window object exists\r\n * @returns true if the window object exists\r\n */\r\n DomManagement.IsWindowObjectExist = function () {\r\n return (typeof window) !== \"undefined\";\r\n };\r\n /**\r\n * Checks if the navigator object exists\r\n * @returns true if the navigator object exists\r\n */\r\n DomManagement.IsNavigatorAvailable = function () {\r\n return (typeof navigator) !== \"undefined\";\r\n };\r\n /**\r\n * Extracts text content from a DOM element hierarchy\r\n * @param element defines the root element\r\n * @returns a string\r\n */\r\n DomManagement.GetDOMTextContent = function (element) {\r\n var result = \"\";\r\n var child = element.firstChild;\r\n while (child) {\r\n if (child.nodeType === 3) {\r\n result += child.textContent;\r\n }\r\n child = (child.nextSibling);\r\n }\r\n return result;\r\n };\r\n return DomManagement;\r\n}());\r\nexport { DomManagement };\r\n//# sourceMappingURL=domManagement.js.map"
  2371. },
  2372. {
  2373. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2374. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2375. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2376. "index": 19,
  2377. "index2": 19,
  2378. "size": 17892,
  2379. "cacheable": true,
  2380. "built": true,
  2381. "optional": false,
  2382. "prefetched": false,
  2383. "chunks": [
  2384. "thinEngineOnly"
  2385. ],
  2386. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2387. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2388. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2389. "issuerPath": [
  2390. {
  2391. "id": "./thinEngineOnly.ts",
  2392. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  2393. "name": "./thinEngineOnly.ts",
  2394. "profile": {
  2395. "factory": 25,
  2396. "building": 1793
  2397. }
  2398. },
  2399. {
  2400. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2401. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2402. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2403. "profile": {
  2404. "factory": 10,
  2405. "building": 63
  2406. }
  2407. }
  2408. ],
  2409. "profile": {
  2410. "factory": 6,
  2411. "building": 38,
  2412. "dependencies": 28
  2413. },
  2414. "failed": false,
  2415. "errors": 0,
  2416. "warnings": 0,
  2417. "assets": [],
  2418. "reasons": [
  2419. {
  2420. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  2421. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  2422. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  2423. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  2424. "type": "harmony side effect evaluation",
  2425. "userRequest": "../../Misc/fileTools",
  2426. "loc": "9:0-49"
  2427. },
  2428. {
  2429. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  2430. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  2431. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  2432. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  2433. "type": "harmony import specifier",
  2434. "userRequest": "../../Misc/fileTools",
  2435. "loc": "284:16-25"
  2436. },
  2437. {
  2438. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2439. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2440. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2441. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2442. "type": "harmony side effect evaluation",
  2443. "userRequest": "../Misc/fileTools",
  2444. "loc": "14:0-46"
  2445. },
  2446. {
  2447. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2448. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2449. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2450. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2451. "type": "harmony import specifier",
  2452. "userRequest": "../Misc/fileTools",
  2453. "loc": "2378:20-29"
  2454. },
  2455. {
  2456. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2457. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2458. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2459. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2460. "type": "harmony import specifier",
  2461. "userRequest": "../Misc/fileTools",
  2462. "loc": "2382:16-25"
  2463. },
  2464. {
  2465. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2466. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2467. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2468. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2469. "type": "harmony import specifier",
  2470. "userRequest": "../Misc/fileTools",
  2471. "loc": "3393:22-31"
  2472. }
  2473. ],
  2474. "providedExports": [
  2475. "LoadFileError",
  2476. "RequestFileError",
  2477. "ReadFileError",
  2478. "FileTools"
  2479. ],
  2480. "optimizationBailout": [],
  2481. "depth": 2,
  2482. "source": "import { __extends } from \"tslib\";\r\nimport { WebRequest } from './webRequest';\r\nimport { DomManagement } from './domManagement';\r\nimport { Observable } from './observable';\r\nimport { FilesInputStore } from './filesInputStore';\r\nimport { RetryStrategy } from './retryStrategy';\r\nimport { BaseError } from './baseError';\r\nimport { StringTools } from './stringTools';\r\n/** @ignore */\r\nvar LoadFileError = /** @class */ (function (_super) {\r\n __extends(LoadFileError, _super);\r\n /**\r\n * Creates a new LoadFileError\r\n * @param message defines the message of the error\r\n * @param request defines the optional web request\r\n * @param file defines the optional file\r\n */\r\n function LoadFileError(message, object) {\r\n var _this = _super.call(this, message) || this;\r\n _this.name = \"LoadFileError\";\r\n BaseError._setPrototypeOf(_this, LoadFileError.prototype);\r\n if (object instanceof WebRequest) {\r\n _this.request = object;\r\n }\r\n else {\r\n _this.file = object;\r\n }\r\n return _this;\r\n }\r\n return LoadFileError;\r\n}(BaseError));\r\nexport { LoadFileError };\r\n/** @ignore */\r\nvar RequestFileError = /** @class */ (function (_super) {\r\n __extends(RequestFileError, _super);\r\n /**\r\n * Creates a new LoadFileError\r\n * @param message defines the message of the error\r\n * @param request defines the optional web request\r\n */\r\n function RequestFileError(message, request) {\r\n var _this = _super.call(this, message) || this;\r\n _this.request = request;\r\n _this.name = \"RequestFileError\";\r\n BaseError._setPrototypeOf(_this, RequestFileError.prototype);\r\n return _this;\r\n }\r\n return RequestFileError;\r\n}(BaseError));\r\nexport { RequestFileError };\r\n/** @ignore */\r\nvar ReadFileError = /** @class */ (function (_super) {\r\n __extends(ReadFileError, _super);\r\n /**\r\n * Creates a new ReadFileError\r\n * @param message defines the message of the error\r\n * @param file defines the optional file\r\n */\r\n function ReadFileError(message, file) {\r\n var _this = _super.call(this, message) || this;\r\n _this.file = file;\r\n _this.name = \"ReadFileError\";\r\n BaseError._setPrototypeOf(_this, ReadFileError.prototype);\r\n return _this;\r\n }\r\n return ReadFileError;\r\n}(BaseError));\r\nexport { ReadFileError };\r\n/**\r\n * @hidden\r\n */\r\nvar FileTools = /** @class */ (function () {\r\n function FileTools() {\r\n }\r\n /**\r\n * Removes unwanted characters from an url\r\n * @param url defines the url to clean\r\n * @returns the cleaned url\r\n */\r\n FileTools._CleanUrl = function (url) {\r\n url = url.replace(/#/mg, \"%23\");\r\n return url;\r\n };\r\n /**\r\n * Sets the cors behavior on a dom element. This will add the required Tools.CorsBehavior to the element.\r\n * @param url define the url we are trying\r\n * @param element define the dom element where to configure the cors policy\r\n */\r\n FileTools.SetCorsBehavior = function (url, element) {\r\n if (url && url.indexOf(\"data:\") === 0) {\r\n return;\r\n }\r\n if (this.CorsBehavior) {\r\n if (typeof (this.CorsBehavior) === 'string' || this.CorsBehavior instanceof String) {\r\n element.crossOrigin = this.CorsBehavior;\r\n }\r\n else {\r\n var result = this.CorsBehavior(url);\r\n if (result) {\r\n element.crossOrigin = result;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Loads an image as an HTMLImageElement.\r\n * @param input url string, ArrayBuffer, or Blob to load\r\n * @param onLoad callback called when the image successfully loads\r\n * @param onError callback called when the image fails to load\r\n * @param offlineProvider offline provider for caching\r\n * @param mimeType optional mime type\r\n * @returns the HTMLImageElement of the loaded image\r\n */\r\n FileTools.LoadImage = function (input, onLoad, onError, offlineProvider, mimeType) {\r\n var url;\r\n var usingObjectURL = false;\r\n if (input instanceof ArrayBuffer || ArrayBuffer.isView(input)) {\r\n if (typeof Blob !== 'undefined') {\r\n url = URL.createObjectURL(new Blob([input]));\r\n usingObjectURL = true;\r\n }\r\n else {\r\n url = \"data:\" + (mimeType || \"image/jpg\") + \";base64,\" + StringTools.EncodeArrayBufferToBase64(input);\r\n }\r\n }\r\n else if (input instanceof Blob) {\r\n url = URL.createObjectURL(input);\r\n usingObjectURL = true;\r\n }\r\n else {\r\n url = this._CleanUrl(input);\r\n url = this.PreprocessUrl(input);\r\n }\r\n if (typeof Image === \"undefined\") {\r\n this.LoadFile(url, function (data) {\r\n createImageBitmap(new Blob([data])).then(function (imgBmp) {\r\n onLoad(imgBmp);\r\n if (usingObjectURL) {\r\n URL.revokeObjectURL(url);\r\n }\r\n }).catch(function (reason) {\r\n if (onError) {\r\n onError(\"Error while trying to load image: \" + input, reason);\r\n }\r\n });\r\n }, undefined, offlineProvider || undefined, true, function (request, exception) {\r\n if (onError) {\r\n onError(\"Error while trying to load image: \" + input, exception);\r\n }\r\n });\r\n return null;\r\n }\r\n var img = new Image();\r\n this.SetCorsBehavior(url, img);\r\n var loadHandler = function () {\r\n img.removeEventListener(\"load\", loadHandler);\r\n img.removeEventListener(\"error\", errorHandler);\r\n onLoad(img);\r\n // Must revoke the URL after calling onLoad to avoid security exceptions in\r\n // certain scenarios (e.g. when hosted in vscode).\r\n if (usingObjectURL && img.src) {\r\n URL.revokeObjectURL(img.src);\r\n }\r\n };\r\n var errorHandler = function (err) {\r\n img.removeEventListener(\"load\", loadHandler);\r\n img.removeEventListener(\"error\", errorHandler);\r\n if (onError) {\r\n onError(\"Error while trying to load image: \" + input, err);\r\n }\r\n if (usingObjectURL && img.src) {\r\n URL.revokeObjectURL(img.src);\r\n }\r\n };\r\n img.addEventListener(\"load\", loadHandler);\r\n img.addEventListener(\"error\", errorHandler);\r\n var noOfflineSupport = function () {\r\n img.src = url;\r\n };\r\n var loadFromOfflineSupport = function () {\r\n if (offlineProvider) {\r\n offlineProvider.loadImage(url, img);\r\n }\r\n };\r\n if (url.substr(0, 5) !== \"data:\" && offlineProvider && offlineProvider.enableTexturesOffline) {\r\n offlineProvider.open(loadFromOfflineSupport, noOfflineSupport);\r\n }\r\n else {\r\n if (url.indexOf(\"file:\") !== -1) {\r\n var textureName = decodeURIComponent(url.substring(5).toLowerCase());\r\n if (FilesInputStore.FilesToLoad[textureName]) {\r\n try {\r\n var blobURL;\r\n try {\r\n blobURL = URL.createObjectURL(FilesInputStore.FilesToLoad[textureName]);\r\n }\r\n catch (ex) {\r\n // Chrome doesn't support oneTimeOnly parameter\r\n blobURL = URL.createObjectURL(FilesInputStore.FilesToLoad[textureName]);\r\n }\r\n img.src = blobURL;\r\n usingObjectURL = true;\r\n }\r\n catch (e) {\r\n img.src = \"\";\r\n }\r\n return img;\r\n }\r\n }\r\n noOfflineSupport();\r\n }\r\n return img;\r\n };\r\n /**\r\n * Reads a file from a File object\r\n * @param file defines the file to load\r\n * @param onSuccess defines the callback to call when data is loaded\r\n * @param onProgress defines the callback to call during loading process\r\n * @param useArrayBuffer defines a boolean indicating that data must be returned as an ArrayBuffer\r\n * @param onError defines the callback to call when an error occurs\r\n * @returns a file request object\r\n */\r\n FileTools.ReadFile = function (file, onSuccess, onProgress, useArrayBuffer, onError) {\r\n var reader = new FileReader();\r\n var request = {\r\n onCompleteObservable: new Observable(),\r\n abort: function () { return reader.abort(); },\r\n };\r\n reader.onloadend = function (e) { return request.onCompleteObservable.notifyObservers(request); };\r\n if (onError) {\r\n reader.onerror = function (e) {\r\n onError(new ReadFileError(\"Unable to read \" + file.name, file));\r\n };\r\n }\r\n reader.onload = function (e) {\r\n //target doesn't have result from ts 1.3\r\n onSuccess(e.target['result']);\r\n };\r\n if (onProgress) {\r\n reader.onprogress = onProgress;\r\n }\r\n if (!useArrayBuffer) {\r\n // Asynchronous read\r\n reader.readAsText(file);\r\n }\r\n else {\r\n reader.readAsArrayBuffer(file);\r\n }\r\n return request;\r\n };\r\n /**\r\n * Loads a file from a url\r\n * @param url url to load\r\n * @param onSuccess callback called when the file successfully loads\r\n * @param onProgress callback called while file is loading (if the server supports this mode)\r\n * @param offlineProvider defines the offline provider for caching\r\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\r\n * @param onError callback called when the file fails to load\r\n * @returns a file request object\r\n */\r\n FileTools.LoadFile = function (url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError) {\r\n // If file and file input are set\r\n if (url.indexOf(\"file:\") !== -1) {\r\n var fileName = decodeURIComponent(url.substring(5).toLowerCase());\r\n var file = FilesInputStore.FilesToLoad[fileName];\r\n if (file) {\r\n return this.ReadFile(file, onSuccess, onProgress, useArrayBuffer, onError ? function (error) { return onError(undefined, new LoadFileError(error.message, error.file)); } : undefined);\r\n }\r\n }\r\n return this.RequestFile(url, function (data, request) {\r\n onSuccess(data, request ? request.responseURL : undefined);\r\n }, onProgress, offlineProvider, useArrayBuffer, onError ? function (error) {\r\n onError(error.request, new LoadFileError(error.message, error.request));\r\n } : undefined);\r\n };\r\n /**\r\n * Loads a file\r\n * @param url url to load\r\n * @param onSuccess callback called when the file successfully loads\r\n * @param onProgress callback called while file is loading (if the server supports this mode)\r\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\r\n * @param onError callback called when the file fails to load\r\n * @param onOpened callback called when the web request is opened\r\n * @returns a file request object\r\n */\r\n FileTools.RequestFile = function (url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError, onOpened) {\r\n var _this = this;\r\n url = this._CleanUrl(url);\r\n url = this.PreprocessUrl(url);\r\n var loadUrl = this.BaseUrl + url;\r\n var aborted = false;\r\n var fileRequest = {\r\n onCompleteObservable: new Observable(),\r\n abort: function () { return aborted = true; },\r\n };\r\n var requestFile = function () {\r\n var request = new WebRequest();\r\n var retryHandle = null;\r\n fileRequest.abort = function () {\r\n aborted = true;\r\n if (request.readyState !== (XMLHttpRequest.DONE || 4)) {\r\n request.abort();\r\n }\r\n if (retryHandle !== null) {\r\n clearTimeout(retryHandle);\r\n retryHandle = null;\r\n }\r\n };\r\n var retryLoop = function (retryIndex) {\r\n request.open('GET', loadUrl);\r\n if (onOpened) {\r\n onOpened(request);\r\n }\r\n if (useArrayBuffer) {\r\n request.responseType = \"arraybuffer\";\r\n }\r\n if (onProgress) {\r\n request.addEventListener(\"progress\", onProgress);\r\n }\r\n var onLoadEnd = function () {\r\n request.removeEventListener(\"loadend\", onLoadEnd);\r\n fileRequest.onCompleteObservable.notifyObservers(fileRequest);\r\n fileRequest.onCompleteObservable.clear();\r\n };\r\n request.addEventListener(\"loadend\", onLoadEnd);\r\n var onReadyStateChange = function () {\r\n if (aborted) {\r\n return;\r\n }\r\n // In case of undefined state in some browsers.\r\n if (request.readyState === (XMLHttpRequest.DONE || 4)) {\r\n // Some browsers have issues where onreadystatechange can be called multiple times with the same value.\r\n request.removeEventListener(\"readystatechange\", onReadyStateChange);\r\n if ((request.status >= 200 && request.status < 300) || (request.status === 0 && (!DomManagement.IsWindowObjectExist() || _this.IsFileURL()))) {\r\n onSuccess(useArrayBuffer ? request.response : request.responseText, request);\r\n return;\r\n }\r\n var retryStrategy = _this.DefaultRetryStrategy;\r\n if (retryStrategy) {\r\n var waitTime = retryStrategy(loadUrl, request, retryIndex);\r\n if (waitTime !== -1) {\r\n // Prevent the request from completing for retry.\r\n request.removeEventListener(\"loadend\", onLoadEnd);\r\n request = new WebRequest();\r\n retryHandle = setTimeout(function () { return retryLoop(retryIndex + 1); }, waitTime);\r\n return;\r\n }\r\n }\r\n var error = new RequestFileError(\"Error status: \" + request.status + \" \" + request.statusText + \" - Unable to load \" + loadUrl, request);\r\n if (onError) {\r\n onError(error);\r\n }\r\n }\r\n };\r\n request.addEventListener(\"readystatechange\", onReadyStateChange);\r\n request.send();\r\n };\r\n retryLoop(0);\r\n };\r\n // Caching all files\r\n if (offlineProvider && offlineProvider.enableSceneOffline) {\r\n var noOfflineSupport_1 = function (request) {\r\n if (request && request.status > 400) {\r\n if (onError) {\r\n onError(request);\r\n }\r\n }\r\n else {\r\n requestFile();\r\n }\r\n };\r\n var loadFromOfflineSupport = function () {\r\n // TODO: database needs to support aborting and should return a IFileRequest\r\n if (offlineProvider) {\r\n offlineProvider.loadFile(_this.BaseUrl + url, function (data) {\r\n if (!aborted) {\r\n onSuccess(data);\r\n }\r\n fileRequest.onCompleteObservable.notifyObservers(fileRequest);\r\n }, onProgress ? function (event) {\r\n if (!aborted) {\r\n onProgress(event);\r\n }\r\n } : undefined, noOfflineSupport_1, useArrayBuffer);\r\n }\r\n };\r\n offlineProvider.open(loadFromOfflineSupport, noOfflineSupport_1);\r\n }\r\n else {\r\n requestFile();\r\n }\r\n return fileRequest;\r\n };\r\n /**\r\n * Checks if the loaded document was accessed via `file:`-Protocol.\r\n * @returns boolean\r\n */\r\n FileTools.IsFileURL = function () {\r\n return location.protocol === \"file:\";\r\n };\r\n /**\r\n * Gets or sets the retry strategy to apply when an error happens while loading an asset\r\n */\r\n FileTools.DefaultRetryStrategy = RetryStrategy.ExponentialBackoff();\r\n /**\r\n * Gets or sets the base URL to use to load assets\r\n */\r\n FileTools.BaseUrl = \"\";\r\n /**\r\n * Default behaviour for cors in the application.\r\n * It can be a string if the expected behavior is identical in the entire app.\r\n * Or a callback to be able to set it per url or on a group of them (in case of Video source for instance)\r\n */\r\n FileTools.CorsBehavior = \"anonymous\";\r\n /**\r\n * Gets or sets a function used to pre-process url before using them to load assets\r\n */\r\n FileTools.PreprocessUrl = function (url) {\r\n return url;\r\n };\r\n return FileTools;\r\n}());\r\nexport { FileTools };\r\n//# sourceMappingURL=fileTools.js.map"
  2483. },
  2484. {
  2485. "id": "../../.temp/packageES6Dev/core/Misc/filesInputStore.js",
  2486. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\filesInputStore.js",
  2487. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/filesInputStore.js",
  2488. "index": 21,
  2489. "index2": 16,
  2490. "size": 387,
  2491. "cacheable": true,
  2492. "built": true,
  2493. "optional": false,
  2494. "prefetched": false,
  2495. "chunks": [
  2496. "thinEngineOnly"
  2497. ],
  2498. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2499. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2500. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2501. "issuerPath": [
  2502. {
  2503. "id": "./thinEngineOnly.ts",
  2504. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  2505. "name": "./thinEngineOnly.ts",
  2506. "profile": {
  2507. "factory": 25,
  2508. "building": 1793
  2509. }
  2510. },
  2511. {
  2512. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2513. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2514. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2515. "profile": {
  2516. "factory": 10,
  2517. "building": 63
  2518. }
  2519. },
  2520. {
  2521. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2522. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2523. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2524. "profile": {
  2525. "factory": 6,
  2526. "building": 38,
  2527. "dependencies": 28
  2528. }
  2529. }
  2530. ],
  2531. "profile": {
  2532. "factory": 33,
  2533. "building": 7,
  2534. "dependencies": 10
  2535. },
  2536. "failed": false,
  2537. "errors": 0,
  2538. "warnings": 0,
  2539. "assets": [],
  2540. "reasons": [
  2541. {
  2542. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2543. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2544. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2545. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2546. "type": "harmony side effect evaluation",
  2547. "userRequest": "./filesInputStore",
  2548. "loc": "5:0-52"
  2549. },
  2550. {
  2551. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2552. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2553. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2554. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2555. "type": "harmony import specifier",
  2556. "userRequest": "./filesInputStore",
  2557. "loc": "191:20-35"
  2558. },
  2559. {
  2560. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2561. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2562. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2563. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2564. "type": "harmony import specifier",
  2565. "userRequest": "./filesInputStore",
  2566. "loc": "195:58-73"
  2567. },
  2568. {
  2569. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2570. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2571. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2572. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2573. "type": "harmony import specifier",
  2574. "userRequest": "./filesInputStore",
  2575. "loc": "199:58-73"
  2576. },
  2577. {
  2578. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2579. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2580. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2581. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2582. "type": "harmony import specifier",
  2583. "userRequest": "./filesInputStore",
  2584. "loc": "265:23-38"
  2585. }
  2586. ],
  2587. "providedExports": [
  2588. "FilesInputStore"
  2589. ],
  2590. "optimizationBailout": [],
  2591. "depth": 3,
  2592. "source": "/**\r\n * Class used to help managing file picking and drag'n'drop\r\n * File Storage\r\n */\r\nvar FilesInputStore = /** @class */ (function () {\r\n function FilesInputStore() {\r\n }\r\n /**\r\n * List of files ready to be loaded\r\n */\r\n FilesInputStore.FilesToLoad = {};\r\n return FilesInputStore;\r\n}());\r\nexport { FilesInputStore };\r\n//# sourceMappingURL=filesInputStore.js.map"
  2593. },
  2594. {
  2595. "id": "../../.temp/packageES6Dev/core/Misc/logger.js",
  2596. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\logger.js",
  2597. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/logger.js",
  2598. "index": 6,
  2599. "index2": 3,
  2600. "size": 4161,
  2601. "cacheable": true,
  2602. "built": true,
  2603. "optional": false,
  2604. "prefetched": false,
  2605. "chunks": [
  2606. "thinEngineOnly"
  2607. ],
  2608. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2609. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2610. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2611. "issuerPath": [
  2612. {
  2613. "id": "./thinEngineOnly.ts",
  2614. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  2615. "name": "./thinEngineOnly.ts",
  2616. "profile": {
  2617. "factory": 25,
  2618. "building": 1793
  2619. }
  2620. },
  2621. {
  2622. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2623. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2624. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2625. "profile": {
  2626. "factory": 10,
  2627. "building": 63
  2628. }
  2629. }
  2630. ],
  2631. "profile": {
  2632. "factory": 6,
  2633. "building": 38,
  2634. "dependencies": 28
  2635. },
  2636. "failed": false,
  2637. "errors": 0,
  2638. "warnings": 0,
  2639. "assets": [],
  2640. "reasons": [
  2641. {
  2642. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2643. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2644. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2645. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2646. "type": "harmony side effect evaluation",
  2647. "userRequest": "../Misc/logger",
  2648. "loc": "9:0-40"
  2649. },
  2650. {
  2651. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2652. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2653. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2654. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2655. "type": "harmony import specifier",
  2656. "userRequest": "../Misc/logger",
  2657. "loc": "211:20-26"
  2658. },
  2659. {
  2660. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2661. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2662. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2663. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2664. "type": "harmony import specifier",
  2665. "userRequest": "../Misc/logger",
  2666. "loc": "227:24-30"
  2667. },
  2668. {
  2669. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2670. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2671. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2672. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2673. "type": "harmony side effect evaluation",
  2674. "userRequest": "../Misc/logger",
  2675. "loc": "3:0-40"
  2676. },
  2677. {
  2678. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2679. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2680. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2681. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2682. "type": "harmony import specifier",
  2683. "userRequest": "../Misc/logger",
  2684. "loc": "482:8-14"
  2685. },
  2686. {
  2687. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2688. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2689. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2690. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2691. "type": "harmony import specifier",
  2692. "userRequest": "../Misc/logger",
  2693. "loc": "483:8-14"
  2694. },
  2695. {
  2696. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2697. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2698. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2699. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2700. "type": "harmony import specifier",
  2701. "userRequest": "../Misc/logger",
  2702. "loc": "486:8-14"
  2703. },
  2704. {
  2705. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2706. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2707. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2708. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2709. "type": "harmony import specifier",
  2710. "userRequest": "../Misc/logger",
  2711. "loc": "489:8-14"
  2712. },
  2713. {
  2714. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2715. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2716. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2717. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2718. "type": "harmony import specifier",
  2719. "userRequest": "../Misc/logger",
  2720. "loc": "490:8-14"
  2721. },
  2722. {
  2723. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2724. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2725. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2726. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2727. "type": "harmony import specifier",
  2728. "userRequest": "../Misc/logger",
  2729. "loc": "503:16-22"
  2730. }
  2731. ],
  2732. "providedExports": [
  2733. "Logger"
  2734. ],
  2735. "optimizationBailout": [],
  2736. "depth": 2,
  2737. "source": "/**\r\n * Logger used througouht the application to allow configuration of\r\n * the log level required for the messages.\r\n */\r\nvar Logger = /** @class */ (function () {\r\n function Logger() {\r\n }\r\n Logger._AddLogEntry = function (entry) {\r\n Logger._LogCache = entry + Logger._LogCache;\r\n if (Logger.OnNewCacheEntry) {\r\n Logger.OnNewCacheEntry(entry);\r\n }\r\n };\r\n Logger._FormatMessage = function (message) {\r\n var padStr = function (i) { return (i < 10) ? \"0\" + i : \"\" + i; };\r\n var date = new Date();\r\n return \"[\" + padStr(date.getHours()) + \":\" + padStr(date.getMinutes()) + \":\" + padStr(date.getSeconds()) + \"]: \" + message;\r\n };\r\n Logger._LogDisabled = function (message) {\r\n // nothing to do\r\n };\r\n Logger._LogEnabled = function (message) {\r\n var formattedMessage = Logger._FormatMessage(message);\r\n console.log(\"BJS - \" + formattedMessage);\r\n var entry = \"<div style='color:white'>\" + formattedMessage + \"</div><br>\";\r\n Logger._AddLogEntry(entry);\r\n };\r\n Logger._WarnDisabled = function (message) {\r\n // nothing to do\r\n };\r\n Logger._WarnEnabled = function (message) {\r\n var formattedMessage = Logger._FormatMessage(message);\r\n console.warn(\"BJS - \" + formattedMessage);\r\n var entry = \"<div style='color:orange'>\" + formattedMessage + \"</div><br>\";\r\n Logger._AddLogEntry(entry);\r\n };\r\n Logger._ErrorDisabled = function (message) {\r\n // nothing to do\r\n };\r\n Logger._ErrorEnabled = function (message) {\r\n Logger.errorsCount++;\r\n var formattedMessage = Logger._FormatMessage(message);\r\n console.error(\"BJS - \" + formattedMessage);\r\n var entry = \"<div style='color:red'>\" + formattedMessage + \"</div><br>\";\r\n Logger._AddLogEntry(entry);\r\n };\r\n Object.defineProperty(Logger, \"LogCache\", {\r\n /**\r\n * Gets current log cache (list of logs)\r\n */\r\n get: function () {\r\n return Logger._LogCache;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Clears the log cache\r\n */\r\n Logger.ClearLogCache = function () {\r\n Logger._LogCache = \"\";\r\n Logger.errorsCount = 0;\r\n };\r\n Object.defineProperty(Logger, \"LogLevels\", {\r\n /**\r\n * Sets the current log level (MessageLogLevel / WarningLogLevel / ErrorLogLevel)\r\n */\r\n set: function (level) {\r\n if ((level & Logger.MessageLogLevel) === Logger.MessageLogLevel) {\r\n Logger.Log = Logger._LogEnabled;\r\n }\r\n else {\r\n Logger.Log = Logger._LogDisabled;\r\n }\r\n if ((level & Logger.WarningLogLevel) === Logger.WarningLogLevel) {\r\n Logger.Warn = Logger._WarnEnabled;\r\n }\r\n else {\r\n Logger.Warn = Logger._WarnDisabled;\r\n }\r\n if ((level & Logger.ErrorLogLevel) === Logger.ErrorLogLevel) {\r\n Logger.Error = Logger._ErrorEnabled;\r\n }\r\n else {\r\n Logger.Error = Logger._ErrorDisabled;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * No log\r\n */\r\n Logger.NoneLogLevel = 0;\r\n /**\r\n * Only message logs\r\n */\r\n Logger.MessageLogLevel = 1;\r\n /**\r\n * Only warning logs\r\n */\r\n Logger.WarningLogLevel = 2;\r\n /**\r\n * Only error logs\r\n */\r\n Logger.ErrorLogLevel = 4;\r\n /**\r\n * All logs\r\n */\r\n Logger.AllLogLevel = 7;\r\n Logger._LogCache = \"\";\r\n /**\r\n * Gets a value indicating the number of loading errors\r\n * @ignorenaming\r\n */\r\n Logger.errorsCount = 0;\r\n /**\r\n * Log a message to the console\r\n */\r\n Logger.Log = Logger._LogEnabled;\r\n /**\r\n * Write a warning message to the console\r\n */\r\n Logger.Warn = Logger._WarnEnabled;\r\n /**\r\n * Write an error message to the console\r\n */\r\n Logger.Error = Logger._ErrorEnabled;\r\n return Logger;\r\n}());\r\nexport { Logger };\r\n//# sourceMappingURL=logger.js.map"
  2738. },
  2739. {
  2740. "id": "../../.temp/packageES6Dev/core/Misc/observable.js",
  2741. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\observable.js",
  2742. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/observable.js",
  2743. "index": 4,
  2744. "index2": 1,
  2745. "size": 17013,
  2746. "cacheable": true,
  2747. "built": true,
  2748. "optional": false,
  2749. "prefetched": false,
  2750. "chunks": [
  2751. "thinEngineOnly"
  2752. ],
  2753. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2754. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2755. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2756. "issuerPath": [
  2757. {
  2758. "id": "./thinEngineOnly.ts",
  2759. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  2760. "name": "./thinEngineOnly.ts",
  2761. "profile": {
  2762. "factory": 25,
  2763. "building": 1793
  2764. }
  2765. },
  2766. {
  2767. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2768. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2769. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2770. "profile": {
  2771. "factory": 10,
  2772. "building": 63
  2773. }
  2774. }
  2775. ],
  2776. "profile": {
  2777. "factory": 6,
  2778. "building": 38,
  2779. "dependencies": 28
  2780. },
  2781. "failed": false,
  2782. "errors": 0,
  2783. "warnings": 0,
  2784. "assets": [],
  2785. "reasons": [
  2786. {
  2787. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2788. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2789. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2790. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2791. "type": "harmony side effect evaluation",
  2792. "userRequest": "../Misc/observable",
  2793. "loc": "4:0-48"
  2794. },
  2795. {
  2796. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2797. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2798. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2799. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2800. "type": "harmony import specifier",
  2801. "userRequest": "../Misc/observable",
  2802. "loc": "81:43-53"
  2803. },
  2804. {
  2805. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2806. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2807. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2808. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2809. "type": "harmony import specifier",
  2810. "userRequest": "../Misc/observable",
  2811. "loc": "85:47-57"
  2812. },
  2813. {
  2814. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2815. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2816. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2817. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2818. "type": "harmony import specifier",
  2819. "userRequest": "../Misc/observable",
  2820. "loc": "131:49-59"
  2821. },
  2822. {
  2823. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2824. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  2825. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2826. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2827. "type": "harmony side effect evaluation",
  2828. "userRequest": "../../Misc/observable",
  2829. "loc": "1:0-51"
  2830. },
  2831. {
  2832. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2833. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  2834. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2835. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  2836. "type": "harmony import specifier",
  2837. "userRequest": "../../Misc/observable",
  2838. "loc": "118:38-48"
  2839. },
  2840. {
  2841. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2842. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2843. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2844. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2845. "type": "harmony side effect evaluation",
  2846. "userRequest": "../Misc/observable",
  2847. "loc": "1:0-48"
  2848. },
  2849. {
  2850. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2851. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2852. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2853. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2854. "type": "harmony import specifier",
  2855. "userRequest": "../Misc/observable",
  2856. "loc": "58:39-49"
  2857. },
  2858. {
  2859. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2860. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2861. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2862. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2863. "type": "harmony import specifier",
  2864. "userRequest": "../Misc/observable",
  2865. "loc": "62:37-47"
  2866. },
  2867. {
  2868. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  2869. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  2870. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2871. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  2872. "type": "harmony import specifier",
  2873. "userRequest": "../Misc/observable",
  2874. "loc": "176:45-55"
  2875. },
  2876. {
  2877. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2878. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2879. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2880. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2881. "type": "harmony side effect evaluation",
  2882. "userRequest": "./observable",
  2883. "loc": "4:0-42"
  2884. },
  2885. {
  2886. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2887. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2888. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2889. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2890. "type": "harmony import specifier",
  2891. "userRequest": "./observable",
  2892. "loc": "226:38-48"
  2893. },
  2894. {
  2895. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2896. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2897. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2898. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2899. "type": "harmony import specifier",
  2900. "userRequest": "./observable",
  2901. "loc": "293:38-48"
  2902. }
  2903. ],
  2904. "providedExports": [
  2905. "EventState",
  2906. "Observer",
  2907. "MultiObserver",
  2908. "Observable"
  2909. ],
  2910. "optimizationBailout": [],
  2911. "depth": 2,
  2912. "source": "/**\r\n * A class serves as a medium between the observable and its observers\r\n */\r\nvar EventState = /** @class */ (function () {\r\n /**\r\n * Create a new EventState\r\n * @param mask defines the mask associated with this state\r\n * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true\r\n * @param target defines the original target of the state\r\n * @param currentTarget defines the current target of the state\r\n */\r\n function EventState(mask, skipNextObservers, target, currentTarget) {\r\n if (skipNextObservers === void 0) { skipNextObservers = false; }\r\n this.initalize(mask, skipNextObservers, target, currentTarget);\r\n }\r\n /**\r\n * Initialize the current event state\r\n * @param mask defines the mask associated with this state\r\n * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true\r\n * @param target defines the original target of the state\r\n * @param currentTarget defines the current target of the state\r\n * @returns the current event state\r\n */\r\n EventState.prototype.initalize = function (mask, skipNextObservers, target, currentTarget) {\r\n if (skipNextObservers === void 0) { skipNextObservers = false; }\r\n this.mask = mask;\r\n this.skipNextObservers = skipNextObservers;\r\n this.target = target;\r\n this.currentTarget = currentTarget;\r\n return this;\r\n };\r\n return EventState;\r\n}());\r\nexport { EventState };\r\n/**\r\n * Represent an Observer registered to a given Observable object.\r\n */\r\nvar Observer = /** @class */ (function () {\r\n /**\r\n * Creates a new observer\r\n * @param callback defines the callback to call when the observer is notified\r\n * @param mask defines the mask of the observer (used to filter notifications)\r\n * @param scope defines the current scope used to restore the JS context\r\n */\r\n function Observer(\r\n /**\r\n * Defines the callback to call when the observer is notified\r\n */\r\n callback, \r\n /**\r\n * Defines the mask of the observer (used to filter notifications)\r\n */\r\n mask, \r\n /**\r\n * Defines the current scope used to restore the JS context\r\n */\r\n scope) {\r\n if (scope === void 0) { scope = null; }\r\n this.callback = callback;\r\n this.mask = mask;\r\n this.scope = scope;\r\n /** @hidden */\r\n this._willBeUnregistered = false;\r\n /**\r\n * Gets or sets a property defining that the observer as to be unregistered after the next notification\r\n */\r\n this.unregisterOnNextCall = false;\r\n }\r\n return Observer;\r\n}());\r\nexport { Observer };\r\n/**\r\n * Represent a list of observers registered to multiple Observables object.\r\n */\r\nvar MultiObserver = /** @class */ (function () {\r\n function MultiObserver() {\r\n }\r\n /**\r\n * Release associated resources\r\n */\r\n MultiObserver.prototype.dispose = function () {\r\n if (this._observers && this._observables) {\r\n for (var index = 0; index < this._observers.length; index++) {\r\n this._observables[index].remove(this._observers[index]);\r\n }\r\n }\r\n this._observers = null;\r\n this._observables = null;\r\n };\r\n /**\r\n * Raise a callback when one of the observable will notify\r\n * @param observables defines a list of observables to watch\r\n * @param callback defines the callback to call on notification\r\n * @param mask defines the mask used to filter notifications\r\n * @param scope defines the current scope used to restore the JS context\r\n * @returns the new MultiObserver\r\n */\r\n MultiObserver.Watch = function (observables, callback, mask, scope) {\r\n if (mask === void 0) { mask = -1; }\r\n if (scope === void 0) { scope = null; }\r\n var result = new MultiObserver();\r\n result._observers = new Array();\r\n result._observables = observables;\r\n for (var _i = 0, observables_1 = observables; _i < observables_1.length; _i++) {\r\n var observable = observables_1[_i];\r\n var observer = observable.add(callback, mask, false, scope);\r\n if (observer) {\r\n result._observers.push(observer);\r\n }\r\n }\r\n return result;\r\n };\r\n return MultiObserver;\r\n}());\r\nexport { MultiObserver };\r\n/**\r\n * The Observable class is a simple implementation of the Observable pattern.\r\n *\r\n * There's one slight particularity though: a given Observable can notify its observer using a particular mask value, only the Observers registered with this mask value will be notified.\r\n * This enable a more fine grained execution without having to rely on multiple different Observable objects.\r\n * For instance you may have a given Observable that have four different types of notifications: Move (mask = 0x01), Stop (mask = 0x02), Turn Right (mask = 0X04), Turn Left (mask = 0X08).\r\n * A given observer can register itself with only Move and Stop (mask = 0x03), then it will only be notified when one of these two occurs and will never be for Turn Left/Right.\r\n */\r\nvar Observable = /** @class */ (function () {\r\n /**\r\n * Creates a new observable\r\n * @param onObserverAdded defines a callback to call when a new observer is added\r\n */\r\n function Observable(onObserverAdded) {\r\n this._observers = new Array();\r\n this._eventState = new EventState(0);\r\n if (onObserverAdded) {\r\n this._onObserverAdded = onObserverAdded;\r\n }\r\n }\r\n Object.defineProperty(Observable.prototype, \"observers\", {\r\n /**\r\n * Gets the list of observers\r\n */\r\n get: function () {\r\n return this._observers;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Create a new Observer with the specified callback\r\n * @param callback the callback that will be executed for that Observer\r\n * @param mask the mask used to filter observers\r\n * @param insertFirst if true the callback will be inserted at the first position, hence executed before the others ones. If false (default behavior) the callback will be inserted at the last position, executed after all the others already present.\r\n * @param scope optional scope for the callback to be called from\r\n * @param unregisterOnFirstCall defines if the observer as to be unregistered after the next notification\r\n * @returns the new observer created for the callback\r\n */\r\n Observable.prototype.add = function (callback, mask, insertFirst, scope, unregisterOnFirstCall) {\r\n if (mask === void 0) { mask = -1; }\r\n if (insertFirst === void 0) { insertFirst = false; }\r\n if (scope === void 0) { scope = null; }\r\n if (unregisterOnFirstCall === void 0) { unregisterOnFirstCall = false; }\r\n if (!callback) {\r\n return null;\r\n }\r\n var observer = new Observer(callback, mask, scope);\r\n observer.unregisterOnNextCall = unregisterOnFirstCall;\r\n if (insertFirst) {\r\n this._observers.unshift(observer);\r\n }\r\n else {\r\n this._observers.push(observer);\r\n }\r\n if (this._onObserverAdded) {\r\n this._onObserverAdded(observer);\r\n }\r\n return observer;\r\n };\r\n /**\r\n * Create a new Observer with the specified callback and unregisters after the next notification\r\n * @param callback the callback that will be executed for that Observer\r\n * @returns the new observer created for the callback\r\n */\r\n Observable.prototype.addOnce = function (callback) {\r\n return this.add(callback, undefined, undefined, undefined, true);\r\n };\r\n /**\r\n * Remove an Observer from the Observable object\r\n * @param observer the instance of the Observer to remove\r\n * @returns false if it doesn't belong to this Observable\r\n */\r\n Observable.prototype.remove = function (observer) {\r\n if (!observer) {\r\n return false;\r\n }\r\n var index = this._observers.indexOf(observer);\r\n if (index !== -1) {\r\n this._deferUnregister(observer);\r\n return true;\r\n }\r\n return false;\r\n };\r\n /**\r\n * Remove a callback from the Observable object\r\n * @param callback the callback to remove\r\n * @param scope optional scope. If used only the callbacks with this scope will be removed\r\n * @returns false if it doesn't belong to this Observable\r\n */\r\n Observable.prototype.removeCallback = function (callback, scope) {\r\n for (var index = 0; index < this._observers.length; index++) {\r\n var observer = this._observers[index];\r\n if (observer._willBeUnregistered) {\r\n continue;\r\n }\r\n if (observer.callback === callback && (!scope || scope === observer.scope)) {\r\n this._deferUnregister(observer);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Observable.prototype._deferUnregister = function (observer) {\r\n var _this = this;\r\n observer.unregisterOnNextCall = false;\r\n observer._willBeUnregistered = true;\r\n setTimeout(function () {\r\n _this._remove(observer);\r\n }, 0);\r\n };\r\n // This should only be called when not iterating over _observers to avoid callback skipping.\r\n // Removes an observer from the _observer Array.\r\n Observable.prototype._remove = function (observer) {\r\n if (!observer) {\r\n return false;\r\n }\r\n var index = this._observers.indexOf(observer);\r\n if (index !== -1) {\r\n this._observers.splice(index, 1);\r\n return true;\r\n }\r\n return false;\r\n };\r\n /**\r\n * Moves the observable to the top of the observer list making it get called first when notified\r\n * @param observer the observer to move\r\n */\r\n Observable.prototype.makeObserverTopPriority = function (observer) {\r\n this._remove(observer);\r\n this._observers.unshift(observer);\r\n };\r\n /**\r\n * Moves the observable to the bottom of the observer list making it get called last when notified\r\n * @param observer the observer to move\r\n */\r\n Observable.prototype.makeObserverBottomPriority = function (observer) {\r\n this._remove(observer);\r\n this._observers.push(observer);\r\n };\r\n /**\r\n * Notify all Observers by calling their respective callback with the given data\r\n * Will return true if all observers were executed, false if an observer set skipNextObservers to true, then prevent the subsequent ones to execute\r\n * @param eventData defines the data to send to all observers\r\n * @param mask defines the mask of the current notification (observers with incompatible mask (ie mask & observer.mask === 0) will not be notified)\r\n * @param target defines the original target of the state\r\n * @param currentTarget defines the current target of the state\r\n * @returns false if the complete observer chain was not processed (because one observer set the skipNextObservers to true)\r\n */\r\n Observable.prototype.notifyObservers = function (eventData, mask, target, currentTarget) {\r\n if (mask === void 0) { mask = -1; }\r\n if (!this._observers.length) {\r\n return true;\r\n }\r\n var state = this._eventState;\r\n state.mask = mask;\r\n state.target = target;\r\n state.currentTarget = currentTarget;\r\n state.skipNextObservers = false;\r\n state.lastReturnValue = eventData;\r\n for (var _i = 0, _a = this._observers; _i < _a.length; _i++) {\r\n var obs = _a[_i];\r\n if (obs._willBeUnregistered) {\r\n continue;\r\n }\r\n if (obs.mask & mask) {\r\n if (obs.scope) {\r\n state.lastReturnValue = obs.callback.apply(obs.scope, [eventData, state]);\r\n }\r\n else {\r\n state.lastReturnValue = obs.callback(eventData, state);\r\n }\r\n if (obs.unregisterOnNextCall) {\r\n this._deferUnregister(obs);\r\n }\r\n }\r\n if (state.skipNextObservers) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n /**\r\n * Calling this will execute each callback, expecting it to be a promise or return a value.\r\n * If at any point in the chain one function fails, the promise will fail and the execution will not continue.\r\n * This is useful when a chain of events (sometimes async events) is needed to initialize a certain object\r\n * and it is crucial that all callbacks will be executed.\r\n * The order of the callbacks is kept, callbacks are not executed parallel.\r\n *\r\n * @param eventData The data to be sent to each callback\r\n * @param mask is used to filter observers defaults to -1\r\n * @param target defines the callback target (see EventState)\r\n * @param currentTarget defines he current object in the bubbling phase\r\n * @returns {Promise<T>} will return a Promise than resolves when all callbacks executed successfully.\r\n */\r\n Observable.prototype.notifyObserversWithPromise = function (eventData, mask, target, currentTarget) {\r\n var _this = this;\r\n if (mask === void 0) { mask = -1; }\r\n // create an empty promise\r\n var p = Promise.resolve(eventData);\r\n // no observers? return this promise.\r\n if (!this._observers.length) {\r\n return p;\r\n }\r\n var state = this._eventState;\r\n state.mask = mask;\r\n state.target = target;\r\n state.currentTarget = currentTarget;\r\n state.skipNextObservers = false;\r\n // execute one callback after another (not using Promise.all, the order is important)\r\n this._observers.forEach(function (obs) {\r\n if (state.skipNextObservers) {\r\n return;\r\n }\r\n if (obs._willBeUnregistered) {\r\n return;\r\n }\r\n if (obs.mask & mask) {\r\n if (obs.scope) {\r\n p = p.then(function (lastReturnedValue) {\r\n state.lastReturnValue = lastReturnedValue;\r\n return obs.callback.apply(obs.scope, [eventData, state]);\r\n });\r\n }\r\n else {\r\n p = p.then(function (lastReturnedValue) {\r\n state.lastReturnValue = lastReturnedValue;\r\n return obs.callback(eventData, state);\r\n });\r\n }\r\n if (obs.unregisterOnNextCall) {\r\n _this._deferUnregister(obs);\r\n }\r\n }\r\n });\r\n // return the eventData\r\n return p.then(function () { return eventData; });\r\n };\r\n /**\r\n * Notify a specific observer\r\n * @param observer defines the observer to notify\r\n * @param eventData defines the data to be sent to each callback\r\n * @param mask is used to filter observers defaults to -1\r\n */\r\n Observable.prototype.notifyObserver = function (observer, eventData, mask) {\r\n if (mask === void 0) { mask = -1; }\r\n var state = this._eventState;\r\n state.mask = mask;\r\n state.skipNextObservers = false;\r\n observer.callback(eventData, state);\r\n };\r\n /**\r\n * Gets a boolean indicating if the observable has at least one observer\r\n * @returns true is the Observable has at least one Observer registered\r\n */\r\n Observable.prototype.hasObservers = function () {\r\n return this._observers.length > 0;\r\n };\r\n /**\r\n * Clear the list of observers\r\n */\r\n Observable.prototype.clear = function () {\r\n this._observers = new Array();\r\n this._onObserverAdded = null;\r\n };\r\n /**\r\n * Clone the current observable\r\n * @returns a new observable\r\n */\r\n Observable.prototype.clone = function () {\r\n var result = new Observable();\r\n result._observers = this._observers.slice(0);\r\n return result;\r\n };\r\n /**\r\n * Does this observable handles observer registered with a given mask\r\n * @param mask defines the mask to be tested\r\n * @return whether or not one observer registered with the given mask is handeled\r\n **/\r\n Observable.prototype.hasSpecificMask = function (mask) {\r\n if (mask === void 0) { mask = -1; }\r\n for (var _i = 0, _a = this._observers; _i < _a.length; _i++) {\r\n var obs = _a[_i];\r\n if (obs.mask & mask || obs.mask === mask) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n return Observable;\r\n}());\r\nexport { Observable };\r\n//# sourceMappingURL=observable.js.map"
  2913. },
  2914. {
  2915. "id": "../../.temp/packageES6Dev/core/Misc/retryStrategy.js",
  2916. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\retryStrategy.js",
  2917. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/retryStrategy.js",
  2918. "index": 22,
  2919. "index2": 17,
  2920. "size": 1030,
  2921. "cacheable": true,
  2922. "built": true,
  2923. "optional": false,
  2924. "prefetched": false,
  2925. "chunks": [
  2926. "thinEngineOnly"
  2927. ],
  2928. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2929. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2930. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2931. "issuerPath": [
  2932. {
  2933. "id": "./thinEngineOnly.ts",
  2934. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  2935. "name": "./thinEngineOnly.ts",
  2936. "profile": {
  2937. "factory": 25,
  2938. "building": 1793
  2939. }
  2940. },
  2941. {
  2942. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  2943. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  2944. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  2945. "profile": {
  2946. "factory": 10,
  2947. "building": 63
  2948. }
  2949. },
  2950. {
  2951. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2952. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2953. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2954. "profile": {
  2955. "factory": 6,
  2956. "building": 38,
  2957. "dependencies": 28
  2958. }
  2959. }
  2960. ],
  2961. "profile": {
  2962. "factory": 33,
  2963. "building": 7,
  2964. "dependencies": 10
  2965. },
  2966. "failed": false,
  2967. "errors": 0,
  2968. "warnings": 0,
  2969. "assets": [],
  2970. "reasons": [
  2971. {
  2972. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2973. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2974. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2975. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2976. "type": "harmony side effect evaluation",
  2977. "userRequest": "./retryStrategy",
  2978. "loc": "6:0-48"
  2979. },
  2980. {
  2981. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  2982. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  2983. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2984. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  2985. "type": "harmony import specifier",
  2986. "userRequest": "./retryStrategy",
  2987. "loc": "404:37-50"
  2988. }
  2989. ],
  2990. "providedExports": [
  2991. "RetryStrategy"
  2992. ],
  2993. "optimizationBailout": [],
  2994. "depth": 3,
  2995. "source": "/**\r\n * Class used to define a retry strategy when error happens while loading assets\r\n */\r\nvar RetryStrategy = /** @class */ (function () {\r\n function RetryStrategy() {\r\n }\r\n /**\r\n * Function used to defines an exponential back off strategy\r\n * @param maxRetries defines the maximum number of retries (3 by default)\r\n * @param baseInterval defines the interval between retries\r\n * @returns the strategy function to use\r\n */\r\n RetryStrategy.ExponentialBackoff = function (maxRetries, baseInterval) {\r\n if (maxRetries === void 0) { maxRetries = 3; }\r\n if (baseInterval === void 0) { baseInterval = 500; }\r\n return function (url, request, retryIndex) {\r\n if (request.status !== 0 || retryIndex >= maxRetries || url.indexOf(\"file:\") !== -1) {\r\n return -1;\r\n }\r\n return Math.pow(2, retryIndex) * baseInterval;\r\n };\r\n };\r\n return RetryStrategy;\r\n}());\r\nexport { RetryStrategy };\r\n//# sourceMappingURL=retryStrategy.js.map"
  2996. },
  2997. {
  2998. "id": "../../.temp/packageES6Dev/core/Misc/stringTools.js",
  2999. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\stringTools.js",
  3000. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/stringTools.js",
  3001. "index": 9,
  3002. "index2": 4,
  3003. "size": 2756,
  3004. "cacheable": true,
  3005. "built": true,
  3006. "optional": false,
  3007. "prefetched": false,
  3008. "chunks": [
  3009. "thinEngineOnly"
  3010. ],
  3011. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3012. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3013. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3014. "issuerPath": [
  3015. {
  3016. "id": "./thinEngineOnly.ts",
  3017. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3018. "name": "./thinEngineOnly.ts",
  3019. "profile": {
  3020. "factory": 25,
  3021. "building": 1793
  3022. }
  3023. },
  3024. {
  3025. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3026. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3027. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3028. "profile": {
  3029. "factory": 10,
  3030. "building": 63
  3031. }
  3032. },
  3033. {
  3034. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3035. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3036. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3037. "profile": {
  3038. "factory": 6,
  3039. "building": 38,
  3040. "dependencies": 28
  3041. }
  3042. }
  3043. ],
  3044. "profile": {
  3045. "factory": 33,
  3046. "building": 7,
  3047. "dependencies": 10
  3048. },
  3049. "failed": false,
  3050. "errors": 0,
  3051. "warnings": 0,
  3052. "assets": [],
  3053. "reasons": [
  3054. {
  3055. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3056. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js",
  3057. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3058. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3059. "type": "harmony side effect evaluation",
  3060. "userRequest": "../../Misc/stringTools",
  3061. "loc": "1:0-53"
  3062. },
  3063. {
  3064. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3065. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js",
  3066. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3067. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3068. "type": "harmony import specifier",
  3069. "userRequest": "../../Misc/stringTools",
  3070. "loc": "20:52-63"
  3071. },
  3072. {
  3073. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3074. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js",
  3075. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3076. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3077. "type": "harmony import specifier",
  3078. "userRequest": "../../Misc/stringTools",
  3079. "loc": "23:55-66"
  3080. },
  3081. {
  3082. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3083. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js",
  3084. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3085. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  3086. "type": "harmony import specifier",
  3087. "userRequest": "../../Misc/stringTools",
  3088. "loc": "26:93-104"
  3089. },
  3090. {
  3091. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3092. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3093. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3094. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3095. "type": "harmony side effect evaluation",
  3096. "userRequest": "./stringTools",
  3097. "loc": "8:0-44"
  3098. },
  3099. {
  3100. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3101. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3102. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3103. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3104. "type": "harmony import specifier",
  3105. "userRequest": "./stringTools",
  3106. "loc": "123:73-84"
  3107. }
  3108. ],
  3109. "providedExports": [
  3110. "StringTools"
  3111. ],
  3112. "optimizationBailout": [],
  3113. "depth": 3,
  3114. "source": "/**\r\n * Helper to manipulate strings\r\n */\r\nvar StringTools = /** @class */ (function () {\r\n function StringTools() {\r\n }\r\n /**\r\n * Checks for a matching suffix at the end of a string (for ES5 and lower)\r\n * @param str Source string\r\n * @param suffix Suffix to search for in the source string\r\n * @returns Boolean indicating whether the suffix was found (true) or not (false)\r\n */\r\n StringTools.EndsWith = function (str, suffix) {\r\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\r\n };\r\n /**\r\n * Checks for a matching suffix at the beginning of a string (for ES5 and lower)\r\n * @param str Source string\r\n * @param suffix Suffix to search for in the source string\r\n * @returns Boolean indicating whether the suffix was found (true) or not (false)\r\n */\r\n StringTools.StartsWith = function (str, suffix) {\r\n return str.indexOf(suffix) === 0;\r\n };\r\n /**\r\n * Decodes a buffer into a string\r\n * @param buffer The buffer to decode\r\n * @returns The decoded string\r\n */\r\n StringTools.Decode = function (buffer) {\r\n if (typeof TextDecoder !== \"undefined\") {\r\n return new TextDecoder().decode(buffer);\r\n }\r\n var result = \"\";\r\n for (var i = 0; i < buffer.byteLength; i++) {\r\n result += String.fromCharCode(buffer[i]);\r\n }\r\n return result;\r\n };\r\n /**\r\n * Encode a buffer to a base64 string\r\n * @param buffer defines the buffer to encode\r\n * @returns the encoded string\r\n */\r\n StringTools.EncodeArrayBufferToBase64 = function (buffer) {\r\n var keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\r\n var output = \"\";\r\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\r\n var i = 0;\r\n var bytes = ArrayBuffer.isView(buffer) ? new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) : new Uint8Array(buffer);\r\n while (i < bytes.length) {\r\n chr1 = bytes[i++];\r\n chr2 = i < bytes.length ? bytes[i++] : Number.NaN;\r\n chr3 = i < bytes.length ? bytes[i++] : Number.NaN;\r\n enc1 = chr1 >> 2;\r\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\r\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\r\n enc4 = chr3 & 63;\r\n if (isNaN(chr2)) {\r\n enc3 = enc4 = 64;\r\n }\r\n else if (isNaN(chr3)) {\r\n enc4 = 64;\r\n }\r\n output += keyStr.charAt(enc1) + keyStr.charAt(enc2) +\r\n keyStr.charAt(enc3) + keyStr.charAt(enc4);\r\n }\r\n return output;\r\n };\r\n return StringTools;\r\n}());\r\nexport { StringTools };\r\n//# sourceMappingURL=stringTools.js.map"
  3115. },
  3116. {
  3117. "id": "../../.temp/packageES6Dev/core/Misc/webRequest.js",
  3118. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\webRequest.js",
  3119. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/webRequest.js",
  3120. "index": 20,
  3121. "index2": 15,
  3122. "size": 5569,
  3123. "cacheable": true,
  3124. "built": true,
  3125. "optional": false,
  3126. "prefetched": false,
  3127. "chunks": [
  3128. "thinEngineOnly"
  3129. ],
  3130. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3131. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3132. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3133. "issuerPath": [
  3134. {
  3135. "id": "./thinEngineOnly.ts",
  3136. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3137. "name": "./thinEngineOnly.ts",
  3138. "profile": {
  3139. "factory": 25,
  3140. "building": 1793
  3141. }
  3142. },
  3143. {
  3144. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3145. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3146. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3147. "profile": {
  3148. "factory": 10,
  3149. "building": 63
  3150. }
  3151. },
  3152. {
  3153. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3154. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3155. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3156. "profile": {
  3157. "factory": 6,
  3158. "building": 38,
  3159. "dependencies": 28
  3160. }
  3161. }
  3162. ],
  3163. "profile": {
  3164. "factory": 33,
  3165. "building": 7,
  3166. "dependencies": 10
  3167. },
  3168. "failed": false,
  3169. "errors": 0,
  3170. "warnings": 0,
  3171. "assets": [],
  3172. "reasons": [
  3173. {
  3174. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3175. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3176. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3177. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3178. "type": "harmony side effect evaluation",
  3179. "userRequest": "./webRequest",
  3180. "loc": "2:0-42"
  3181. },
  3182. {
  3183. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3184. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3185. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3186. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3187. "type": "harmony import specifier",
  3188. "userRequest": "./webRequest",
  3189. "loc": "22:30-40"
  3190. },
  3191. {
  3192. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3193. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3194. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3195. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3196. "type": "harmony import specifier",
  3197. "userRequest": "./webRequest",
  3198. "loc": "297:30-40"
  3199. },
  3200. {
  3201. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3202. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3203. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3204. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3205. "type": "harmony import specifier",
  3206. "userRequest": "./webRequest",
  3207. "loc": "344:46-56"
  3208. }
  3209. ],
  3210. "providedExports": [
  3211. "WebRequest"
  3212. ],
  3213. "optimizationBailout": [],
  3214. "depth": 3,
  3215. "source": "/**\r\n * Extended version of XMLHttpRequest with support for customizations (headers, ...)\r\n */\r\nvar WebRequest = /** @class */ (function () {\r\n function WebRequest() {\r\n this._xhr = new XMLHttpRequest();\r\n }\r\n WebRequest.prototype._injectCustomRequestHeaders = function () {\r\n for (var key in WebRequest.CustomRequestHeaders) {\r\n var val = WebRequest.CustomRequestHeaders[key];\r\n if (val) {\r\n this._xhr.setRequestHeader(key, val);\r\n }\r\n }\r\n };\r\n Object.defineProperty(WebRequest.prototype, \"onprogress\", {\r\n /**\r\n * Gets or sets a function to be called when loading progress changes\r\n */\r\n get: function () {\r\n return this._xhr.onprogress;\r\n },\r\n set: function (value) {\r\n this._xhr.onprogress = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"readyState\", {\r\n /**\r\n * Returns client's state\r\n */\r\n get: function () {\r\n return this._xhr.readyState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"status\", {\r\n /**\r\n * Returns client's status\r\n */\r\n get: function () {\r\n return this._xhr.status;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"statusText\", {\r\n /**\r\n * Returns client's status as a text\r\n */\r\n get: function () {\r\n return this._xhr.statusText;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"response\", {\r\n /**\r\n * Returns client's response\r\n */\r\n get: function () {\r\n return this._xhr.response;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"responseURL\", {\r\n /**\r\n * Returns client's response url\r\n */\r\n get: function () {\r\n return this._xhr.responseURL;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"responseText\", {\r\n /**\r\n * Returns client's response as text\r\n */\r\n get: function () {\r\n return this._xhr.responseText;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"responseType\", {\r\n /**\r\n * Gets or sets the expected response type\r\n */\r\n get: function () {\r\n return this._xhr.responseType;\r\n },\r\n set: function (value) {\r\n this._xhr.responseType = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n WebRequest.prototype.addEventListener = function (type, listener, options) {\r\n this._xhr.addEventListener(type, listener, options);\r\n };\r\n WebRequest.prototype.removeEventListener = function (type, listener, options) {\r\n this._xhr.removeEventListener(type, listener, options);\r\n };\r\n /**\r\n * Cancels any network activity\r\n */\r\n WebRequest.prototype.abort = function () {\r\n this._xhr.abort();\r\n };\r\n /**\r\n * Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD\r\n * @param body defines an optional request body\r\n */\r\n WebRequest.prototype.send = function (body) {\r\n if (WebRequest.CustomRequestHeaders) {\r\n this._injectCustomRequestHeaders();\r\n }\r\n this._xhr.send(body);\r\n };\r\n /**\r\n * Sets the request method, request URL\r\n * @param method defines the method to use (GET, POST, etc..)\r\n * @param url defines the url to connect with\r\n */\r\n WebRequest.prototype.open = function (method, url) {\r\n for (var _i = 0, _a = WebRequest.CustomRequestModifiers; _i < _a.length; _i++) {\r\n var update = _a[_i];\r\n update(this._xhr, url);\r\n }\r\n // Clean url\r\n url = url.replace(\"file:http:\", \"http:\");\r\n url = url.replace(\"file:https:\", \"https:\");\r\n return this._xhr.open(method, url, true);\r\n };\r\n /**\r\n * Sets the value of a request header.\r\n * @param name The name of the header whose value is to be set\r\n * @param value The value to set as the body of the header\r\n */\r\n WebRequest.prototype.setRequestHeader = function (name, value) {\r\n this._xhr.setRequestHeader(name, value);\r\n };\r\n /**\r\n * Get the string containing the text of a particular header's value.\r\n * @param name The name of the header\r\n * @returns The string containing the text of the given header name\r\n */\r\n WebRequest.prototype.getResponseHeader = function (name) {\r\n return this._xhr.getResponseHeader(name);\r\n };\r\n /**\r\n * Custom HTTP Request Headers to be sent with XMLHttpRequests\r\n * i.e. when loading files, where the server/service expects an Authorization header\r\n */\r\n WebRequest.CustomRequestHeaders = {};\r\n /**\r\n * Add callback functions in this array to update all the requests before they get sent to the network\r\n */\r\n WebRequest.CustomRequestModifiers = new Array();\r\n return WebRequest;\r\n}());\r\nexport { WebRequest };\r\n//# sourceMappingURL=webRequest.js.map"
  3216. },
  3217. {
  3218. "id": "../../.temp/packageES6Dev/core/States/alphaCullingState.js",
  3219. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\States\\alphaCullingState.js",
  3220. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/alphaCullingState.js",
  3221. "index": 27,
  3222. "index2": 25,
  3223. "size": 4862,
  3224. "cacheable": true,
  3225. "built": true,
  3226. "optional": false,
  3227. "prefetched": false,
  3228. "chunks": [
  3229. "thinEngineOnly"
  3230. ],
  3231. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3232. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3233. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3234. "issuerPath": [
  3235. {
  3236. "id": "./thinEngineOnly.ts",
  3237. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3238. "name": "./thinEngineOnly.ts",
  3239. "profile": {
  3240. "factory": 25,
  3241. "building": 1793
  3242. }
  3243. },
  3244. {
  3245. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3246. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3247. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3248. "profile": {
  3249. "factory": 10,
  3250. "building": 63
  3251. }
  3252. }
  3253. ],
  3254. "profile": {
  3255. "factory": 6,
  3256. "building": 38,
  3257. "dependencies": 28
  3258. },
  3259. "failed": false,
  3260. "errors": 0,
  3261. "warnings": 0,
  3262. "assets": [],
  3263. "reasons": [
  3264. {
  3265. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3266. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3267. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3268. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3269. "type": "harmony side effect evaluation",
  3270. "userRequest": "../States/alphaCullingState",
  3271. "loc": "7:0-57"
  3272. },
  3273. {
  3274. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3275. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3276. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3277. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3278. "type": "harmony import specifier",
  3279. "userRequest": "../States/alphaCullingState",
  3280. "loc": "99:31-41"
  3281. }
  3282. ],
  3283. "providedExports": [
  3284. "AlphaState"
  3285. ],
  3286. "optimizationBailout": [],
  3287. "depth": 2,
  3288. "source": "/**\r\n * @hidden\r\n **/\r\nvar AlphaState = /** @class */ (function () {\r\n /**\r\n * Initializes the state.\r\n */\r\n function AlphaState() {\r\n this._isAlphaBlendDirty = false;\r\n this._isBlendFunctionParametersDirty = false;\r\n this._isBlendEquationParametersDirty = false;\r\n this._isBlendConstantsDirty = false;\r\n this._alphaBlend = false;\r\n this._blendFunctionParameters = new Array(4);\r\n this._blendEquationParameters = new Array(2);\r\n this._blendConstants = new Array(4);\r\n this.reset();\r\n }\r\n Object.defineProperty(AlphaState.prototype, \"isDirty\", {\r\n get: function () {\r\n return this._isAlphaBlendDirty || this._isBlendFunctionParametersDirty;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AlphaState.prototype, \"alphaBlend\", {\r\n get: function () {\r\n return this._alphaBlend;\r\n },\r\n set: function (value) {\r\n if (this._alphaBlend === value) {\r\n return;\r\n }\r\n this._alphaBlend = value;\r\n this._isAlphaBlendDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n AlphaState.prototype.setAlphaBlendConstants = function (r, g, b, a) {\r\n if (this._blendConstants[0] === r &&\r\n this._blendConstants[1] === g &&\r\n this._blendConstants[2] === b &&\r\n this._blendConstants[3] === a) {\r\n return;\r\n }\r\n this._blendConstants[0] = r;\r\n this._blendConstants[1] = g;\r\n this._blendConstants[2] = b;\r\n this._blendConstants[3] = a;\r\n this._isBlendConstantsDirty = true;\r\n };\r\n AlphaState.prototype.setAlphaBlendFunctionParameters = function (value0, value1, value2, value3) {\r\n if (this._blendFunctionParameters[0] === value0 &&\r\n this._blendFunctionParameters[1] === value1 &&\r\n this._blendFunctionParameters[2] === value2 &&\r\n this._blendFunctionParameters[3] === value3) {\r\n return;\r\n }\r\n this._blendFunctionParameters[0] = value0;\r\n this._blendFunctionParameters[1] = value1;\r\n this._blendFunctionParameters[2] = value2;\r\n this._blendFunctionParameters[3] = value3;\r\n this._isBlendFunctionParametersDirty = true;\r\n };\r\n AlphaState.prototype.setAlphaEquationParameters = function (rgb, alpha) {\r\n if (this._blendEquationParameters[0] === rgb &&\r\n this._blendEquationParameters[1] === alpha) {\r\n return;\r\n }\r\n this._blendEquationParameters[0] = rgb;\r\n this._blendEquationParameters[1] = alpha;\r\n this._isBlendEquationParametersDirty = true;\r\n };\r\n AlphaState.prototype.reset = function () {\r\n this._alphaBlend = false;\r\n this._blendFunctionParameters[0] = null;\r\n this._blendFunctionParameters[1] = null;\r\n this._blendFunctionParameters[2] = null;\r\n this._blendFunctionParameters[3] = null;\r\n this._blendEquationParameters[0] = null;\r\n this._blendEquationParameters[1] = null;\r\n this._blendConstants[0] = null;\r\n this._blendConstants[1] = null;\r\n this._blendConstants[2] = null;\r\n this._blendConstants[3] = null;\r\n this._isAlphaBlendDirty = true;\r\n this._isBlendFunctionParametersDirty = false;\r\n this._isBlendEquationParametersDirty = false;\r\n this._isBlendConstantsDirty = false;\r\n };\r\n AlphaState.prototype.apply = function (gl) {\r\n if (!this.isDirty) {\r\n return;\r\n }\r\n // Alpha blend\r\n if (this._isAlphaBlendDirty) {\r\n if (this._alphaBlend) {\r\n gl.enable(gl.BLEND);\r\n }\r\n else {\r\n gl.disable(gl.BLEND);\r\n }\r\n this._isAlphaBlendDirty = false;\r\n }\r\n // Alpha function\r\n if (this._isBlendFunctionParametersDirty) {\r\n gl.blendFuncSeparate(this._blendFunctionParameters[0], this._blendFunctionParameters[1], this._blendFunctionParameters[2], this._blendFunctionParameters[3]);\r\n this._isBlendFunctionParametersDirty = false;\r\n }\r\n // Alpha equation\r\n if (this._isBlendEquationParametersDirty) {\r\n gl.blendEquationSeparate(this._blendEquationParameters[0], this._blendEquationParameters[1]);\r\n this._isBlendEquationParametersDirty = false;\r\n }\r\n // Constants\r\n if (this._isBlendConstantsDirty) {\r\n gl.blendColor(this._blendConstants[0], this._blendConstants[1], this._blendConstants[2], this._blendConstants[3]);\r\n this._isBlendConstantsDirty = false;\r\n }\r\n };\r\n return AlphaState;\r\n}());\r\nexport { AlphaState };\r\n//# sourceMappingURL=alphaCullingState.js.map"
  3289. },
  3290. {
  3291. "id": "../../.temp/packageES6Dev/core/States/depthCullingState.js",
  3292. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\States\\depthCullingState.js",
  3293. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/depthCullingState.js",
  3294. "index": 25,
  3295. "index2": 23,
  3296. "size": 6119,
  3297. "cacheable": true,
  3298. "built": true,
  3299. "optional": false,
  3300. "prefetched": false,
  3301. "chunks": [
  3302. "thinEngineOnly"
  3303. ],
  3304. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3305. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3306. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3307. "issuerPath": [
  3308. {
  3309. "id": "./thinEngineOnly.ts",
  3310. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3311. "name": "./thinEngineOnly.ts",
  3312. "profile": {
  3313. "factory": 25,
  3314. "building": 1793
  3315. }
  3316. },
  3317. {
  3318. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3319. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3320. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3321. "profile": {
  3322. "factory": 10,
  3323. "building": 63
  3324. }
  3325. }
  3326. ],
  3327. "profile": {
  3328. "factory": 6,
  3329. "building": 38,
  3330. "dependencies": 28
  3331. },
  3332. "failed": false,
  3333. "errors": 0,
  3334. "warnings": 0,
  3335. "assets": [],
  3336. "reasons": [
  3337. {
  3338. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3339. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3340. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3341. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3342. "type": "harmony side effect evaluation",
  3343. "userRequest": "../States/depthCullingState",
  3344. "loc": "5:0-64"
  3345. },
  3346. {
  3347. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3348. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3349. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3350. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3351. "type": "harmony import specifier",
  3352. "userRequest": "../States/depthCullingState",
  3353. "loc": "95:38-55"
  3354. }
  3355. ],
  3356. "providedExports": [
  3357. "DepthCullingState"
  3358. ],
  3359. "optimizationBailout": [],
  3360. "depth": 2,
  3361. "source": "/**\r\n * @hidden\r\n **/\r\nvar DepthCullingState = /** @class */ (function () {\r\n /**\r\n * Initializes the state.\r\n */\r\n function DepthCullingState() {\r\n this._isDepthTestDirty = false;\r\n this._isDepthMaskDirty = false;\r\n this._isDepthFuncDirty = false;\r\n this._isCullFaceDirty = false;\r\n this._isCullDirty = false;\r\n this._isZOffsetDirty = false;\r\n this._isFrontFaceDirty = false;\r\n this.reset();\r\n }\r\n Object.defineProperty(DepthCullingState.prototype, \"isDirty\", {\r\n get: function () {\r\n return this._isDepthFuncDirty || this._isDepthTestDirty || this._isDepthMaskDirty || this._isCullFaceDirty || this._isCullDirty || this._isZOffsetDirty || this._isFrontFaceDirty;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"zOffset\", {\r\n get: function () {\r\n return this._zOffset;\r\n },\r\n set: function (value) {\r\n if (this._zOffset === value) {\r\n return;\r\n }\r\n this._zOffset = value;\r\n this._isZOffsetDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"cullFace\", {\r\n get: function () {\r\n return this._cullFace;\r\n },\r\n set: function (value) {\r\n if (this._cullFace === value) {\r\n return;\r\n }\r\n this._cullFace = value;\r\n this._isCullFaceDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"cull\", {\r\n get: function () {\r\n return this._cull;\r\n },\r\n set: function (value) {\r\n if (this._cull === value) {\r\n return;\r\n }\r\n this._cull = value;\r\n this._isCullDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"depthFunc\", {\r\n get: function () {\r\n return this._depthFunc;\r\n },\r\n set: function (value) {\r\n if (this._depthFunc === value) {\r\n return;\r\n }\r\n this._depthFunc = value;\r\n this._isDepthFuncDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"depthMask\", {\r\n get: function () {\r\n return this._depthMask;\r\n },\r\n set: function (value) {\r\n if (this._depthMask === value) {\r\n return;\r\n }\r\n this._depthMask = value;\r\n this._isDepthMaskDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"depthTest\", {\r\n get: function () {\r\n return this._depthTest;\r\n },\r\n set: function (value) {\r\n if (this._depthTest === value) {\r\n return;\r\n }\r\n this._depthTest = value;\r\n this._isDepthTestDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"frontFace\", {\r\n get: function () {\r\n return this._frontFace;\r\n },\r\n set: function (value) {\r\n if (this._frontFace === value) {\r\n return;\r\n }\r\n this._frontFace = value;\r\n this._isFrontFaceDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n DepthCullingState.prototype.reset = function () {\r\n this._depthMask = true;\r\n this._depthTest = true;\r\n this._depthFunc = null;\r\n this._cullFace = null;\r\n this._cull = null;\r\n this._zOffset = 0;\r\n this._frontFace = null;\r\n this._isDepthTestDirty = true;\r\n this._isDepthMaskDirty = true;\r\n this._isDepthFuncDirty = false;\r\n this._isCullFaceDirty = false;\r\n this._isCullDirty = false;\r\n this._isZOffsetDirty = false;\r\n this._isFrontFaceDirty = false;\r\n };\r\n DepthCullingState.prototype.apply = function (gl) {\r\n if (!this.isDirty) {\r\n return;\r\n }\r\n // Cull\r\n if (this._isCullDirty) {\r\n if (this.cull) {\r\n gl.enable(gl.CULL_FACE);\r\n }\r\n else {\r\n gl.disable(gl.CULL_FACE);\r\n }\r\n this._isCullDirty = false;\r\n }\r\n // Cull face\r\n if (this._isCullFaceDirty) {\r\n gl.cullFace(this.cullFace);\r\n this._isCullFaceDirty = false;\r\n }\r\n // Depth mask\r\n if (this._isDepthMaskDirty) {\r\n gl.depthMask(this.depthMask);\r\n this._isDepthMaskDirty = false;\r\n }\r\n // Depth test\r\n if (this._isDepthTestDirty) {\r\n if (this.depthTest) {\r\n gl.enable(gl.DEPTH_TEST);\r\n }\r\n else {\r\n gl.disable(gl.DEPTH_TEST);\r\n }\r\n this._isDepthTestDirty = false;\r\n }\r\n // Depth func\r\n if (this._isDepthFuncDirty) {\r\n gl.depthFunc(this.depthFunc);\r\n this._isDepthFuncDirty = false;\r\n }\r\n // zOffset\r\n if (this._isZOffsetDirty) {\r\n if (this.zOffset) {\r\n gl.enable(gl.POLYGON_OFFSET_FILL);\r\n gl.polygonOffset(this.zOffset, 0);\r\n }\r\n else {\r\n gl.disable(gl.POLYGON_OFFSET_FILL);\r\n }\r\n this._isZOffsetDirty = false;\r\n }\r\n // Front face\r\n if (this._isFrontFaceDirty) {\r\n gl.frontFace(this.frontFace);\r\n this._isFrontFaceDirty = false;\r\n }\r\n };\r\n return DepthCullingState;\r\n}());\r\nexport { DepthCullingState };\r\n//# sourceMappingURL=depthCullingState.js.map"
  3362. },
  3363. {
  3364. "id": "../../.temp/packageES6Dev/core/States/stencilState.js",
  3365. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\States\\stencilState.js",
  3366. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/stencilState.js",
  3367. "index": 26,
  3368. "index2": 24,
  3369. "size": 6340,
  3370. "cacheable": true,
  3371. "built": true,
  3372. "optional": false,
  3373. "prefetched": false,
  3374. "chunks": [
  3375. "thinEngineOnly"
  3376. ],
  3377. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3378. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3379. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3380. "issuerPath": [
  3381. {
  3382. "id": "./thinEngineOnly.ts",
  3383. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3384. "name": "./thinEngineOnly.ts",
  3385. "profile": {
  3386. "factory": 25,
  3387. "building": 1793
  3388. }
  3389. },
  3390. {
  3391. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3392. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3393. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3394. "profile": {
  3395. "factory": 10,
  3396. "building": 63
  3397. }
  3398. }
  3399. ],
  3400. "profile": {
  3401. "factory": 6,
  3402. "building": 38,
  3403. "dependencies": 28
  3404. },
  3405. "failed": false,
  3406. "errors": 0,
  3407. "warnings": 0,
  3408. "assets": [],
  3409. "reasons": [
  3410. {
  3411. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3412. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3413. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3414. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3415. "type": "harmony side effect evaluation",
  3416. "userRequest": "../States/stencilState",
  3417. "loc": "6:0-54"
  3418. },
  3419. {
  3420. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3421. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3422. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3423. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3424. "type": "harmony import specifier",
  3425. "userRequest": "../States/stencilState",
  3426. "loc": "97:33-45"
  3427. }
  3428. ],
  3429. "providedExports": [
  3430. "StencilState"
  3431. ],
  3432. "optimizationBailout": [],
  3433. "depth": 2,
  3434. "source": "/**\r\n * @hidden\r\n **/\r\nvar StencilState = /** @class */ (function () {\r\n function StencilState() {\r\n this._isStencilTestDirty = false;\r\n this._isStencilMaskDirty = false;\r\n this._isStencilFuncDirty = false;\r\n this._isStencilOpDirty = false;\r\n this.reset();\r\n }\r\n Object.defineProperty(StencilState.prototype, \"isDirty\", {\r\n get: function () {\r\n return this._isStencilTestDirty || this._isStencilMaskDirty || this._isStencilFuncDirty || this._isStencilOpDirty;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilFunc\", {\r\n get: function () {\r\n return this._stencilFunc;\r\n },\r\n set: function (value) {\r\n if (this._stencilFunc === value) {\r\n return;\r\n }\r\n this._stencilFunc = value;\r\n this._isStencilFuncDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilFuncRef\", {\r\n get: function () {\r\n return this._stencilFuncRef;\r\n },\r\n set: function (value) {\r\n if (this._stencilFuncRef === value) {\r\n return;\r\n }\r\n this._stencilFuncRef = value;\r\n this._isStencilFuncDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilFuncMask\", {\r\n get: function () {\r\n return this._stencilFuncMask;\r\n },\r\n set: function (value) {\r\n if (this._stencilFuncMask === value) {\r\n return;\r\n }\r\n this._stencilFuncMask = value;\r\n this._isStencilFuncDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilOpStencilFail\", {\r\n get: function () {\r\n return this._stencilOpStencilFail;\r\n },\r\n set: function (value) {\r\n if (this._stencilOpStencilFail === value) {\r\n return;\r\n }\r\n this._stencilOpStencilFail = value;\r\n this._isStencilOpDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilOpDepthFail\", {\r\n get: function () {\r\n return this._stencilOpDepthFail;\r\n },\r\n set: function (value) {\r\n if (this._stencilOpDepthFail === value) {\r\n return;\r\n }\r\n this._stencilOpDepthFail = value;\r\n this._isStencilOpDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilOpStencilDepthPass\", {\r\n get: function () {\r\n return this._stencilOpStencilDepthPass;\r\n },\r\n set: function (value) {\r\n if (this._stencilOpStencilDepthPass === value) {\r\n return;\r\n }\r\n this._stencilOpStencilDepthPass = value;\r\n this._isStencilOpDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilMask\", {\r\n get: function () {\r\n return this._stencilMask;\r\n },\r\n set: function (value) {\r\n if (this._stencilMask === value) {\r\n return;\r\n }\r\n this._stencilMask = value;\r\n this._isStencilMaskDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilTest\", {\r\n get: function () {\r\n return this._stencilTest;\r\n },\r\n set: function (value) {\r\n if (this._stencilTest === value) {\r\n return;\r\n }\r\n this._stencilTest = value;\r\n this._isStencilTestDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n StencilState.prototype.reset = function () {\r\n this._stencilTest = false;\r\n this._stencilMask = 0xFF;\r\n this._stencilFunc = StencilState.ALWAYS;\r\n this._stencilFuncRef = 1;\r\n this._stencilFuncMask = 0xFF;\r\n this._stencilOpStencilFail = StencilState.KEEP;\r\n this._stencilOpDepthFail = StencilState.KEEP;\r\n this._stencilOpStencilDepthPass = StencilState.REPLACE;\r\n this._isStencilTestDirty = true;\r\n this._isStencilMaskDirty = true;\r\n this._isStencilFuncDirty = true;\r\n this._isStencilOpDirty = true;\r\n };\r\n StencilState.prototype.apply = function (gl) {\r\n if (!this.isDirty) {\r\n return;\r\n }\r\n // Stencil test\r\n if (this._isStencilTestDirty) {\r\n if (this.stencilTest) {\r\n gl.enable(gl.STENCIL_TEST);\r\n }\r\n else {\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n this._isStencilTestDirty = false;\r\n }\r\n // Stencil mask\r\n if (this._isStencilMaskDirty) {\r\n gl.stencilMask(this.stencilMask);\r\n this._isStencilMaskDirty = false;\r\n }\r\n // Stencil func\r\n if (this._isStencilFuncDirty) {\r\n gl.stencilFunc(this.stencilFunc, this.stencilFuncRef, this.stencilFuncMask);\r\n this._isStencilFuncDirty = false;\r\n }\r\n // Stencil op\r\n if (this._isStencilOpDirty) {\r\n gl.stencilOp(this.stencilOpStencilFail, this.stencilOpDepthFail, this.stencilOpStencilDepthPass);\r\n this._isStencilOpDirty = false;\r\n }\r\n };\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */\r\n StencilState.ALWAYS = 519;\r\n /** Passed to stencilOperation to specify that stencil value must be kept */\r\n StencilState.KEEP = 7680;\r\n /** Passed to stencilOperation to specify that stencil value must be replaced */\r\n StencilState.REPLACE = 7681;\r\n return StencilState;\r\n}());\r\nexport { StencilState };\r\n//# sourceMappingURL=stencilState.js.map"
  3435. },
  3436. {
  3437. "id": "../../.temp/packageES6Dev/core/node_modules/tslib/tslib.es6.js",
  3438. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\node_modules\\tslib\\tslib.es6.js",
  3439. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/node_modules/tslib/tslib.es6.js",
  3440. "index": 12,
  3441. "index2": 7,
  3442. "size": 9436,
  3443. "cacheable": true,
  3444. "built": true,
  3445. "optional": false,
  3446. "prefetched": false,
  3447. "chunks": [
  3448. "thinEngineOnly"
  3449. ],
  3450. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3451. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3452. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3453. "issuerPath": [
  3454. {
  3455. "id": "./thinEngineOnly.ts",
  3456. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3457. "name": "./thinEngineOnly.ts",
  3458. "profile": {
  3459. "factory": 25,
  3460. "building": 1793
  3461. }
  3462. },
  3463. {
  3464. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3465. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3466. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3467. "profile": {
  3468. "factory": 10,
  3469. "building": 63
  3470. }
  3471. },
  3472. {
  3473. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3474. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3475. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3476. "profile": {
  3477. "factory": 6,
  3478. "building": 38,
  3479. "dependencies": 28
  3480. }
  3481. }
  3482. ],
  3483. "profile": {
  3484. "factory": 33,
  3485. "building": 7,
  3486. "dependencies": 10
  3487. },
  3488. "failed": false,
  3489. "errors": 0,
  3490. "warnings": 0,
  3491. "assets": [],
  3492. "reasons": [
  3493. {
  3494. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  3495. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js",
  3496. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  3497. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  3498. "type": "harmony side effect evaluation",
  3499. "userRequest": "tslib",
  3500. "loc": "1:0-34"
  3501. },
  3502. {
  3503. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  3504. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js",
  3505. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  3506. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  3507. "type": "harmony import specifier",
  3508. "userRequest": "tslib",
  3509. "loc": "5:4-13"
  3510. },
  3511. {
  3512. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  3513. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js",
  3514. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  3515. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  3516. "type": "harmony side effect evaluation",
  3517. "userRequest": "tslib",
  3518. "loc": "1:0-34"
  3519. },
  3520. {
  3521. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  3522. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js",
  3523. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  3524. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  3525. "type": "harmony import specifier",
  3526. "userRequest": "tslib",
  3527. "loc": "5:4-13"
  3528. },
  3529. {
  3530. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  3531. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  3532. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  3533. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  3534. "type": "harmony side effect evaluation",
  3535. "userRequest": "tslib",
  3536. "loc": "1:0-34"
  3537. },
  3538. {
  3539. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  3540. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  3541. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  3542. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  3543. "type": "harmony import specifier",
  3544. "userRequest": "tslib",
  3545. "loc": "5:4-13"
  3546. },
  3547. {
  3548. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  3549. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js",
  3550. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  3551. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  3552. "type": "harmony side effect evaluation",
  3553. "userRequest": "tslib",
  3554. "loc": "1:0-34"
  3555. },
  3556. {
  3557. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  3558. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js",
  3559. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  3560. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  3561. "type": "harmony import specifier",
  3562. "userRequest": "tslib",
  3563. "loc": "5:4-13"
  3564. },
  3565. {
  3566. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  3567. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js",
  3568. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  3569. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  3570. "type": "harmony side effect evaluation",
  3571. "userRequest": "tslib",
  3572. "loc": "1:0-34"
  3573. },
  3574. {
  3575. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  3576. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js",
  3577. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  3578. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  3579. "type": "harmony import specifier",
  3580. "userRequest": "tslib",
  3581. "loc": "5:4-13"
  3582. },
  3583. {
  3584. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  3585. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js",
  3586. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  3587. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  3588. "type": "harmony side effect evaluation",
  3589. "userRequest": "tslib",
  3590. "loc": "1:0-34"
  3591. },
  3592. {
  3593. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  3594. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js",
  3595. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  3596. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  3597. "type": "harmony import specifier",
  3598. "userRequest": "tslib",
  3599. "loc": "5:4-13"
  3600. },
  3601. {
  3602. "moduleId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  3603. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  3604. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  3605. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  3606. "type": "harmony side effect evaluation",
  3607. "userRequest": "tslib",
  3608. "loc": "1:0-34"
  3609. },
  3610. {
  3611. "moduleId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  3612. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  3613. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  3614. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  3615. "type": "harmony import specifier",
  3616. "userRequest": "tslib",
  3617. "loc": "5:4-13"
  3618. },
  3619. {
  3620. "moduleId": "../../.temp/packageES6Dev/core/Misc/baseError.js",
  3621. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\baseError.js",
  3622. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/baseError.js",
  3623. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/baseError.js",
  3624. "type": "harmony side effect evaluation",
  3625. "userRequest": "tslib",
  3626. "loc": "1:0-34"
  3627. },
  3628. {
  3629. "moduleId": "../../.temp/packageES6Dev/core/Misc/baseError.js",
  3630. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\baseError.js",
  3631. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/baseError.js",
  3632. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/baseError.js",
  3633. "type": "harmony import specifier",
  3634. "userRequest": "tslib",
  3635. "loc": "7:4-13"
  3636. },
  3637. {
  3638. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3639. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3640. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3641. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3642. "type": "harmony side effect evaluation",
  3643. "userRequest": "tslib",
  3644. "loc": "1:0-34"
  3645. },
  3646. {
  3647. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3648. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3649. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3650. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3651. "type": "harmony import specifier",
  3652. "userRequest": "tslib",
  3653. "loc": "11:4-13"
  3654. },
  3655. {
  3656. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3657. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3658. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3659. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3660. "type": "harmony import specifier",
  3661. "userRequest": "tslib",
  3662. "loc": "35:4-13"
  3663. },
  3664. {
  3665. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  3666. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  3667. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3668. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  3669. "type": "harmony import specifier",
  3670. "userRequest": "tslib",
  3671. "loc": "53:4-13"
  3672. }
  3673. ],
  3674. "providedExports": [
  3675. "__extends",
  3676. "__assign",
  3677. "__rest",
  3678. "__decorate",
  3679. "__param",
  3680. "__metadata",
  3681. "__awaiter",
  3682. "__generator",
  3683. "__exportStar",
  3684. "__values",
  3685. "__read",
  3686. "__spread",
  3687. "__spreadArrays",
  3688. "__await",
  3689. "__asyncGenerator",
  3690. "__asyncDelegator",
  3691. "__asyncValues",
  3692. "__makeTemplateObject",
  3693. "__importStar",
  3694. "__importDefault"
  3695. ],
  3696. "optimizationBailout": [],
  3697. "depth": 3,
  3698. "source": "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n"
  3699. },
  3700. {
  3701. "id": "./thinEngineOnly.ts",
  3702. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3703. "name": "./thinEngineOnly.ts",
  3704. "index": 0,
  3705. "index2": 34,
  3706. "size": 146,
  3707. "cacheable": true,
  3708. "built": true,
  3709. "optional": false,
  3710. "prefetched": false,
  3711. "chunks": [
  3712. "thinEngineOnly"
  3713. ],
  3714. "issuer": null,
  3715. "issuerId": null,
  3716. "issuerName": null,
  3717. "issuerPath": null,
  3718. "profile": {
  3719. "factory": 25,
  3720. "building": 1793
  3721. },
  3722. "failed": false,
  3723. "errors": 0,
  3724. "warnings": 0,
  3725. "assets": [],
  3726. "reasons": [
  3727. {
  3728. "moduleId": null,
  3729. "moduleIdentifier": null,
  3730. "module": null,
  3731. "moduleName": null,
  3732. "type": "single entry",
  3733. "userRequest": "C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3734. "loc": "thinEngineOnly"
  3735. }
  3736. ],
  3737. "providedExports": [],
  3738. "optimizationBailout": [],
  3739. "depth": 0,
  3740. "source": "import { ThinEngine } from \"@babylonjs/core/Engines/thinEngine\";\r\nvar canvas = document.getElementById(\"renderCanvas\");\r\nnew ThinEngine(canvas);\r\n"
  3741. }
  3742. ],
  3743. "filteredModules": 0,
  3744. "origins": [
  3745. {
  3746. "module": "",
  3747. "moduleIdentifier": "",
  3748. "moduleName": "",
  3749. "loc": "thinEngineOnly",
  3750. "request": "C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3751. "reasons": []
  3752. }
  3753. ]
  3754. }
  3755. ],
  3756. "modules": [
  3757. {
  3758. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  3759. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js",
  3760. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  3761. "index": 17,
  3762. "index2": 13,
  3763. "size": 695,
  3764. "cacheable": true,
  3765. "built": true,
  3766. "optional": false,
  3767. "prefetched": false,
  3768. "chunks": [
  3769. "thinEngineOnly"
  3770. ],
  3771. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  3772. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3773. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3774. "issuerPath": [
  3775. {
  3776. "id": "./thinEngineOnly.ts",
  3777. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3778. "name": "./thinEngineOnly.ts",
  3779. "profile": {
  3780. "factory": 25,
  3781. "building": 1793
  3782. }
  3783. },
  3784. {
  3785. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3786. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3787. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3788. "profile": {
  3789. "factory": 10,
  3790. "building": 63
  3791. }
  3792. },
  3793. {
  3794. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  3795. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  3796. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  3797. "profile": {
  3798. "factory": 6,
  3799. "building": 38,
  3800. "dependencies": 28
  3801. }
  3802. },
  3803. {
  3804. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3805. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  3806. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3807. "profile": {
  3808. "factory": 6,
  3809. "building": 10,
  3810. "dependencies": 1
  3811. }
  3812. }
  3813. ],
  3814. "profile": {
  3815. "factory": 9,
  3816. "building": 7,
  3817. "dependencies": 3
  3818. },
  3819. "failed": false,
  3820. "errors": 0,
  3821. "warnings": 0,
  3822. "assets": [],
  3823. "reasons": [
  3824. {
  3825. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3826. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  3827. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3828. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3829. "type": "harmony side effect evaluation",
  3830. "userRequest": "./Expressions/Operators/shaderDefineAndOperator",
  3831. "loc": "7:0-90"
  3832. },
  3833. {
  3834. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3835. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  3836. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3837. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3838. "type": "harmony import specifier",
  3839. "userRequest": "./Expressions/Operators/shaderDefineAndOperator",
  3840. "loc": "66:38-61"
  3841. }
  3842. ],
  3843. "providedExports": [
  3844. "ShaderDefineAndOperator"
  3845. ],
  3846. "optimizationBailout": [],
  3847. "depth": 4,
  3848. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderDefineExpression } from '../shaderDefineExpression';\r\n/** @hidden */\r\nvar ShaderDefineAndOperator = /** @class */ (function (_super) {\r\n __extends(ShaderDefineAndOperator, _super);\r\n function ShaderDefineAndOperator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderDefineAndOperator.prototype.isTrue = function (preprocessors) {\r\n return this.leftOperand.isTrue(preprocessors) && this.rightOperand.isTrue(preprocessors);\r\n };\r\n return ShaderDefineAndOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineAndOperator };\r\n//# sourceMappingURL=shaderDefineAndOperator.js.map"
  3849. },
  3850. {
  3851. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  3852. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js",
  3853. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  3854. "index": 18,
  3855. "index2": 14,
  3856. "size": 1539,
  3857. "cacheable": true,
  3858. "built": true,
  3859. "optional": false,
  3860. "prefetched": false,
  3861. "chunks": [
  3862. "thinEngineOnly"
  3863. ],
  3864. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  3865. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3866. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3867. "issuerPath": [
  3868. {
  3869. "id": "./thinEngineOnly.ts",
  3870. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3871. "name": "./thinEngineOnly.ts",
  3872. "profile": {
  3873. "factory": 25,
  3874. "building": 1793
  3875. }
  3876. },
  3877. {
  3878. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3879. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3880. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3881. "profile": {
  3882. "factory": 10,
  3883. "building": 63
  3884. }
  3885. },
  3886. {
  3887. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  3888. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  3889. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  3890. "profile": {
  3891. "factory": 6,
  3892. "building": 38,
  3893. "dependencies": 28
  3894. }
  3895. },
  3896. {
  3897. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3898. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  3899. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3900. "profile": {
  3901. "factory": 6,
  3902. "building": 10,
  3903. "dependencies": 1
  3904. }
  3905. }
  3906. ],
  3907. "profile": {
  3908. "factory": 9,
  3909. "building": 7,
  3910. "dependencies": 3
  3911. },
  3912. "failed": false,
  3913. "errors": 0,
  3914. "warnings": 0,
  3915. "assets": [],
  3916. "reasons": [
  3917. {
  3918. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3919. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  3920. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3921. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3922. "type": "harmony side effect evaluation",
  3923. "userRequest": "./Expressions/Operators/shaderDefineArithmeticOperator",
  3924. "loc": "8:0-104"
  3925. },
  3926. {
  3927. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3928. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  3929. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3930. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3931. "type": "harmony import specifier",
  3932. "userRequest": "./Expressions/Operators/shaderDefineArithmeticOperator",
  3933. "loc": "59:19-49"
  3934. }
  3935. ],
  3936. "providedExports": [
  3937. "ShaderDefineArithmeticOperator"
  3938. ],
  3939. "optimizationBailout": [],
  3940. "depth": 4,
  3941. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderDefineExpression } from '../shaderDefineExpression';\r\n/** @hidden */\r\nvar ShaderDefineArithmeticOperator = /** @class */ (function (_super) {\r\n __extends(ShaderDefineArithmeticOperator, _super);\r\n function ShaderDefineArithmeticOperator(define, operand, testValue) {\r\n var _this = _super.call(this) || this;\r\n _this.define = define;\r\n _this.operand = operand;\r\n _this.testValue = testValue;\r\n return _this;\r\n }\r\n ShaderDefineArithmeticOperator.prototype.isTrue = function (preprocessors) {\r\n var value = preprocessors[this.define];\r\n if (value === undefined) {\r\n return false;\r\n }\r\n var condition = false;\r\n var left = parseInt(value);\r\n var right = parseInt(this.testValue);\r\n switch (this.operand) {\r\n case \">\":\r\n condition = left > right;\r\n break;\r\n case \"<\":\r\n condition = left < right;\r\n break;\r\n case \"<=\":\r\n condition = left <= right;\r\n break;\r\n case \">=\":\r\n condition = left >= right;\r\n break;\r\n case \"==\":\r\n condition = left === right;\r\n break;\r\n }\r\n return condition;\r\n };\r\n return ShaderDefineArithmeticOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineArithmeticOperator };\r\n//# sourceMappingURL=shaderDefineArithmeticOperator.js.map"
  3942. },
  3943. {
  3944. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  3945. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  3946. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  3947. "index": 14,
  3948. "index2": 11,
  3949. "size": 917,
  3950. "cacheable": true,
  3951. "built": true,
  3952. "optional": false,
  3953. "prefetched": false,
  3954. "chunks": [
  3955. "thinEngineOnly"
  3956. ],
  3957. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  3958. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3959. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3960. "issuerPath": [
  3961. {
  3962. "id": "./thinEngineOnly.ts",
  3963. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  3964. "name": "./thinEngineOnly.ts",
  3965. "profile": {
  3966. "factory": 25,
  3967. "building": 1793
  3968. }
  3969. },
  3970. {
  3971. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  3972. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  3973. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  3974. "profile": {
  3975. "factory": 10,
  3976. "building": 63
  3977. }
  3978. },
  3979. {
  3980. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  3981. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  3982. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  3983. "profile": {
  3984. "factory": 6,
  3985. "building": 38,
  3986. "dependencies": 28
  3987. }
  3988. },
  3989. {
  3990. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3991. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  3992. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  3993. "profile": {
  3994. "factory": 6,
  3995. "building": 10,
  3996. "dependencies": 1
  3997. }
  3998. }
  3999. ],
  4000. "profile": {
  4001. "factory": 9,
  4002. "building": 7,
  4003. "dependencies": 3
  4004. },
  4005. "failed": false,
  4006. "errors": 0,
  4007. "warnings": 0,
  4008. "assets": [],
  4009. "reasons": [
  4010. {
  4011. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4012. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4013. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4014. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4015. "type": "harmony side effect evaluation",
  4016. "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator",
  4017. "loc": "5:0-102"
  4018. },
  4019. {
  4020. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4021. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4022. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4023. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4024. "type": "harmony import specifier",
  4025. "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator",
  4026. "loc": "42:23-52"
  4027. },
  4028. {
  4029. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4030. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4031. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4032. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4033. "type": "harmony import specifier",
  4034. "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator",
  4035. "loc": "55:23-52"
  4036. },
  4037. {
  4038. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4039. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4040. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4041. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4042. "type": "harmony import specifier",
  4043. "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator",
  4044. "loc": "91:38-67"
  4045. },
  4046. {
  4047. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4048. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4049. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4050. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4051. "type": "harmony import specifier",
  4052. "userRequest": "./Expressions/Operators/shaderDefineIsDefinedOperator",
  4053. "loc": "94:38-67"
  4054. }
  4055. ],
  4056. "providedExports": [
  4057. "ShaderDefineIsDefinedOperator"
  4058. ],
  4059. "optimizationBailout": [],
  4060. "depth": 4,
  4061. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderDefineExpression } from \"../shaderDefineExpression\";\r\n/** @hidden */\r\nvar ShaderDefineIsDefinedOperator = /** @class */ (function (_super) {\r\n __extends(ShaderDefineIsDefinedOperator, _super);\r\n function ShaderDefineIsDefinedOperator(define, not) {\r\n if (not === void 0) { not = false; }\r\n var _this = _super.call(this) || this;\r\n _this.define = define;\r\n _this.not = not;\r\n return _this;\r\n }\r\n ShaderDefineIsDefinedOperator.prototype.isTrue = function (preprocessors) {\r\n var condition = preprocessors[this.define] !== undefined;\r\n if (this.not) {\r\n condition = !condition;\r\n }\r\n return condition;\r\n };\r\n return ShaderDefineIsDefinedOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineIsDefinedOperator };\r\n//# sourceMappingURL=shaderDefineIsDefinedOperator.js.map"
  4062. },
  4063. {
  4064. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  4065. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js",
  4066. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  4067. "index": 16,
  4068. "index2": 12,
  4069. "size": 688,
  4070. "cacheable": true,
  4071. "built": true,
  4072. "optional": false,
  4073. "prefetched": false,
  4074. "chunks": [
  4075. "thinEngineOnly"
  4076. ],
  4077. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4078. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4079. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4080. "issuerPath": [
  4081. {
  4082. "id": "./thinEngineOnly.ts",
  4083. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  4084. "name": "./thinEngineOnly.ts",
  4085. "profile": {
  4086. "factory": 25,
  4087. "building": 1793
  4088. }
  4089. },
  4090. {
  4091. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4092. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4093. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4094. "profile": {
  4095. "factory": 10,
  4096. "building": 63
  4097. }
  4098. },
  4099. {
  4100. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4101. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4102. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4103. "profile": {
  4104. "factory": 6,
  4105. "building": 38,
  4106. "dependencies": 28
  4107. }
  4108. },
  4109. {
  4110. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4111. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4112. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4113. "profile": {
  4114. "factory": 6,
  4115. "building": 10,
  4116. "dependencies": 1
  4117. }
  4118. }
  4119. ],
  4120. "profile": {
  4121. "factory": 9,
  4122. "building": 7,
  4123. "dependencies": 3
  4124. },
  4125. "failed": false,
  4126. "errors": 0,
  4127. "warnings": 0,
  4128. "assets": [],
  4129. "reasons": [
  4130. {
  4131. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4132. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4133. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4134. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4135. "type": "harmony side effect evaluation",
  4136. "userRequest": "./Expressions/Operators/shaderDefineOrOperator",
  4137. "loc": "6:0-88"
  4138. },
  4139. {
  4140. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4141. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4142. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4143. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4144. "type": "harmony import specifier",
  4145. "userRequest": "./Expressions/Operators/shaderDefineOrOperator",
  4146. "loc": "78:33-55"
  4147. }
  4148. ],
  4149. "providedExports": [
  4150. "ShaderDefineOrOperator"
  4151. ],
  4152. "optimizationBailout": [],
  4153. "depth": 4,
  4154. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderDefineExpression } from '../shaderDefineExpression';\r\n/** @hidden */\r\nvar ShaderDefineOrOperator = /** @class */ (function (_super) {\r\n __extends(ShaderDefineOrOperator, _super);\r\n function ShaderDefineOrOperator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderDefineOrOperator.prototype.isTrue = function (preprocessors) {\r\n return this.leftOperand.isTrue(preprocessors) || this.rightOperand.isTrue(preprocessors);\r\n };\r\n return ShaderDefineOrOperator;\r\n}(ShaderDefineExpression));\r\nexport { ShaderDefineOrOperator };\r\n//# sourceMappingURL=shaderDefineOrOperator.js.map"
  4155. },
  4156. {
  4157. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/shaderDefineExpression.js",
  4158. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\shaderDefineExpression.js",
  4159. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/shaderDefineExpression.js",
  4160. "index": 15,
  4161. "index2": 10,
  4162. "size": 356,
  4163. "cacheable": true,
  4164. "built": true,
  4165. "optional": false,
  4166. "prefetched": false,
  4167. "chunks": [
  4168. "thinEngineOnly"
  4169. ],
  4170. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  4171. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  4172. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  4173. "issuerPath": [
  4174. {
  4175. "id": "./thinEngineOnly.ts",
  4176. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  4177. "name": "./thinEngineOnly.ts",
  4178. "profile": {
  4179. "factory": 25,
  4180. "building": 1793
  4181. }
  4182. },
  4183. {
  4184. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4185. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4186. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4187. "profile": {
  4188. "factory": 10,
  4189. "building": 63
  4190. }
  4191. },
  4192. {
  4193. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4194. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4195. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4196. "profile": {
  4197. "factory": 6,
  4198. "building": 38,
  4199. "dependencies": 28
  4200. }
  4201. },
  4202. {
  4203. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4204. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4205. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4206. "profile": {
  4207. "factory": 6,
  4208. "building": 10,
  4209. "dependencies": 1
  4210. }
  4211. },
  4212. {
  4213. "id": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  4214. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  4215. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  4216. "profile": {
  4217. "factory": 9,
  4218. "building": 7,
  4219. "dependencies": 3
  4220. }
  4221. }
  4222. ],
  4223. "profile": {
  4224. "factory": 4,
  4225. "building": 1
  4226. },
  4227. "failed": false,
  4228. "errors": 0,
  4229. "warnings": 0,
  4230. "assets": [],
  4231. "reasons": [
  4232. {
  4233. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  4234. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js",
  4235. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  4236. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  4237. "type": "harmony side effect evaluation",
  4238. "userRequest": "../shaderDefineExpression",
  4239. "loc": "2:0-67"
  4240. },
  4241. {
  4242. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  4243. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js",
  4244. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  4245. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  4246. "type": "harmony import specifier",
  4247. "userRequest": "../shaderDefineExpression",
  4248. "loc": "13:2-24"
  4249. },
  4250. {
  4251. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  4252. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js",
  4253. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  4254. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  4255. "type": "harmony side effect evaluation",
  4256. "userRequest": "../shaderDefineExpression",
  4257. "loc": "2:0-67"
  4258. },
  4259. {
  4260. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  4261. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js",
  4262. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  4263. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  4264. "type": "harmony import specifier",
  4265. "userRequest": "../shaderDefineExpression",
  4266. "loc": "41:2-24"
  4267. },
  4268. {
  4269. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  4270. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  4271. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  4272. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  4273. "type": "harmony side effect evaluation",
  4274. "userRequest": "../shaderDefineExpression",
  4275. "loc": "2:0-67"
  4276. },
  4277. {
  4278. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  4279. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  4280. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  4281. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  4282. "type": "harmony import specifier",
  4283. "userRequest": "../shaderDefineExpression",
  4284. "loc": "21:2-24"
  4285. },
  4286. {
  4287. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  4288. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js",
  4289. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  4290. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  4291. "type": "harmony side effect evaluation",
  4292. "userRequest": "../shaderDefineExpression",
  4293. "loc": "2:0-67"
  4294. },
  4295. {
  4296. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  4297. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js",
  4298. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  4299. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  4300. "type": "harmony import specifier",
  4301. "userRequest": "../shaderDefineExpression",
  4302. "loc": "13:2-24"
  4303. }
  4304. ],
  4305. "providedExports": [
  4306. "ShaderDefineExpression"
  4307. ],
  4308. "optimizationBailout": [],
  4309. "depth": 5,
  4310. "source": "/** @hidden */\r\nvar ShaderDefineExpression = /** @class */ (function () {\r\n function ShaderDefineExpression() {\r\n }\r\n ShaderDefineExpression.prototype.isTrue = function (preprocessors) {\r\n return true;\r\n };\r\n return ShaderDefineExpression;\r\n}());\r\nexport { ShaderDefineExpression };\r\n//# sourceMappingURL=shaderDefineExpression.js.map"
  4311. },
  4312. {
  4313. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  4314. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js",
  4315. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  4316. "index": 11,
  4317. "index2": 8,
  4318. "size": 853,
  4319. "cacheable": true,
  4320. "built": true,
  4321. "optional": false,
  4322. "prefetched": false,
  4323. "chunks": [
  4324. "thinEngineOnly"
  4325. ],
  4326. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4327. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4328. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4329. "issuerPath": [
  4330. {
  4331. "id": "./thinEngineOnly.ts",
  4332. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  4333. "name": "./thinEngineOnly.ts",
  4334. "profile": {
  4335. "factory": 25,
  4336. "building": 1793
  4337. }
  4338. },
  4339. {
  4340. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4341. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4342. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4343. "profile": {
  4344. "factory": 10,
  4345. "building": 63
  4346. }
  4347. },
  4348. {
  4349. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4350. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4351. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4352. "profile": {
  4353. "factory": 6,
  4354. "building": 38,
  4355. "dependencies": 28
  4356. }
  4357. },
  4358. {
  4359. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4360. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4361. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4362. "profile": {
  4363. "factory": 6,
  4364. "building": 10,
  4365. "dependencies": 1
  4366. }
  4367. }
  4368. ],
  4369. "profile": {
  4370. "factory": 9,
  4371. "building": 7,
  4372. "dependencies": 3
  4373. },
  4374. "failed": false,
  4375. "errors": 0,
  4376. "warnings": 0,
  4377. "assets": [],
  4378. "reasons": [
  4379. {
  4380. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4381. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4382. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4383. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4384. "type": "harmony side effect evaluation",
  4385. "userRequest": "./shaderCodeConditionNode",
  4386. "loc": "3:0-68"
  4387. },
  4388. {
  4389. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4390. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4391. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4392. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4393. "type": "harmony import specifier",
  4394. "userRequest": "./shaderCodeConditionNode",
  4395. "loc": "129:46-69"
  4396. },
  4397. {
  4398. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4399. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4400. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4401. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4402. "type": "harmony import specifier",
  4403. "userRequest": "./shaderCodeConditionNode",
  4404. "loc": "142:46-69"
  4405. },
  4406. {
  4407. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4408. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4409. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4410. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4411. "type": "harmony import specifier",
  4412. "userRequest": "./shaderCodeConditionNode",
  4413. "loc": "150:46-69"
  4414. }
  4415. ],
  4416. "providedExports": [
  4417. "ShaderCodeConditionNode"
  4418. ],
  4419. "optimizationBailout": [],
  4420. "depth": 4,
  4421. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderCodeNode } from './shaderCodeNode';\r\n/** @hidden */\r\nvar ShaderCodeConditionNode = /** @class */ (function (_super) {\r\n __extends(ShaderCodeConditionNode, _super);\r\n function ShaderCodeConditionNode() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderCodeConditionNode.prototype.process = function (preprocessors, options) {\r\n for (var index = 0; index < this.children.length; index++) {\r\n var node = this.children[index];\r\n if (node.isValid(preprocessors)) {\r\n return node.process(preprocessors, options);\r\n }\r\n }\r\n return \"\";\r\n };\r\n return ShaderCodeConditionNode;\r\n}(ShaderCodeNode));\r\nexport { ShaderCodeConditionNode };\r\n//# sourceMappingURL=shaderCodeConditionNode.js.map"
  4422. },
  4423. {
  4424. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeCursor.js",
  4425. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeCursor.js",
  4426. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeCursor.js",
  4427. "index": 10,
  4428. "index2": 6,
  4429. "size": 1628,
  4430. "cacheable": true,
  4431. "built": true,
  4432. "optional": false,
  4433. "prefetched": false,
  4434. "chunks": [
  4435. "thinEngineOnly"
  4436. ],
  4437. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4438. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4439. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4440. "issuerPath": [
  4441. {
  4442. "id": "./thinEngineOnly.ts",
  4443. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  4444. "name": "./thinEngineOnly.ts",
  4445. "profile": {
  4446. "factory": 25,
  4447. "building": 1793
  4448. }
  4449. },
  4450. {
  4451. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4452. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4453. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4454. "profile": {
  4455. "factory": 10,
  4456. "building": 63
  4457. }
  4458. },
  4459. {
  4460. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4461. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4462. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4463. "profile": {
  4464. "factory": 6,
  4465. "building": 38,
  4466. "dependencies": 28
  4467. }
  4468. },
  4469. {
  4470. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4471. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4472. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4473. "profile": {
  4474. "factory": 6,
  4475. "building": 10,
  4476. "dependencies": 1
  4477. }
  4478. }
  4479. ],
  4480. "profile": {
  4481. "factory": 9,
  4482. "building": 7,
  4483. "dependencies": 3
  4484. },
  4485. "failed": false,
  4486. "errors": 0,
  4487. "warnings": 0,
  4488. "assets": [],
  4489. "reasons": [
  4490. {
  4491. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4492. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4493. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4494. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4495. "type": "harmony side effect evaluation",
  4496. "userRequest": "./shaderCodeCursor",
  4497. "loc": "2:0-54"
  4498. },
  4499. {
  4500. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4501. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4502. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4503. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4504. "type": "harmony import specifier",
  4505. "userRequest": "./shaderCodeCursor",
  4506. "loc": "177:25-41"
  4507. }
  4508. ],
  4509. "providedExports": [
  4510. "ShaderCodeCursor"
  4511. ],
  4512. "optimizationBailout": [],
  4513. "depth": 4,
  4514. "source": "/** @hidden */\r\nvar ShaderCodeCursor = /** @class */ (function () {\r\n function ShaderCodeCursor() {\r\n }\r\n Object.defineProperty(ShaderCodeCursor.prototype, \"currentLine\", {\r\n get: function () {\r\n return this._lines[this.lineIndex];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ShaderCodeCursor.prototype, \"canRead\", {\r\n get: function () {\r\n return this.lineIndex < this._lines.length - 1;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ShaderCodeCursor.prototype, \"lines\", {\r\n set: function (value) {\r\n this._lines = [];\r\n for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {\r\n var line = value_1[_i];\r\n // Prevent removing line break in macros.\r\n if (line[0] === \"#\") {\r\n this._lines.push(line);\r\n continue;\r\n }\r\n var split = line.split(\";\");\r\n for (var index = 0; index < split.length; index++) {\r\n var subLine = split[index];\r\n subLine = subLine.trim();\r\n if (!subLine) {\r\n continue;\r\n }\r\n this._lines.push(subLine + (index !== split.length - 1 ? \";\" : \"\"));\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ShaderCodeCursor;\r\n}());\r\nexport { ShaderCodeCursor };\r\n//# sourceMappingURL=shaderCodeCursor.js.map"
  4515. },
  4516. {
  4517. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  4518. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js",
  4519. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  4520. "index": 8,
  4521. "index2": 5,
  4522. "size": 2903,
  4523. "cacheable": true,
  4524. "built": true,
  4525. "optional": false,
  4526. "prefetched": false,
  4527. "chunks": [
  4528. "thinEngineOnly"
  4529. ],
  4530. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4531. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4532. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4533. "issuerPath": [
  4534. {
  4535. "id": "./thinEngineOnly.ts",
  4536. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  4537. "name": "./thinEngineOnly.ts",
  4538. "profile": {
  4539. "factory": 25,
  4540. "building": 1793
  4541. }
  4542. },
  4543. {
  4544. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4545. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4546. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4547. "profile": {
  4548. "factory": 10,
  4549. "building": 63
  4550. }
  4551. },
  4552. {
  4553. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4554. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4555. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4556. "profile": {
  4557. "factory": 6,
  4558. "building": 38,
  4559. "dependencies": 28
  4560. }
  4561. },
  4562. {
  4563. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4564. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4565. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4566. "profile": {
  4567. "factory": 6,
  4568. "building": 10,
  4569. "dependencies": 1
  4570. }
  4571. }
  4572. ],
  4573. "profile": {
  4574. "factory": 9,
  4575. "building": 7,
  4576. "dependencies": 3
  4577. },
  4578. "failed": false,
  4579. "errors": 0,
  4580. "warnings": 0,
  4581. "assets": [],
  4582. "reasons": [
  4583. {
  4584. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  4585. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js",
  4586. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  4587. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  4588. "type": "harmony side effect evaluation",
  4589. "userRequest": "./shaderCodeNode",
  4590. "loc": "2:0-50"
  4591. },
  4592. {
  4593. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  4594. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js",
  4595. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  4596. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  4597. "type": "harmony import specifier",
  4598. "userRequest": "./shaderCodeNode",
  4599. "loc": "19:2-16"
  4600. },
  4601. {
  4602. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  4603. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js",
  4604. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  4605. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  4606. "type": "harmony side effect evaluation",
  4607. "userRequest": "./shaderCodeNode",
  4608. "loc": "2:0-50"
  4609. },
  4610. {
  4611. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  4612. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js",
  4613. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  4614. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  4615. "type": "harmony import specifier",
  4616. "userRequest": "./shaderCodeNode",
  4617. "loc": "13:2-16"
  4618. },
  4619. {
  4620. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4621. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4622. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4623. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4624. "type": "harmony side effect evaluation",
  4625. "userRequest": "./shaderCodeNode",
  4626. "loc": "1:0-50"
  4627. },
  4628. {
  4629. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4630. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4631. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4632. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4633. "type": "harmony import specifier",
  4634. "userRequest": "./shaderCodeNode",
  4635. "loc": "107:35-49"
  4636. },
  4637. {
  4638. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4639. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4640. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4641. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4642. "type": "harmony import specifier",
  4643. "userRequest": "./shaderCodeNode",
  4644. "loc": "160:34-48"
  4645. },
  4646. {
  4647. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4648. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4649. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4650. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4651. "type": "harmony import specifier",
  4652. "userRequest": "./shaderCodeNode",
  4653. "loc": "176:27-41"
  4654. }
  4655. ],
  4656. "providedExports": [
  4657. "ShaderCodeNode"
  4658. ],
  4659. "optimizationBailout": [],
  4660. "depth": 4,
  4661. "source": "import { StringTools } from '../../Misc/stringTools';\r\n/** @hidden */\r\nvar ShaderCodeNode = /** @class */ (function () {\r\n function ShaderCodeNode() {\r\n this.children = [];\r\n }\r\n ShaderCodeNode.prototype.isValid = function (preprocessors) {\r\n return true;\r\n };\r\n ShaderCodeNode.prototype.process = function (preprocessors, options) {\r\n var result = \"\";\r\n if (this.line) {\r\n var value = this.line;\r\n var processor = options.processor;\r\n if (processor) {\r\n // This must be done before other replacements to avoid mistakenly changing something that was already changed.\r\n if (processor.lineProcessor) {\r\n value = processor.lineProcessor(value, options.isFragment);\r\n }\r\n if (processor.attributeProcessor && StringTools.StartsWith(this.line, \"attribute\")) {\r\n value = processor.attributeProcessor(this.line);\r\n }\r\n else if (processor.varyingProcessor && StringTools.StartsWith(this.line, \"varying\")) {\r\n value = processor.varyingProcessor(this.line, options.isFragment);\r\n }\r\n else if ((processor.uniformProcessor || processor.uniformBufferProcessor) && StringTools.StartsWith(this.line, \"uniform\")) {\r\n var regex = /uniform (.+) (.+)/;\r\n if (regex.test(this.line)) { // uniform\r\n if (processor.uniformProcessor) {\r\n value = processor.uniformProcessor(this.line, options.isFragment);\r\n }\r\n }\r\n else { // Uniform buffer\r\n if (processor.uniformBufferProcessor) {\r\n value = processor.uniformBufferProcessor(this.line, options.isFragment);\r\n options.lookForClosingBracketForUniformBuffer = true;\r\n }\r\n }\r\n }\r\n if (processor.endOfUniformBufferProcessor) {\r\n if (options.lookForClosingBracketForUniformBuffer && this.line.indexOf(\"}\") !== -1) {\r\n options.lookForClosingBracketForUniformBuffer = false;\r\n value = processor.endOfUniformBufferProcessor(this.line, options.isFragment);\r\n }\r\n }\r\n }\r\n result += value + \"\\r\\n\";\r\n }\r\n this.children.forEach(function (child) {\r\n result += child.process(preprocessors, options);\r\n });\r\n if (this.additionalDefineKey) {\r\n preprocessors[this.additionalDefineKey] = this.additionalDefineValue || \"true\";\r\n }\r\n return result;\r\n };\r\n return ShaderCodeNode;\r\n}());\r\nexport { ShaderCodeNode };\r\n//# sourceMappingURL=shaderCodeNode.js.map"
  4662. },
  4663. {
  4664. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  4665. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js",
  4666. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  4667. "index": 13,
  4668. "index2": 9,
  4669. "size": 596,
  4670. "cacheable": true,
  4671. "built": true,
  4672. "optional": false,
  4673. "prefetched": false,
  4674. "chunks": [
  4675. "thinEngineOnly"
  4676. ],
  4677. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4678. "issuerId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4679. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4680. "issuerPath": [
  4681. {
  4682. "id": "./thinEngineOnly.ts",
  4683. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  4684. "name": "./thinEngineOnly.ts",
  4685. "profile": {
  4686. "factory": 25,
  4687. "building": 1793
  4688. }
  4689. },
  4690. {
  4691. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4692. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4693. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4694. "profile": {
  4695. "factory": 10,
  4696. "building": 63
  4697. }
  4698. },
  4699. {
  4700. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4701. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4702. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4703. "profile": {
  4704. "factory": 6,
  4705. "building": 38,
  4706. "dependencies": 28
  4707. }
  4708. },
  4709. {
  4710. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4711. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4712. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4713. "profile": {
  4714. "factory": 6,
  4715. "building": 10,
  4716. "dependencies": 1
  4717. }
  4718. }
  4719. ],
  4720. "profile": {
  4721. "factory": 9,
  4722. "building": 7,
  4723. "dependencies": 3
  4724. },
  4725. "failed": false,
  4726. "errors": 0,
  4727. "warnings": 0,
  4728. "assets": [],
  4729. "reasons": [
  4730. {
  4731. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4732. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4733. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4734. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4735. "type": "harmony side effect evaluation",
  4736. "userRequest": "./shaderCodeTestNode",
  4737. "loc": "4:0-58"
  4738. },
  4739. {
  4740. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4741. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4742. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4743. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4744. "type": "harmony import specifier",
  4745. "userRequest": "./shaderCodeTestNode",
  4746. "loc": "87:23-41"
  4747. }
  4748. ],
  4749. "providedExports": [
  4750. "ShaderCodeTestNode"
  4751. ],
  4752. "optimizationBailout": [],
  4753. "depth": 4,
  4754. "source": "import { __extends } from \"tslib\";\r\nimport { ShaderCodeNode } from './shaderCodeNode';\r\n/** @hidden */\r\nvar ShaderCodeTestNode = /** @class */ (function (_super) {\r\n __extends(ShaderCodeTestNode, _super);\r\n function ShaderCodeTestNode() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ShaderCodeTestNode.prototype.isValid = function (preprocessors) {\r\n return this.testExpression.isTrue(preprocessors);\r\n };\r\n return ShaderCodeTestNode;\r\n}(ShaderCodeNode));\r\nexport { ShaderCodeTestNode };\r\n//# sourceMappingURL=shaderCodeTestNode.js.map"
  4755. },
  4756. {
  4757. "id": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4758. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  4759. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  4760. "index": 7,
  4761. "index2": 20,
  4762. "size": 14076,
  4763. "cacheable": true,
  4764. "built": true,
  4765. "optional": false,
  4766. "prefetched": false,
  4767. "chunks": [
  4768. "thinEngineOnly"
  4769. ],
  4770. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4771. "issuerId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4772. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4773. "issuerPath": [
  4774. {
  4775. "id": "./thinEngineOnly.ts",
  4776. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  4777. "name": "./thinEngineOnly.ts",
  4778. "profile": {
  4779. "factory": 25,
  4780. "building": 1793
  4781. }
  4782. },
  4783. {
  4784. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4785. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4786. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4787. "profile": {
  4788. "factory": 10,
  4789. "building": 63
  4790. }
  4791. },
  4792. {
  4793. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4794. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4795. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4796. "profile": {
  4797. "factory": 6,
  4798. "building": 38,
  4799. "dependencies": 28
  4800. }
  4801. }
  4802. ],
  4803. "profile": {
  4804. "factory": 6,
  4805. "building": 10,
  4806. "dependencies": 1
  4807. },
  4808. "failed": false,
  4809. "errors": 0,
  4810. "warnings": 0,
  4811. "assets": [],
  4812. "reasons": [
  4813. {
  4814. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4815. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4816. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4817. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4818. "type": "harmony side effect evaluation",
  4819. "userRequest": "../Engines/Processors/shaderProcessor",
  4820. "loc": "4:0-72"
  4821. },
  4822. {
  4823. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4824. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4825. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4826. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4827. "type": "harmony import specifier",
  4828. "userRequest": "../Engines/Processors/shaderProcessor",
  4829. "loc": "161:16-31"
  4830. },
  4831. {
  4832. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  4833. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  4834. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4835. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  4836. "type": "harmony import specifier",
  4837. "userRequest": "../Engines/Processors/shaderProcessor",
  4838. "loc": "163:20-35"
  4839. }
  4840. ],
  4841. "providedExports": [
  4842. "ShaderProcessor"
  4843. ],
  4844. "optimizationBailout": [],
  4845. "depth": 3,
  4846. "source": "import { ShaderCodeNode } from './shaderCodeNode';\r\nimport { ShaderCodeCursor } from './shaderCodeCursor';\r\nimport { ShaderCodeConditionNode } from './shaderCodeConditionNode';\r\nimport { ShaderCodeTestNode } from './shaderCodeTestNode';\r\nimport { ShaderDefineIsDefinedOperator } from './Expressions/Operators/shaderDefineIsDefinedOperator';\r\nimport { ShaderDefineOrOperator } from './Expressions/Operators/shaderDefineOrOperator';\r\nimport { ShaderDefineAndOperator } from './Expressions/Operators/shaderDefineAndOperator';\r\nimport { ShaderDefineArithmeticOperator } from './Expressions/Operators/shaderDefineArithmeticOperator';\r\nimport { FileTools } from '../../Misc/fileTools';\r\n/** @hidden */\r\nvar ShaderProcessor = /** @class */ (function () {\r\n function ShaderProcessor() {\r\n }\r\n ShaderProcessor.Process = function (sourceCode, options, callback) {\r\n var _this = this;\r\n this._ProcessIncludes(sourceCode, options, function (codeWithIncludes) {\r\n var migratedCode = _this._ProcessShaderConversion(codeWithIncludes, options);\r\n callback(migratedCode);\r\n });\r\n };\r\n ShaderProcessor._ProcessPrecision = function (source, options) {\r\n var shouldUseHighPrecisionShader = options.shouldUseHighPrecisionShader;\r\n if (source.indexOf(\"precision highp float\") === -1) {\r\n if (!shouldUseHighPrecisionShader) {\r\n source = \"precision mediump float;\\n\" + source;\r\n }\r\n else {\r\n source = \"precision highp float;\\n\" + source;\r\n }\r\n }\r\n else {\r\n if (!shouldUseHighPrecisionShader) { // Moving highp to mediump\r\n source = source.replace(\"precision highp float\", \"precision mediump float\");\r\n }\r\n }\r\n return source;\r\n };\r\n ShaderProcessor._ExtractOperation = function (expression) {\r\n var regex = /defined\\((.+)\\)/;\r\n var match = regex.exec(expression);\r\n if (match && match.length) {\r\n return new ShaderDefineIsDefinedOperator(match[1].trim(), expression[0] === \"!\");\r\n }\r\n var operators = [\"==\", \">=\", \"<=\", \"<\", \">\"];\r\n var operator = \"\";\r\n var indexOperator = 0;\r\n for (var _i = 0, operators_1 = operators; _i < operators_1.length; _i++) {\r\n operator = operators_1[_i];\r\n indexOperator = expression.indexOf(operator);\r\n if (indexOperator > -1) {\r\n break;\r\n }\r\n }\r\n if (indexOperator === -1) {\r\n return new ShaderDefineIsDefinedOperator(expression);\r\n }\r\n var define = expression.substring(0, indexOperator).trim();\r\n var value = expression.substring(indexOperator + operator.length).trim();\r\n return new ShaderDefineArithmeticOperator(define, operator, value);\r\n };\r\n ShaderProcessor._BuildSubExpression = function (expression) {\r\n var indexOr = expression.indexOf(\"||\");\r\n if (indexOr === -1) {\r\n var indexAnd = expression.indexOf(\"&&\");\r\n if (indexAnd > -1) {\r\n var andOperator = new ShaderDefineAndOperator();\r\n var leftPart = expression.substring(0, indexAnd).trim();\r\n var rightPart = expression.substring(indexAnd + 2).trim();\r\n andOperator.leftOperand = this._BuildSubExpression(leftPart);\r\n andOperator.rightOperand = this._BuildSubExpression(rightPart);\r\n return andOperator;\r\n }\r\n else {\r\n return this._ExtractOperation(expression);\r\n }\r\n }\r\n else {\r\n var orOperator = new ShaderDefineOrOperator();\r\n var leftPart = expression.substring(0, indexOr).trim();\r\n var rightPart = expression.substring(indexOr + 2).trim();\r\n orOperator.leftOperand = this._BuildSubExpression(leftPart);\r\n orOperator.rightOperand = this._BuildSubExpression(rightPart);\r\n return orOperator;\r\n }\r\n };\r\n ShaderProcessor._BuildExpression = function (line, start) {\r\n var node = new ShaderCodeTestNode();\r\n var command = line.substring(0, start);\r\n var expression = line.substring(start).trim();\r\n if (command === \"#ifdef\") {\r\n node.testExpression = new ShaderDefineIsDefinedOperator(expression);\r\n }\r\n else if (command === \"#ifndef\") {\r\n node.testExpression = new ShaderDefineIsDefinedOperator(expression, true);\r\n }\r\n else {\r\n node.testExpression = this._BuildSubExpression(expression);\r\n }\r\n return node;\r\n };\r\n ShaderProcessor._MoveCursorWithinIf = function (cursor, rootNode, ifNode) {\r\n var line = cursor.currentLine;\r\n while (this._MoveCursor(cursor, ifNode)) {\r\n line = cursor.currentLine;\r\n var first5 = line.substring(0, 5).toLowerCase();\r\n if (first5 === \"#else\") {\r\n var elseNode = new ShaderCodeNode();\r\n rootNode.children.push(elseNode);\r\n this._MoveCursor(cursor, elseNode);\r\n return;\r\n }\r\n else if (first5 === \"#elif\") {\r\n var elifNode = this._BuildExpression(line, 5);\r\n rootNode.children.push(elifNode);\r\n ifNode = elifNode;\r\n }\r\n }\r\n };\r\n ShaderProcessor._MoveCursor = function (cursor, rootNode) {\r\n while (cursor.canRead) {\r\n cursor.lineIndex++;\r\n var line = cursor.currentLine;\r\n var keywords = /(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/;\r\n var matches = keywords.exec(line);\r\n if (matches && matches.length) {\r\n var keyword = matches[0];\r\n switch (keyword) {\r\n case \"#ifdef\": {\r\n var newRootNode = new ShaderCodeConditionNode();\r\n rootNode.children.push(newRootNode);\r\n var ifNode = this._BuildExpression(line, 6);\r\n newRootNode.children.push(ifNode);\r\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\r\n break;\r\n }\r\n case \"#else\":\r\n case \"#elif\":\r\n return true;\r\n case \"#endif\":\r\n return false;\r\n case \"#ifndef\": {\r\n var newRootNode = new ShaderCodeConditionNode();\r\n rootNode.children.push(newRootNode);\r\n var ifNode = this._BuildExpression(line, 7);\r\n newRootNode.children.push(ifNode);\r\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\r\n break;\r\n }\r\n case \"#if\": {\r\n var newRootNode = new ShaderCodeConditionNode();\r\n var ifNode = this._BuildExpression(line, 3);\r\n rootNode.children.push(newRootNode);\r\n newRootNode.children.push(ifNode);\r\n this._MoveCursorWithinIf(cursor, newRootNode, ifNode);\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n var newNode = new ShaderCodeNode();\r\n newNode.line = line;\r\n rootNode.children.push(newNode);\r\n // Detect additional defines\r\n if (line[0] === \"#\" && line[1] === \"d\") {\r\n var split = line.replace(\";\", \"\").split(\" \");\r\n newNode.additionalDefineKey = split[1];\r\n if (split.length === 3) {\r\n newNode.additionalDefineValue = split[2];\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n ShaderProcessor._EvaluatePreProcessors = function (sourceCode, preprocessors, options) {\r\n var rootNode = new ShaderCodeNode();\r\n var cursor = new ShaderCodeCursor();\r\n cursor.lineIndex = -1;\r\n cursor.lines = sourceCode.split(\"\\n\");\r\n // Decompose (We keep it in 2 steps so it is easier to maintain and perf hit is insignificant)\r\n this._MoveCursor(cursor, rootNode);\r\n // Recompose\r\n return rootNode.process(preprocessors, options);\r\n };\r\n ShaderProcessor._PreparePreProcessors = function (options) {\r\n var defines = options.defines;\r\n var preprocessors = {};\r\n for (var _i = 0, defines_1 = defines; _i < defines_1.length; _i++) {\r\n var define = defines_1[_i];\r\n var keyValue = define.replace(\"#define\", \"\").replace(\";\", \"\").trim();\r\n var split = keyValue.split(\" \");\r\n preprocessors[split[0]] = split.length > 1 ? split[1] : \"\";\r\n }\r\n preprocessors[\"GL_ES\"] = \"true\";\r\n preprocessors[\"__VERSION__\"] = options.version;\r\n preprocessors[options.platformName] = \"true\";\r\n return preprocessors;\r\n };\r\n ShaderProcessor._ProcessShaderConversion = function (sourceCode, options) {\r\n var preparedSourceCode = this._ProcessPrecision(sourceCode, options);\r\n if (!options.processor) {\r\n return preparedSourceCode;\r\n }\r\n // Already converted\r\n if (preparedSourceCode.indexOf(\"#version 3\") !== -1) {\r\n return preparedSourceCode.replace(\"#version 300 es\", \"\");\r\n }\r\n var defines = options.defines;\r\n var preprocessors = this._PreparePreProcessors(options);\r\n // General pre processing\r\n if (options.processor.preProcessor) {\r\n preparedSourceCode = options.processor.preProcessor(preparedSourceCode, defines, options.isFragment);\r\n }\r\n preparedSourceCode = this._EvaluatePreProcessors(preparedSourceCode, preprocessors, options);\r\n // Post processing\r\n if (options.processor.postProcessor) {\r\n preparedSourceCode = options.processor.postProcessor(preparedSourceCode, defines, options.isFragment);\r\n }\r\n return preparedSourceCode;\r\n };\r\n ShaderProcessor._ProcessIncludes = function (sourceCode, options, callback) {\r\n var _this = this;\r\n var regex = /#include<(.+)>(\\((.*)\\))*(\\[(.*)\\])*/g;\r\n var match = regex.exec(sourceCode);\r\n var returnValue = new String(sourceCode);\r\n while (match != null) {\r\n var includeFile = match[1];\r\n // Uniform declaration\r\n if (includeFile.indexOf(\"__decl__\") !== -1) {\r\n includeFile = includeFile.replace(/__decl__/, \"\");\r\n if (options.supportsUniformBuffers) {\r\n includeFile = includeFile.replace(/Vertex/, \"Ubo\");\r\n includeFile = includeFile.replace(/Fragment/, \"Ubo\");\r\n }\r\n includeFile = includeFile + \"Declaration\";\r\n }\r\n if (options.includesShadersStore[includeFile]) {\r\n // Substitution\r\n var includeContent = options.includesShadersStore[includeFile];\r\n if (match[2]) {\r\n var splits = match[3].split(\",\");\r\n for (var index = 0; index < splits.length; index += 2) {\r\n var source = new RegExp(splits[index], \"g\");\r\n var dest = splits[index + 1];\r\n includeContent = includeContent.replace(source, dest);\r\n }\r\n }\r\n if (match[4]) {\r\n var indexString = match[5];\r\n if (indexString.indexOf(\"..\") !== -1) {\r\n var indexSplits = indexString.split(\"..\");\r\n var minIndex = parseInt(indexSplits[0]);\r\n var maxIndex = parseInt(indexSplits[1]);\r\n var sourceIncludeContent = includeContent.slice(0);\r\n includeContent = \"\";\r\n if (isNaN(maxIndex)) {\r\n maxIndex = options.indexParameters[indexSplits[1]];\r\n }\r\n for (var i = minIndex; i < maxIndex; i++) {\r\n if (!options.supportsUniformBuffers) {\r\n // Ubo replacement\r\n sourceIncludeContent = sourceIncludeContent.replace(/light\\{X\\}.(\\w*)/g, function (str, p1) {\r\n return p1 + \"{X}\";\r\n });\r\n }\r\n includeContent += sourceIncludeContent.replace(/\\{X\\}/g, i.toString()) + \"\\n\";\r\n }\r\n }\r\n else {\r\n if (!options.supportsUniformBuffers) {\r\n // Ubo replacement\r\n includeContent = includeContent.replace(/light\\{X\\}.(\\w*)/g, function (str, p1) {\r\n return p1 + \"{X}\";\r\n });\r\n }\r\n includeContent = includeContent.replace(/\\{X\\}/g, indexString);\r\n }\r\n }\r\n // Replace\r\n returnValue = returnValue.replace(match[0], includeContent);\r\n }\r\n else {\r\n var includeShaderUrl = options.shadersRepository + \"ShadersInclude/\" + includeFile + \".fx\";\r\n FileTools.LoadFile(includeShaderUrl, function (fileContent) {\r\n options.includesShadersStore[includeFile] = fileContent;\r\n _this._ProcessIncludes(returnValue, options, callback);\r\n });\r\n return;\r\n }\r\n match = regex.exec(sourceCode);\r\n }\r\n callback(returnValue);\r\n };\r\n return ShaderProcessor;\r\n}());\r\nexport { ShaderProcessor };\r\n//# sourceMappingURL=shaderProcessor.js.map"
  4847. },
  4848. {
  4849. "id": "../../.temp/packageES6Dev/core/Engines/WebGL/webGL2ShaderProcessors.js",
  4850. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\WebGL\\webGL2ShaderProcessors.js",
  4851. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/WebGL/webGL2ShaderProcessors.js",
  4852. "index": 30,
  4853. "index2": 28,
  4854. "size": 1975,
  4855. "cacheable": true,
  4856. "built": true,
  4857. "optional": false,
  4858. "prefetched": false,
  4859. "chunks": [
  4860. "thinEngineOnly"
  4861. ],
  4862. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4863. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4864. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4865. "issuerPath": [
  4866. {
  4867. "id": "./thinEngineOnly.ts",
  4868. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  4869. "name": "./thinEngineOnly.ts",
  4870. "profile": {
  4871. "factory": 25,
  4872. "building": 1793
  4873. }
  4874. },
  4875. {
  4876. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4877. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4878. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4879. "profile": {
  4880. "factory": 10,
  4881. "building": 63
  4882. }
  4883. }
  4884. ],
  4885. "profile": {
  4886. "factory": 6,
  4887. "building": 38,
  4888. "dependencies": 28
  4889. },
  4890. "failed": false,
  4891. "errors": 0,
  4892. "warnings": 0,
  4893. "assets": [],
  4894. "reasons": [
  4895. {
  4896. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4897. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4898. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4899. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4900. "type": "harmony side effect evaluation",
  4901. "userRequest": "./WebGL/webGL2ShaderProcessors",
  4902. "loc": "11:0-71"
  4903. },
  4904. {
  4905. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4906. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4907. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4908. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4909. "type": "harmony import specifier",
  4910. "userRequest": "./WebGL/webGL2ShaderProcessors",
  4911. "loc": "296:40-61"
  4912. }
  4913. ],
  4914. "providedExports": [
  4915. "WebGL2ShaderProcessor"
  4916. ],
  4917. "optimizationBailout": [],
  4918. "depth": 2,
  4919. "source": "/** @hidden */\r\nvar WebGL2ShaderProcessor = /** @class */ (function () {\r\n function WebGL2ShaderProcessor() {\r\n }\r\n WebGL2ShaderProcessor.prototype.attributeProcessor = function (attribute) {\r\n return attribute.replace(\"attribute\", \"in\");\r\n };\r\n WebGL2ShaderProcessor.prototype.varyingProcessor = function (varying, isFragment) {\r\n return varying.replace(\"varying\", isFragment ? \"in\" : \"out\");\r\n };\r\n WebGL2ShaderProcessor.prototype.postProcessor = function (code, defines, isFragment) {\r\n var hasDrawBuffersExtension = code.search(/#extension.+GL_EXT_draw_buffers.+require/) !== -1;\r\n // Remove extensions\r\n var regex = /#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g;\r\n code = code.replace(regex, \"\");\r\n // Replace instructions\r\n code = code.replace(/texture2D\\s*\\(/g, \"texture(\");\r\n if (isFragment) {\r\n code = code.replace(/texture2DLodEXT\\s*\\(/g, \"textureLod(\");\r\n code = code.replace(/textureCubeLodEXT\\s*\\(/g, \"textureLod(\");\r\n code = code.replace(/textureCube\\s*\\(/g, \"texture(\");\r\n code = code.replace(/gl_FragDepthEXT/g, \"gl_FragDepth\");\r\n code = code.replace(/gl_FragColor/g, \"glFragColor\");\r\n code = code.replace(/gl_FragData/g, \"glFragData\");\r\n code = code.replace(/void\\s+?main\\s*\\(/g, (hasDrawBuffersExtension ? \"\" : \"out vec4 glFragColor;\\n\") + \"void main(\");\r\n }\r\n else {\r\n var hasMultiviewExtension = defines.indexOf(\"#define MULTIVIEW\") !== -1;\r\n if (hasMultiviewExtension) {\r\n return \"#extension GL_OVR_multiview2 : require\\nlayout (num_views = 2) in;\\n\" + code;\r\n }\r\n }\r\n return code;\r\n };\r\n return WebGL2ShaderProcessor;\r\n}());\r\nexport { WebGL2ShaderProcessor };\r\n//# sourceMappingURL=webGL2ShaderProcessors.js.map"
  4920. },
  4921. {
  4922. "id": "../../.temp/packageES6Dev/core/Engines/WebGL/webGLPipelineContext.js",
  4923. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\WebGL\\webGLPipelineContext.js",
  4924. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/WebGL/webGLPipelineContext.js",
  4925. "index": 33,
  4926. "index2": 31,
  4927. "size": 1078,
  4928. "cacheable": true,
  4929. "built": true,
  4930. "optional": false,
  4931. "prefetched": false,
  4932. "chunks": [
  4933. "thinEngineOnly"
  4934. ],
  4935. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4936. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4937. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4938. "issuerPath": [
  4939. {
  4940. "id": "./thinEngineOnly.ts",
  4941. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  4942. "name": "./thinEngineOnly.ts",
  4943. "profile": {
  4944. "factory": 25,
  4945. "building": 1793
  4946. }
  4947. },
  4948. {
  4949. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4950. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4951. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4952. "profile": {
  4953. "factory": 10,
  4954. "building": 63
  4955. }
  4956. }
  4957. ],
  4958. "profile": {
  4959. "factory": 6,
  4960. "building": 38,
  4961. "dependencies": 28
  4962. },
  4963. "failed": false,
  4964. "errors": 0,
  4965. "warnings": 0,
  4966. "assets": [],
  4967. "reasons": [
  4968. {
  4969. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4970. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4971. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4972. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4973. "type": "harmony side effect evaluation",
  4974. "userRequest": "./WebGL/webGLPipelineContext",
  4975. "loc": "13:0-68"
  4976. },
  4977. {
  4978. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  4979. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  4980. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4981. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  4982. "type": "harmony import specifier",
  4983. "userRequest": "./WebGL/webGLPipelineContext",
  4984. "loc": "1692:34-54"
  4985. }
  4986. ],
  4987. "providedExports": [
  4988. "WebGLPipelineContext"
  4989. ],
  4990. "optimizationBailout": [],
  4991. "depth": 2,
  4992. "source": "/** @hidden */\r\nvar WebGLPipelineContext = /** @class */ (function () {\r\n function WebGLPipelineContext() {\r\n }\r\n Object.defineProperty(WebGLPipelineContext.prototype, \"isAsync\", {\r\n get: function () {\r\n return this.isParallelCompiled;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebGLPipelineContext.prototype, \"isReady\", {\r\n get: function () {\r\n if (this.program) {\r\n if (this.isParallelCompiled) {\r\n return this.engine._isRenderingStateCompiled(this);\r\n }\r\n return true;\r\n }\r\n return false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n WebGLPipelineContext.prototype._handlesSpectorRebuildCallback = function (onCompiled) {\r\n if (onCompiled && this.program) {\r\n onCompiled(this.program);\r\n }\r\n };\r\n return WebGLPipelineContext;\r\n}());\r\nexport { WebGLPipelineContext };\r\n//# sourceMappingURL=webGLPipelineContext.js.map"
  4993. },
  4994. {
  4995. "id": "../../.temp/packageES6Dev/core/Engines/engineStore.js",
  4996. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\engineStore.js",
  4997. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/engineStore.js",
  4998. "index": 2,
  4999. "index2": 0,
  5000. "size": 1486,
  5001. "cacheable": true,
  5002. "built": true,
  5003. "optional": false,
  5004. "prefetched": false,
  5005. "chunks": [
  5006. "thinEngineOnly"
  5007. ],
  5008. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5009. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5010. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5011. "issuerPath": [
  5012. {
  5013. "id": "./thinEngineOnly.ts",
  5014. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5015. "name": "./thinEngineOnly.ts",
  5016. "profile": {
  5017. "factory": 25,
  5018. "building": 1793
  5019. }
  5020. },
  5021. {
  5022. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5023. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5024. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5025. "profile": {
  5026. "factory": 10,
  5027. "building": 63
  5028. }
  5029. }
  5030. ],
  5031. "profile": {
  5032. "factory": 6,
  5033. "building": 38,
  5034. "dependencies": 28
  5035. },
  5036. "failed": false,
  5037. "errors": 0,
  5038. "warnings": 0,
  5039. "assets": [],
  5040. "reasons": [
  5041. {
  5042. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5043. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5044. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5045. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5046. "type": "harmony side effect evaluation",
  5047. "userRequest": "./engineStore",
  5048. "loc": "1:0-44"
  5049. },
  5050. {
  5051. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5052. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5053. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5054. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5055. "type": "harmony import specifier",
  5056. "userRequest": "./engineStore",
  5057. "loc": "2289:20-31"
  5058. },
  5059. {
  5060. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5061. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5062. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5063. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5064. "type": "harmony import specifier",
  5065. "userRequest": "./engineStore",
  5066. "loc": "2290:40-51"
  5067. }
  5068. ],
  5069. "providedExports": [
  5070. "EngineStore"
  5071. ],
  5072. "optimizationBailout": [],
  5073. "depth": 2,
  5074. "source": "/**\r\n * The engine store class is responsible to hold all the instances of Engine and Scene created\r\n * during the life time of the application.\r\n */\r\nvar EngineStore = /** @class */ (function () {\r\n function EngineStore() {\r\n }\r\n Object.defineProperty(EngineStore, \"LastCreatedEngine\", {\r\n /**\r\n * Gets the latest created engine\r\n */\r\n get: function () {\r\n if (this.Instances.length === 0) {\r\n return null;\r\n }\r\n return this.Instances[this.Instances.length - 1];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(EngineStore, \"LastCreatedScene\", {\r\n /**\r\n * Gets the latest created scene\r\n */\r\n get: function () {\r\n return this._LastCreatedScene;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /** Gets the list of created engines */\r\n EngineStore.Instances = new Array();\r\n /** @hidden */\r\n EngineStore._LastCreatedScene = null;\r\n /**\r\n * Gets or sets a global variable indicating if fallback texture must be used when a texture cannot be loaded\r\n * @ignorenaming\r\n */\r\n EngineStore.UseFallbackTexture = true;\r\n /**\r\n * Texture content used if a texture cannot loaded\r\n * @ignorenaming\r\n */\r\n EngineStore.FallbackTexture = \"\";\r\n return EngineStore;\r\n}());\r\nexport { EngineStore };\r\n//# sourceMappingURL=engineStore.js.map"
  5075. },
  5076. {
  5077. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5078. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5079. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5080. "index": 1,
  5081. "index2": 33,
  5082. "size": 158160,
  5083. "cacheable": true,
  5084. "built": true,
  5085. "optional": false,
  5086. "prefetched": false,
  5087. "chunks": [
  5088. "thinEngineOnly"
  5089. ],
  5090. "issuer": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5091. "issuerId": "./thinEngineOnly.ts",
  5092. "issuerName": "./thinEngineOnly.ts",
  5093. "issuerPath": [
  5094. {
  5095. "id": "./thinEngineOnly.ts",
  5096. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5097. "name": "./thinEngineOnly.ts",
  5098. "profile": {
  5099. "factory": 25,
  5100. "building": 1793
  5101. }
  5102. }
  5103. ],
  5104. "profile": {
  5105. "factory": 10,
  5106. "building": 63
  5107. },
  5108. "failed": false,
  5109. "errors": 0,
  5110. "warnings": 0,
  5111. "assets": [],
  5112. "reasons": [
  5113. {
  5114. "moduleId": "./thinEngineOnly.ts",
  5115. "moduleIdentifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5116. "module": "./thinEngineOnly.ts",
  5117. "moduleName": "./thinEngineOnly.ts",
  5118. "type": "harmony side effect evaluation",
  5119. "userRequest": "@babylonjs/core/Engines/thinEngine",
  5120. "loc": "1:0-64"
  5121. },
  5122. {
  5123. "moduleId": "./thinEngineOnly.ts",
  5124. "moduleIdentifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5125. "module": "./thinEngineOnly.ts",
  5126. "moduleName": "./thinEngineOnly.ts",
  5127. "type": "harmony import specifier",
  5128. "userRequest": "@babylonjs/core/Engines/thinEngine",
  5129. "loc": "3:4-14"
  5130. }
  5131. ],
  5132. "providedExports": [
  5133. "ThinEngine"
  5134. ],
  5135. "optimizationBailout": [],
  5136. "depth": 1,
  5137. "source": "import { EngineStore } from './engineStore';\r\nimport { Effect } from '../Materials/effect';\r\nimport { _DevTools } from '../Misc/devTools';\r\nimport { Observable } from '../Misc/observable';\r\nimport { DepthCullingState } from '../States/depthCullingState';\r\nimport { StencilState } from '../States/stencilState';\r\nimport { AlphaState } from '../States/alphaCullingState';\r\nimport { InternalTexture, InternalTextureSource } from '../Materials/Textures/internalTexture';\r\nimport { Logger } from '../Misc/logger';\r\nimport { DomManagement } from '../Misc/domManagement';\r\nimport { WebGL2ShaderProcessor } from './WebGL/webGL2ShaderProcessors';\r\nimport { WebGLDataBuffer } from '../Meshes/WebGL/webGLDataBuffer';\r\nimport { WebGLPipelineContext } from './WebGL/webGLPipelineContext';\r\nimport { FileTools } from '../Misc/fileTools';\r\nimport { CanvasGenerator } from '../Misc/canvasGenerator';\r\n/**\r\n * Keeps track of all the buffer info used in engine.\r\n */\r\nvar BufferPointer = /** @class */ (function () {\r\n function BufferPointer() {\r\n }\r\n return BufferPointer;\r\n}());\r\n/**\r\n * The base engine class (root of all engines)\r\n */\r\nvar ThinEngine = /** @class */ (function () {\r\n /**\r\n * Creates a new engine\r\n * @param canvasOrContext defines the canvas or WebGL context to use for rendering. If you provide a WebGL context, Babylon.js will not hook events on the canvas (like pointers, keyboards, etc...) so no event observables will be available. This is mostly used when Babylon.js is used as a plugin on a system which alreay used the WebGL context\r\n * @param antialias defines enable antialiasing (default: false)\r\n * @param options defines further options to be sent to the getContext() function\r\n * @param adaptToDeviceRatio defines whether to adapt to the device's viewport characteristics (default: false)\r\n */\r\n function ThinEngine(canvasOrContext, antialias, options, adaptToDeviceRatio) {\r\n var _this = this;\r\n if (adaptToDeviceRatio === void 0) { adaptToDeviceRatio = false; }\r\n /**\r\n * Gets or sets a boolean that indicates if textures must be forced to power of 2 size even if not required\r\n */\r\n this.forcePOTTextures = false;\r\n /**\r\n * Gets a boolean indicating if the engine is currently rendering in fullscreen mode\r\n */\r\n this.isFullscreen = false;\r\n /**\r\n * Gets or sets a boolean indicating if back faces must be culled (true by default)\r\n */\r\n this.cullBackFaces = true;\r\n /**\r\n * Gets or sets a boolean indicating if the engine must keep rendering even if the window is not in foregroun\r\n */\r\n this.renderEvenInBackground = true;\r\n /**\r\n * Gets or sets a boolean indicating that cache can be kept between frames\r\n */\r\n this.preventCacheWipeBetweenFrames = false;\r\n /** Gets or sets a boolean indicating if the engine should validate programs after compilation */\r\n this.validateShaderPrograms = false;\r\n // Uniform buffers list\r\n /**\r\n * Gets or sets a boolean indicating that uniform buffers must be disabled even if they are supported\r\n */\r\n this.disableUniformBuffers = false;\r\n /** @hidden */\r\n this._uniformBuffers = new Array();\r\n this._windowIsBackground = false;\r\n this._webGLVersion = 1.0;\r\n this._highPrecisionShadersAllowed = true;\r\n /** @hidden */\r\n this._badOS = false;\r\n /** @hidden */\r\n this._badDesktopOS = false;\r\n this._colorWrite = true;\r\n this._renderingQueueLaunched = false;\r\n this._activeRenderLoops = new Array();\r\n // Lost context\r\n /**\r\n * Observable signaled when a context lost event is raised\r\n */\r\n this.onContextLostObservable = new Observable();\r\n /**\r\n * Observable signaled when a context restored event is raised\r\n */\r\n this.onContextRestoredObservable = new Observable();\r\n this._contextWasLost = false;\r\n /** @hidden */\r\n this._doNotHandleContextLost = false;\r\n /**\r\n * Gets or sets a boolean indicating that vertex array object must be disabled even if they are supported\r\n */\r\n this.disableVertexArrayObjects = false;\r\n // States\r\n /** @hidden */\r\n this._depthCullingState = new DepthCullingState();\r\n /** @hidden */\r\n this._stencilState = new StencilState();\r\n /** @hidden */\r\n this._alphaState = new AlphaState();\r\n // Cache\r\n /** @hidden */\r\n this._internalTexturesCache = new Array();\r\n /** @hidden */\r\n this._activeChannel = 0;\r\n this._currentTextureChannel = -1;\r\n /** @hidden */\r\n this._boundTexturesCache = {};\r\n this._compiledEffects = {};\r\n this._vertexAttribArraysEnabled = [];\r\n this._uintIndicesCurrentlySet = false;\r\n this._currentBoundBuffer = new Array();\r\n /** @hidden */\r\n this._currentFramebuffer = null;\r\n this._currentBufferPointers = new Array();\r\n this._currentInstanceLocations = new Array();\r\n this._currentInstanceBuffers = new Array();\r\n this._vaoRecordInProgress = false;\r\n this._mustWipeVertexAttributes = false;\r\n this._nextFreeTextureSlots = new Array();\r\n this._maxSimultaneousTextures = 0;\r\n this._activeRequests = new Array();\r\n // Hardware supported Compressed Textures\r\n this._texturesSupported = new Array();\r\n /**\r\n * Defines whether the engine has been created with the premultipliedAlpha option on or not.\r\n */\r\n this.premultipliedAlpha = true;\r\n /**\r\n * Observable event triggered before each texture is initialized\r\n */\r\n this.onBeforeTextureInitObservable = new Observable();\r\n this._viewportCached = { x: 0, y: 0, z: 0, w: 0 };\r\n this._unpackFlipYCached = null;\r\n /**\r\n * In case you are sharing the context with other applications, it might\r\n * be interested to not cache the unpack flip y state to ensure a consistent\r\n * value would be set.\r\n */\r\n this.enableUnpackFlipYCached = true;\r\n this._boundUniforms = {};\r\n var canvas = null;\r\n if (!canvasOrContext) {\r\n return;\r\n }\r\n options = options || {};\r\n if (canvasOrContext.getContext) {\r\n canvas = canvasOrContext;\r\n this._renderingCanvas = canvas;\r\n if (antialias != null) {\r\n options.antialias = antialias;\r\n }\r\n if (options.deterministicLockstep === undefined) {\r\n options.deterministicLockstep = false;\r\n }\r\n if (options.lockstepMaxSteps === undefined) {\r\n options.lockstepMaxSteps = 4;\r\n }\r\n if (options.preserveDrawingBuffer === undefined) {\r\n options.preserveDrawingBuffer = false;\r\n }\r\n if (options.audioEngine === undefined) {\r\n options.audioEngine = true;\r\n }\r\n if (options.stencil === undefined) {\r\n options.stencil = true;\r\n }\r\n if (options.premultipliedAlpha === false) {\r\n this.premultipliedAlpha = false;\r\n }\r\n this._doNotHandleContextLost = options.doNotHandleContextLost ? true : false;\r\n // Exceptions\r\n if (navigator && navigator.userAgent) {\r\n var ua = navigator.userAgent;\r\n for (var _i = 0, _a = ThinEngine.ExceptionList; _i < _a.length; _i++) {\r\n var exception = _a[_i];\r\n var key = exception.key;\r\n var targets = exception.targets;\r\n var check = new RegExp(key);\r\n if (check.test(ua)) {\r\n if (exception.capture && exception.captureConstraint) {\r\n var capture = exception.capture;\r\n var constraint = exception.captureConstraint;\r\n var regex = new RegExp(capture);\r\n var matches = regex.exec(ua);\r\n if (matches && matches.length > 0) {\r\n var capturedValue = parseInt(matches[matches.length - 1]);\r\n if (capturedValue >= constraint) {\r\n continue;\r\n }\r\n }\r\n }\r\n for (var _b = 0, targets_1 = targets; _b < targets_1.length; _b++) {\r\n var target = targets_1[_b];\r\n switch (target) {\r\n case \"uniformBuffer\":\r\n this.disableUniformBuffers = true;\r\n break;\r\n case \"vao\":\r\n this.disableVertexArrayObjects = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // Context lost\r\n if (!this._doNotHandleContextLost) {\r\n this._onContextLost = function (evt) {\r\n evt.preventDefault();\r\n _this._contextWasLost = true;\r\n Logger.Warn(\"WebGL context lost.\");\r\n _this.onContextLostObservable.notifyObservers(_this);\r\n };\r\n this._onContextRestored = function () {\r\n // Adding a timeout to avoid race condition at browser level\r\n setTimeout(function () {\r\n // Rebuild gl context\r\n _this._initGLContext();\r\n // Rebuild effects\r\n _this._rebuildEffects();\r\n // Rebuild textures\r\n _this._rebuildInternalTextures();\r\n // Rebuild buffers\r\n _this._rebuildBuffers();\r\n // Cache\r\n _this.wipeCaches(true);\r\n Logger.Warn(\"WebGL context successfully restored.\");\r\n _this.onContextRestoredObservable.notifyObservers(_this);\r\n _this._contextWasLost = false;\r\n }, 0);\r\n };\r\n canvas.addEventListener(\"webglcontextlost\", this._onContextLost, false);\r\n canvas.addEventListener(\"webglcontextrestored\", this._onContextRestored, false);\r\n options.powerPreference = \"high-performance\";\r\n }\r\n // GL\r\n if (!options.disableWebGL2Support) {\r\n try {\r\n this._gl = (canvas.getContext(\"webgl2\", options) || canvas.getContext(\"experimental-webgl2\", options));\r\n if (this._gl) {\r\n this._webGLVersion = 2.0;\r\n // Prevent weird browsers to lie :-)\r\n if (!this._gl.deleteQuery) {\r\n this._webGLVersion = 1.0;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n // Do nothing\r\n }\r\n }\r\n if (!this._gl) {\r\n if (!canvas) {\r\n throw new Error(\"The provided canvas is null or undefined.\");\r\n }\r\n try {\r\n this._gl = (canvas.getContext(\"webgl\", options) || canvas.getContext(\"experimental-webgl\", options));\r\n }\r\n catch (e) {\r\n throw new Error(\"WebGL not supported\");\r\n }\r\n }\r\n if (!this._gl) {\r\n throw new Error(\"WebGL not supported\");\r\n }\r\n }\r\n else {\r\n this._gl = canvasOrContext;\r\n this._renderingCanvas = this._gl.canvas;\r\n if (this._gl.renderbufferStorageMultisample) {\r\n this._webGLVersion = 2.0;\r\n }\r\n var attributes = this._gl.getContextAttributes();\r\n if (attributes) {\r\n options.stencil = attributes.stencil;\r\n }\r\n }\r\n // Ensures a consistent color space unpacking of textures cross browser.\r\n this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this._gl.NONE);\r\n if (options.useHighPrecisionFloats !== undefined) {\r\n this._highPrecisionShadersAllowed = options.useHighPrecisionFloats;\r\n }\r\n // Viewport\r\n var devicePixelRatio = DomManagement.IsWindowObjectExist() ? (window.devicePixelRatio || 1.0) : 1.0;\r\n var limitDeviceRatio = options.limitDeviceRatio || devicePixelRatio;\r\n this._hardwareScalingLevel = adaptToDeviceRatio ? 1.0 / Math.min(limitDeviceRatio, devicePixelRatio) : 1.0;\r\n this.resize();\r\n this._isStencilEnable = options.stencil ? true : false;\r\n this._initGLContext();\r\n // Prepare buffer pointers\r\n for (var i = 0; i < this._caps.maxVertexAttribs; i++) {\r\n this._currentBufferPointers[i] = new BufferPointer();\r\n }\r\n // Shader processor\r\n if (this.webGLVersion > 1) {\r\n this._shaderProcessor = new WebGL2ShaderProcessor();\r\n }\r\n // Detect if we are running on a faulty buggy OS.\r\n this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent);\r\n // Detect if we are running on a faulty buggy desktop OS.\r\n this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\r\n console.log(\"Babylon.js v\" + ThinEngine.Version + \" - \" + this.description);\r\n }\r\n Object.defineProperty(ThinEngine, \"NpmPackage\", {\r\n /**\r\n * Returns the current npm package of the sdk\r\n */\r\n // Not mixed with Version for tooling purpose.\r\n get: function () {\r\n return \"babylonjs@4.1.0-alpha.24\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine, \"Version\", {\r\n /**\r\n * Returns the current version of the framework\r\n */\r\n get: function () {\r\n return \"4.1.0-alpha.24\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"description\", {\r\n /**\r\n * Returns a string describing the current engine\r\n */\r\n get: function () {\r\n var description = \"WebGL\" + this.webGLVersion;\r\n if (this._caps.parallelShaderCompile) {\r\n description += \" - Parallel shader compilation\";\r\n }\r\n return description;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine, \"ShadersRepository\", {\r\n /**\r\n * Gets or sets the relative url used to load shaders if using the engine in non-minified mode\r\n */\r\n get: function () {\r\n return Effect.ShadersRepository;\r\n },\r\n set: function (value) {\r\n Effect.ShadersRepository = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"supportsUniformBuffers\", {\r\n /**\r\n * Gets a boolean indicating that the engine supports uniform buffers\r\n * @see http://doc.babylonjs.com/features/webgl2#uniform-buffer-objets\r\n */\r\n get: function () {\r\n return this.webGLVersion > 1 && !this.disableUniformBuffers;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"_shouldUseHighPrecisionShader\", {\r\n /** @hidden */\r\n get: function () {\r\n return !!(this._caps.highPrecisionShaderSupported && this._highPrecisionShadersAllowed);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"needPOTTextures\", {\r\n /**\r\n * Gets a boolean indicating that only power of 2 textures are supported\r\n * Please note that you can still use non power of 2 textures but in this case the engine will forcefully convert them\r\n */\r\n get: function () {\r\n return this._webGLVersion < 2 || this.forcePOTTextures;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"doNotHandleContextLost\", {\r\n /**\r\n * Gets or sets a boolean indicating if resources should be retained to be able to handle context lost events\r\n * @see http://doc.babylonjs.com/how_to/optimizing_your_scene#handling-webgl-context-lost\r\n */\r\n get: function () {\r\n return this._doNotHandleContextLost;\r\n },\r\n set: function (value) {\r\n this._doNotHandleContextLost = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"_supportsHardwareTextureRescaling\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"texturesSupported\", {\r\n /**\r\n * Gets the list of texture formats supported\r\n */\r\n get: function () {\r\n return this._texturesSupported;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"textureFormatInUse\", {\r\n /**\r\n * Gets the list of texture formats in use\r\n */\r\n get: function () {\r\n return this._textureFormatInUse;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"currentViewport\", {\r\n /**\r\n * Gets the current viewport\r\n */\r\n get: function () {\r\n return this._cachedViewport;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"emptyTexture\", {\r\n /**\r\n * Gets the default empty texture\r\n */\r\n get: function () {\r\n if (!this._emptyTexture) {\r\n this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, 5, false, false, 1);\r\n }\r\n return this._emptyTexture;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"emptyTexture3D\", {\r\n /**\r\n * Gets the default empty 3D texture\r\n */\r\n get: function () {\r\n if (!this._emptyTexture3D) {\r\n this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, 5, false, false, 1);\r\n }\r\n return this._emptyTexture3D;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"emptyCubeTexture\", {\r\n /**\r\n * Gets the default empty cube texture\r\n */\r\n get: function () {\r\n if (!this._emptyCubeTexture) {\r\n var faceData = new Uint8Array(4);\r\n var cubeData = [faceData, faceData, faceData, faceData, faceData, faceData];\r\n this._emptyCubeTexture = this.createRawCubeTexture(cubeData, 1, 5, 0, false, false, 1);\r\n }\r\n return this._emptyCubeTexture;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ThinEngine.prototype._rebuildInternalTextures = function () {\r\n var currentState = this._internalTexturesCache.slice(); // Do a copy because the rebuild will add proxies\r\n for (var _i = 0, currentState_1 = currentState; _i < currentState_1.length; _i++) {\r\n var internalTexture = currentState_1[_i];\r\n internalTexture._rebuild();\r\n }\r\n };\r\n ThinEngine.prototype._rebuildEffects = function () {\r\n for (var key in this._compiledEffects) {\r\n var effect = this._compiledEffects[key];\r\n effect._prepareEffect();\r\n }\r\n Effect.ResetCache();\r\n };\r\n /**\r\n * Gets a boolean indicating if all created effects are ready\r\n * @returns true if all effects are ready\r\n */\r\n ThinEngine.prototype.areAllEffectsReady = function () {\r\n for (var key in this._compiledEffects) {\r\n var effect = this._compiledEffects[key];\r\n if (!effect.isReady()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n ThinEngine.prototype._rebuildBuffers = function () {\r\n // Uniforms\r\n for (var _i = 0, _a = this._uniformBuffers; _i < _a.length; _i++) {\r\n var uniformBuffer = _a[_i];\r\n uniformBuffer._rebuild();\r\n }\r\n };\r\n ThinEngine.prototype._initGLContext = function () {\r\n // Caps\r\n this._caps = {\r\n maxTexturesImageUnits: this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),\r\n maxCombinedTexturesImageUnits: this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),\r\n maxVertexTextureImageUnits: this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),\r\n maxTextureSize: this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),\r\n maxCubemapTextureSize: this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),\r\n maxRenderTextureSize: this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),\r\n maxVertexAttribs: this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),\r\n maxVaryingVectors: this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),\r\n maxFragmentUniformVectors: this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),\r\n maxVertexUniformVectors: this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),\r\n parallelShaderCompile: this._gl.getExtension('KHR_parallel_shader_compile'),\r\n standardDerivatives: this._webGLVersion > 1 || (this._gl.getExtension('OES_standard_derivatives') !== null),\r\n maxAnisotropy: 1,\r\n astc: this._gl.getExtension('WEBGL_compressed_texture_astc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_astc'),\r\n s3tc: this._gl.getExtension('WEBGL_compressed_texture_s3tc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc'),\r\n pvrtc: this._gl.getExtension('WEBGL_compressed_texture_pvrtc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc'),\r\n etc1: this._gl.getExtension('WEBGL_compressed_texture_etc1') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_etc1'),\r\n etc2: this._gl.getExtension('WEBGL_compressed_texture_etc') || this._gl.getExtension('WEBKIT_WEBGL_compressed_texture_etc') ||\r\n this._gl.getExtension('WEBGL_compressed_texture_es3_0'),\r\n textureAnisotropicFilterExtension: this._gl.getExtension('EXT_texture_filter_anisotropic') || this._gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic') || this._gl.getExtension('MOZ_EXT_texture_filter_anisotropic'),\r\n uintIndices: this._webGLVersion > 1 || this._gl.getExtension('OES_element_index_uint') !== null,\r\n fragmentDepthSupported: this._webGLVersion > 1 || this._gl.getExtension('EXT_frag_depth') !== null,\r\n highPrecisionShaderSupported: false,\r\n timerQuery: this._gl.getExtension('EXT_disjoint_timer_query_webgl2') || this._gl.getExtension(\"EXT_disjoint_timer_query\"),\r\n canUseTimestampForTimerQuery: false,\r\n drawBuffersExtension: false,\r\n maxMSAASamples: 1,\r\n colorBufferFloat: this._webGLVersion > 1 && this._gl.getExtension('EXT_color_buffer_float'),\r\n textureFloat: (this._webGLVersion > 1 || this._gl.getExtension('OES_texture_float')) ? true : false,\r\n textureHalfFloat: (this._webGLVersion > 1 || this._gl.getExtension('OES_texture_half_float')) ? true : false,\r\n textureHalfFloatRender: false,\r\n textureFloatLinearFiltering: false,\r\n textureFloatRender: false,\r\n textureHalfFloatLinearFiltering: false,\r\n vertexArrayObject: false,\r\n instancedArrays: false,\r\n textureLOD: (this._webGLVersion > 1 || this._gl.getExtension('EXT_shader_texture_lod')) ? true : false,\r\n blendMinMax: false,\r\n multiview: this._gl.getExtension('OVR_multiview2'),\r\n depthTextureExtension: false\r\n };\r\n // Infos\r\n this._glVersion = this._gl.getParameter(this._gl.VERSION);\r\n var rendererInfo = this._gl.getExtension(\"WEBGL_debug_renderer_info\");\r\n if (rendererInfo != null) {\r\n this._glRenderer = this._gl.getParameter(rendererInfo.UNMASKED_RENDERER_WEBGL);\r\n this._glVendor = this._gl.getParameter(rendererInfo.UNMASKED_VENDOR_WEBGL);\r\n }\r\n if (!this._glVendor) {\r\n this._glVendor = \"Unknown vendor\";\r\n }\r\n if (!this._glRenderer) {\r\n this._glRenderer = \"Unknown renderer\";\r\n }\r\n // Constants\r\n this._gl.HALF_FLOAT_OES = 0x8D61; // Half floating-point type (16-bit).\r\n if (this._gl.RGBA16F !== 0x881A) {\r\n this._gl.RGBA16F = 0x881A; // RGBA 16-bit floating-point color-renderable internal sized format.\r\n }\r\n if (this._gl.RGBA32F !== 0x8814) {\r\n this._gl.RGBA32F = 0x8814; // RGBA 32-bit floating-point color-renderable internal sized format.\r\n }\r\n if (this._gl.DEPTH24_STENCIL8 !== 35056) {\r\n this._gl.DEPTH24_STENCIL8 = 35056;\r\n }\r\n // Extensions\r\n if (this._caps.timerQuery) {\r\n if (this._webGLVersion === 1) {\r\n this._gl.getQuery = this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery);\r\n }\r\n this._caps.canUseTimestampForTimerQuery = this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT, this._caps.timerQuery.QUERY_COUNTER_BITS_EXT) > 0;\r\n }\r\n this._caps.maxAnisotropy = this._caps.textureAnisotropicFilterExtension ? this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0;\r\n this._caps.textureFloatLinearFiltering = this._caps.textureFloat && this._gl.getExtension('OES_texture_float_linear') ? true : false;\r\n this._caps.textureFloatRender = this._caps.textureFloat && this._canRenderToFloatFramebuffer() ? true : false;\r\n this._caps.textureHalfFloatLinearFiltering = (this._webGLVersion > 1 || (this._caps.textureHalfFloat && this._gl.getExtension('OES_texture_half_float_linear'))) ? true : false;\r\n // Checks if some of the format renders first to allow the use of webgl inspector.\r\n if (this._webGLVersion > 1) {\r\n this._gl.HALF_FLOAT_OES = 0x140B;\r\n }\r\n this._caps.textureHalfFloatRender = this._caps.textureHalfFloat && this._canRenderToHalfFloatFramebuffer();\r\n // Draw buffers\r\n if (this._webGLVersion > 1) {\r\n this._caps.drawBuffersExtension = true;\r\n this._caps.maxMSAASamples = this._gl.getParameter(this._gl.MAX_SAMPLES);\r\n }\r\n else {\r\n var drawBuffersExtension = this._gl.getExtension('WEBGL_draw_buffers');\r\n if (drawBuffersExtension !== null) {\r\n this._caps.drawBuffersExtension = true;\r\n this._gl.drawBuffers = drawBuffersExtension.drawBuffersWEBGL.bind(drawBuffersExtension);\r\n this._gl.DRAW_FRAMEBUFFER = this._gl.FRAMEBUFFER;\r\n for (var i = 0; i < 16; i++) {\r\n this._gl[\"COLOR_ATTACHMENT\" + i + \"_WEBGL\"] = drawBuffersExtension[\"COLOR_ATTACHMENT\" + i + \"_WEBGL\"];\r\n }\r\n }\r\n }\r\n // Depth Texture\r\n if (this._webGLVersion > 1) {\r\n this._caps.depthTextureExtension = true;\r\n }\r\n else {\r\n var depthTextureExtension = this._gl.getExtension('WEBGL_depth_texture');\r\n if (depthTextureExtension != null) {\r\n this._caps.depthTextureExtension = true;\r\n this._gl.UNSIGNED_INT_24_8 = depthTextureExtension.UNSIGNED_INT_24_8_WEBGL;\r\n }\r\n }\r\n // Vertex array object\r\n if (this.disableVertexArrayObjects) {\r\n this._caps.vertexArrayObject = false;\r\n }\r\n else if (this._webGLVersion > 1) {\r\n this._caps.vertexArrayObject = true;\r\n }\r\n else {\r\n var vertexArrayObjectExtension = this._gl.getExtension('OES_vertex_array_object');\r\n if (vertexArrayObjectExtension != null) {\r\n this._caps.vertexArrayObject = true;\r\n this._gl.createVertexArray = vertexArrayObjectExtension.createVertexArrayOES.bind(vertexArrayObjectExtension);\r\n this._gl.bindVertexArray = vertexArrayObjectExtension.bindVertexArrayOES.bind(vertexArrayObjectExtension);\r\n this._gl.deleteVertexArray = vertexArrayObjectExtension.deleteVertexArrayOES.bind(vertexArrayObjectExtension);\r\n }\r\n }\r\n // Instances count\r\n if (this._webGLVersion > 1) {\r\n this._caps.instancedArrays = true;\r\n }\r\n else {\r\n var instanceExtension = this._gl.getExtension('ANGLE_instanced_arrays');\r\n if (instanceExtension != null) {\r\n this._caps.instancedArrays = true;\r\n this._gl.drawArraysInstanced = instanceExtension.drawArraysInstancedANGLE.bind(instanceExtension);\r\n this._gl.drawElementsInstanced = instanceExtension.drawElementsInstancedANGLE.bind(instanceExtension);\r\n this._gl.vertexAttribDivisor = instanceExtension.vertexAttribDivisorANGLE.bind(instanceExtension);\r\n }\r\n else {\r\n this._caps.instancedArrays = false;\r\n }\r\n }\r\n // Intelligently add supported compressed formats in order to check for.\r\n // Check for ASTC support first as it is most powerful and to be very cross platform.\r\n // Next PVRTC & DXT, which are probably superior to ETC1/2.\r\n // Likely no hardware which supports both PVR & DXT, so order matters little.\r\n // ETC2 is newer and handles ETC1 (no alpha capability), so check for first.\r\n if (this._caps.astc) {\r\n this.texturesSupported.push('-astc.ktx');\r\n }\r\n if (this._caps.s3tc) {\r\n this.texturesSupported.push('-dxt.ktx');\r\n }\r\n if (this._caps.pvrtc) {\r\n this.texturesSupported.push('-pvrtc.ktx');\r\n }\r\n if (this._caps.etc2) {\r\n this.texturesSupported.push('-etc2.ktx');\r\n }\r\n if (this._caps.etc1) {\r\n this.texturesSupported.push('-etc1.ktx');\r\n }\r\n if (this._gl.getShaderPrecisionFormat) {\r\n var vertex_highp = this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER, this._gl.HIGH_FLOAT);\r\n var fragment_highp = this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER, this._gl.HIGH_FLOAT);\r\n if (vertex_highp && fragment_highp) {\r\n this._caps.highPrecisionShaderSupported = vertex_highp.precision !== 0 && fragment_highp.precision !== 0;\r\n }\r\n }\r\n if (this._webGLVersion > 1) {\r\n this._caps.blendMinMax = true;\r\n }\r\n else {\r\n var blendMinMaxExtension = this._gl.getExtension('EXT_blend_minmax');\r\n if (blendMinMaxExtension != null) {\r\n this._caps.blendMinMax = true;\r\n this._gl.MAX = blendMinMaxExtension.MAX_EXT;\r\n this._gl.MIN = blendMinMaxExtension.MIN_EXT;\r\n }\r\n }\r\n // Depth buffer\r\n this._depthCullingState.depthTest = true;\r\n this._depthCullingState.depthFunc = this._gl.LEQUAL;\r\n this._depthCullingState.depthMask = true;\r\n // Texture maps\r\n this._maxSimultaneousTextures = this._caps.maxCombinedTexturesImageUnits;\r\n for (var slot = 0; slot < this._maxSimultaneousTextures; slot++) {\r\n this._nextFreeTextureSlots.push(slot);\r\n }\r\n };\r\n Object.defineProperty(ThinEngine.prototype, \"webGLVersion\", {\r\n /**\r\n * Gets version of the current webGL context\r\n */\r\n get: function () {\r\n return this._webGLVersion;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a string identifying the name of the class\r\n * @returns \"Engine\" string\r\n */\r\n ThinEngine.prototype.getClassName = function () {\r\n return \"ThinEngine\";\r\n };\r\n Object.defineProperty(ThinEngine.prototype, \"isStencilEnable\", {\r\n /**\r\n * Returns true if the stencil buffer has been enabled through the creation option of the context.\r\n */\r\n get: function () {\r\n return this._isStencilEnable;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /** @hidden */\r\n ThinEngine.prototype._prepareWorkingCanvas = function () {\r\n if (this._workingCanvas) {\r\n return;\r\n }\r\n this._workingCanvas = CanvasGenerator.CreateCanvas(1, 1);\r\n var context = this._workingCanvas.getContext(\"2d\");\r\n if (context) {\r\n this._workingContext = context;\r\n }\r\n };\r\n /**\r\n * Reset the texture cache to empty state\r\n */\r\n ThinEngine.prototype.resetTextureCache = function () {\r\n for (var key in this._boundTexturesCache) {\r\n if (!this._boundTexturesCache.hasOwnProperty(key)) {\r\n continue;\r\n }\r\n this._boundTexturesCache[key] = null;\r\n }\r\n this._currentTextureChannel = -1;\r\n };\r\n /**\r\n * Gets an object containing information about the current webGL context\r\n * @returns an object containing the vender, the renderer and the version of the current webGL context\r\n */\r\n ThinEngine.prototype.getGlInfo = function () {\r\n return {\r\n vendor: this._glVendor,\r\n renderer: this._glRenderer,\r\n version: this._glVersion\r\n };\r\n };\r\n /**\r\n * Defines the hardware scaling level.\r\n * By default the hardware scaling level is computed from the window device ratio.\r\n * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.\r\n * @param level defines the level to use\r\n */\r\n ThinEngine.prototype.setHardwareScalingLevel = function (level) {\r\n this._hardwareScalingLevel = level;\r\n this.resize();\r\n };\r\n /**\r\n * Gets the current hardware scaling level.\r\n * By default the hardware scaling level is computed from the window device ratio.\r\n * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.\r\n * @returns a number indicating the current hardware scaling level\r\n */\r\n ThinEngine.prototype.getHardwareScalingLevel = function () {\r\n return this._hardwareScalingLevel;\r\n };\r\n /**\r\n * Gets the list of loaded textures\r\n * @returns an array containing all loaded textures\r\n */\r\n ThinEngine.prototype.getLoadedTexturesCache = function () {\r\n return this._internalTexturesCache;\r\n };\r\n /**\r\n * Gets the object containing all engine capabilities\r\n * @returns the EngineCapabilities object\r\n */\r\n ThinEngine.prototype.getCaps = function () {\r\n return this._caps;\r\n };\r\n /**\r\n * stop executing a render loop function and remove it from the execution array\r\n * @param renderFunction defines the function to be removed. If not provided all functions will be removed.\r\n */\r\n ThinEngine.prototype.stopRenderLoop = function (renderFunction) {\r\n if (!renderFunction) {\r\n this._activeRenderLoops = [];\r\n return;\r\n }\r\n var index = this._activeRenderLoops.indexOf(renderFunction);\r\n if (index >= 0) {\r\n this._activeRenderLoops.splice(index, 1);\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._renderLoop = function () {\r\n if (!this._contextWasLost) {\r\n var shouldRender = true;\r\n if (!this.renderEvenInBackground && this._windowIsBackground) {\r\n shouldRender = false;\r\n }\r\n if (shouldRender) {\r\n // Start new frame\r\n this.beginFrame();\r\n for (var index = 0; index < this._activeRenderLoops.length; index++) {\r\n var renderFunction = this._activeRenderLoops[index];\r\n renderFunction();\r\n }\r\n // Present\r\n this.endFrame();\r\n }\r\n }\r\n if (this._activeRenderLoops.length > 0) {\r\n this._frameHandler = this._queueNewFrame(this._bindedRenderFunction, this.getHostWindow());\r\n }\r\n else {\r\n this._renderingQueueLaunched = false;\r\n }\r\n };\r\n /**\r\n * Gets the HTML canvas attached with the current webGL context\r\n * @returns a HTML canvas\r\n */\r\n ThinEngine.prototype.getRenderingCanvas = function () {\r\n return this._renderingCanvas;\r\n };\r\n /**\r\n * Gets host window\r\n * @returns the host window object\r\n */\r\n ThinEngine.prototype.getHostWindow = function () {\r\n if (!DomManagement.IsWindowObjectExist()) {\r\n return null;\r\n }\r\n if (this._renderingCanvas && this._renderingCanvas.ownerDocument && this._renderingCanvas.ownerDocument.defaultView) {\r\n return this._renderingCanvas.ownerDocument.defaultView;\r\n }\r\n return window;\r\n };\r\n /**\r\n * Gets the current render width\r\n * @param useScreen defines if screen size must be used (or the current render target if any)\r\n * @returns a number defining the current render width\r\n */\r\n ThinEngine.prototype.getRenderWidth = function (useScreen) {\r\n if (useScreen === void 0) { useScreen = false; }\r\n if (!useScreen && this._currentRenderTarget) {\r\n return this._currentRenderTarget.width;\r\n }\r\n return this._gl.drawingBufferWidth;\r\n };\r\n /**\r\n * Gets the current render height\r\n * @param useScreen defines if screen size must be used (or the current render target if any)\r\n * @returns a number defining the current render height\r\n */\r\n ThinEngine.prototype.getRenderHeight = function (useScreen) {\r\n if (useScreen === void 0) { useScreen = false; }\r\n if (!useScreen && this._currentRenderTarget) {\r\n return this._currentRenderTarget.height;\r\n }\r\n return this._gl.drawingBufferHeight;\r\n };\r\n /**\r\n * Can be used to override the current requestAnimationFrame requester.\r\n * @hidden\r\n */\r\n ThinEngine.prototype._queueNewFrame = function (bindedRenderFunction, requester) {\r\n return ThinEngine.QueueNewFrame(bindedRenderFunction, requester);\r\n };\r\n /**\r\n * Register and execute a render loop. The engine can have more than one render function\r\n * @param renderFunction defines the function to continuously execute\r\n */\r\n ThinEngine.prototype.runRenderLoop = function (renderFunction) {\r\n if (this._activeRenderLoops.indexOf(renderFunction) !== -1) {\r\n return;\r\n }\r\n this._activeRenderLoops.push(renderFunction);\r\n if (!this._renderingQueueLaunched) {\r\n this._renderingQueueLaunched = true;\r\n this._bindedRenderFunction = this._renderLoop.bind(this);\r\n this._frameHandler = this._queueNewFrame(this._bindedRenderFunction, this.getHostWindow());\r\n }\r\n };\r\n /**\r\n * Clear the current render buffer or the current render target (if any is set up)\r\n * @param color defines the color to use\r\n * @param backBuffer defines if the back buffer must be cleared\r\n * @param depth defines if the depth buffer must be cleared\r\n * @param stencil defines if the stencil buffer must be cleared\r\n */\r\n ThinEngine.prototype.clear = function (color, backBuffer, depth, stencil) {\r\n if (stencil === void 0) { stencil = false; }\r\n this.applyStates();\r\n var mode = 0;\r\n if (backBuffer && color) {\r\n this._gl.clearColor(color.r, color.g, color.b, color.a !== undefined ? color.a : 1.0);\r\n mode |= this._gl.COLOR_BUFFER_BIT;\r\n }\r\n if (depth) {\r\n this._gl.clearDepth(1.0);\r\n mode |= this._gl.DEPTH_BUFFER_BIT;\r\n }\r\n if (stencil) {\r\n this._gl.clearStencil(0);\r\n mode |= this._gl.STENCIL_BUFFER_BIT;\r\n }\r\n this._gl.clear(mode);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._viewport = function (x, y, width, height) {\r\n if (x !== this._viewportCached.x ||\r\n y !== this._viewportCached.y ||\r\n width !== this._viewportCached.z ||\r\n height !== this._viewportCached.w) {\r\n this._viewportCached.x = x;\r\n this._viewportCached.y = y;\r\n this._viewportCached.z = width;\r\n this._viewportCached.w = height;\r\n this._gl.viewport(x, y, width, height);\r\n }\r\n };\r\n /**\r\n * Set the WebGL's viewport\r\n * @param viewport defines the viewport element to be used\r\n * @param requiredWidth defines the width required for rendering. If not provided the rendering canvas' width is used\r\n * @param requiredHeight defines the height required for rendering. If not provided the rendering canvas' height is used\r\n */\r\n ThinEngine.prototype.setViewport = function (viewport, requiredWidth, requiredHeight) {\r\n var width = requiredWidth || this.getRenderWidth();\r\n var height = requiredHeight || this.getRenderHeight();\r\n var x = viewport.x || 0;\r\n var y = viewport.y || 0;\r\n this._cachedViewport = viewport;\r\n this._viewport(x * width, y * height, width * viewport.width, height * viewport.height);\r\n };\r\n /**\r\n * Begin a new frame\r\n */\r\n ThinEngine.prototype.beginFrame = function () {\r\n };\r\n /**\r\n * Enf the current frame\r\n */\r\n ThinEngine.prototype.endFrame = function () {\r\n // Force a flush in case we are using a bad OS.\r\n if (this._badOS) {\r\n this.flushFramebuffer();\r\n }\r\n };\r\n /**\r\n * Resize the view according to the canvas' size\r\n */\r\n ThinEngine.prototype.resize = function () {\r\n var width;\r\n var height;\r\n if (DomManagement.IsWindowObjectExist()) {\r\n width = this._renderingCanvas ? this._renderingCanvas.clientWidth : window.innerWidth;\r\n height = this._renderingCanvas ? this._renderingCanvas.clientHeight : window.innerHeight;\r\n }\r\n else {\r\n width = this._renderingCanvas ? this._renderingCanvas.width : 100;\r\n height = this._renderingCanvas ? this._renderingCanvas.height : 100;\r\n }\r\n this.setSize(width / this._hardwareScalingLevel, height / this._hardwareScalingLevel);\r\n };\r\n /**\r\n * Force a specific size of the canvas\r\n * @param width defines the new canvas' width\r\n * @param height defines the new canvas' height\r\n */\r\n ThinEngine.prototype.setSize = function (width, height) {\r\n if (!this._renderingCanvas) {\r\n return;\r\n }\r\n width = width | 0;\r\n height = height | 0;\r\n if (this._renderingCanvas.width === width && this._renderingCanvas.height === height) {\r\n return;\r\n }\r\n this._renderingCanvas.width = width;\r\n this._renderingCanvas.height = height;\r\n };\r\n /**\r\n * Binds the frame buffer to the specified texture.\r\n * @param texture The texture to render to or null for the default canvas\r\n * @param faceIndex The face of the texture to render to in case of cube texture\r\n * @param requiredWidth The width of the target to render to\r\n * @param requiredHeight The height of the target to render to\r\n * @param forceFullscreenViewport Forces the viewport to be the entire texture/screen if true\r\n * @param depthStencilTexture The depth stencil texture to use to render\r\n * @param lodLevel defines le lod level to bind to the frame buffer\r\n */\r\n ThinEngine.prototype.bindFramebuffer = function (texture, faceIndex, requiredWidth, requiredHeight, forceFullscreenViewport, depthStencilTexture, lodLevel) {\r\n if (lodLevel === void 0) { lodLevel = 0; }\r\n if (this._currentRenderTarget) {\r\n this.unBindFramebuffer(this._currentRenderTarget);\r\n }\r\n this._currentRenderTarget = texture;\r\n this._bindUnboundFramebuffer(texture._MSAAFramebuffer ? texture._MSAAFramebuffer : texture._framebuffer);\r\n var gl = this._gl;\r\n if (texture.isCube) {\r\n if (faceIndex === undefined) {\r\n faceIndex = 0;\r\n }\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, texture._webGLTexture, lodLevel);\r\n if (depthStencilTexture) {\r\n if (depthStencilTexture._generateStencilBuffer) {\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, depthStencilTexture._webGLTexture, lodLevel);\r\n }\r\n else {\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, depthStencilTexture._webGLTexture, lodLevel);\r\n }\r\n }\r\n }\r\n if (this._cachedViewport && !forceFullscreenViewport) {\r\n this.setViewport(this._cachedViewport, requiredWidth, requiredHeight);\r\n }\r\n else {\r\n if (!requiredWidth) {\r\n requiredWidth = texture.width;\r\n if (lodLevel) {\r\n requiredWidth = requiredWidth / Math.pow(2, lodLevel);\r\n }\r\n }\r\n if (!requiredHeight) {\r\n requiredHeight = texture.height;\r\n if (lodLevel) {\r\n requiredHeight = requiredHeight / Math.pow(2, lodLevel);\r\n }\r\n }\r\n this._viewport(0, 0, requiredWidth, requiredHeight);\r\n }\r\n this.wipeCaches();\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._bindUnboundFramebuffer = function (framebuffer) {\r\n if (this._currentFramebuffer !== framebuffer) {\r\n this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, framebuffer);\r\n this._currentFramebuffer = framebuffer;\r\n }\r\n };\r\n /**\r\n * Unbind the current render target texture from the webGL context\r\n * @param texture defines the render target texture to unbind\r\n * @param disableGenerateMipMaps defines a boolean indicating that mipmaps must not be generated\r\n * @param onBeforeUnbind defines a function which will be called before the effective unbind\r\n */\r\n ThinEngine.prototype.unBindFramebuffer = function (texture, disableGenerateMipMaps, onBeforeUnbind) {\r\n if (disableGenerateMipMaps === void 0) { disableGenerateMipMaps = false; }\r\n this._currentRenderTarget = null;\r\n // If MSAA, we need to bitblt back to main texture\r\n var gl = this._gl;\r\n if (texture._MSAAFramebuffer) {\r\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, texture._MSAAFramebuffer);\r\n gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, texture._framebuffer);\r\n gl.blitFramebuffer(0, 0, texture.width, texture.height, 0, 0, texture.width, texture.height, gl.COLOR_BUFFER_BIT, gl.NEAREST);\r\n }\r\n if (texture.generateMipMaps && !disableGenerateMipMaps && !texture.isCube) {\r\n this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n this._bindTextureDirectly(gl.TEXTURE_2D, null);\r\n }\r\n if (onBeforeUnbind) {\r\n if (texture._MSAAFramebuffer) {\r\n // Bind the correct framebuffer\r\n this._bindUnboundFramebuffer(texture._framebuffer);\r\n }\r\n onBeforeUnbind();\r\n }\r\n this._bindUnboundFramebuffer(null);\r\n };\r\n /**\r\n * Force a webGL flush (ie. a flush of all waiting webGL commands)\r\n */\r\n ThinEngine.prototype.flushFramebuffer = function () {\r\n this._gl.flush();\r\n };\r\n /**\r\n * Unbind the current render target and bind the default framebuffer\r\n */\r\n ThinEngine.prototype.restoreDefaultFramebuffer = function () {\r\n if (this._currentRenderTarget) {\r\n this.unBindFramebuffer(this._currentRenderTarget);\r\n }\r\n else {\r\n this._bindUnboundFramebuffer(null);\r\n }\r\n if (this._cachedViewport) {\r\n this.setViewport(this._cachedViewport);\r\n }\r\n this.wipeCaches();\r\n };\r\n // VBOs\r\n /** @hidden */\r\n ThinEngine.prototype._resetVertexBufferBinding = function () {\r\n this.bindArrayBuffer(null);\r\n this._cachedVertexBuffers = null;\r\n };\r\n /**\r\n * Creates a vertex buffer\r\n * @param data the data for the vertex buffer\r\n * @returns the new WebGL static buffer\r\n */\r\n ThinEngine.prototype.createVertexBuffer = function (data) {\r\n return this._createVertexBuffer(data, this._gl.STATIC_DRAW);\r\n };\r\n ThinEngine.prototype._createVertexBuffer = function (data, usage) {\r\n var vbo = this._gl.createBuffer();\r\n if (!vbo) {\r\n throw new Error(\"Unable to create vertex buffer\");\r\n }\r\n var dataBuffer = new WebGLDataBuffer(vbo);\r\n this.bindArrayBuffer(dataBuffer);\r\n if (data instanceof Array) {\r\n this._gl.bufferData(this._gl.ARRAY_BUFFER, new Float32Array(data), this._gl.STATIC_DRAW);\r\n }\r\n else {\r\n this._gl.bufferData(this._gl.ARRAY_BUFFER, data, this._gl.STATIC_DRAW);\r\n }\r\n this._resetVertexBufferBinding();\r\n dataBuffer.references = 1;\r\n return dataBuffer;\r\n };\r\n /**\r\n * Creates a dynamic vertex buffer\r\n * @param data the data for the dynamic vertex buffer\r\n * @returns the new WebGL dynamic buffer\r\n */\r\n ThinEngine.prototype.createDynamicVertexBuffer = function (data) {\r\n return this._createVertexBuffer(data, this._gl.DYNAMIC_DRAW);\r\n };\r\n ThinEngine.prototype._resetIndexBufferBinding = function () {\r\n this.bindIndexBuffer(null);\r\n this._cachedIndexBuffer = null;\r\n };\r\n /**\r\n * Creates a new index buffer\r\n * @param indices defines the content of the index buffer\r\n * @param updatable defines if the index buffer must be updatable\r\n * @returns a new webGL buffer\r\n */\r\n ThinEngine.prototype.createIndexBuffer = function (indices, updatable) {\r\n var vbo = this._gl.createBuffer();\r\n var dataBuffer = new WebGLDataBuffer(vbo);\r\n if (!vbo) {\r\n throw new Error(\"Unable to create index buffer\");\r\n }\r\n this.bindIndexBuffer(dataBuffer);\r\n var data = this._normalizeIndexData(indices);\r\n this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, data, updatable ? this._gl.DYNAMIC_DRAW : this._gl.STATIC_DRAW);\r\n this._resetIndexBufferBinding();\r\n dataBuffer.references = 1;\r\n dataBuffer.is32Bits = (data.BYTES_PER_ELEMENT === 4);\r\n return dataBuffer;\r\n };\r\n ThinEngine.prototype._normalizeIndexData = function (indices) {\r\n if (indices instanceof Uint16Array) {\r\n return indices;\r\n }\r\n // Check 32 bit support\r\n if (this._caps.uintIndices) {\r\n if (indices instanceof Uint32Array) {\r\n return indices;\r\n }\r\n else {\r\n // number[] or Int32Array, check if 32 bit is necessary\r\n for (var index = 0; index < indices.length; index++) {\r\n if (indices[index] >= 65535) {\r\n return new Uint32Array(indices);\r\n }\r\n }\r\n return new Uint16Array(indices);\r\n }\r\n }\r\n // No 32 bit support, force conversion to 16 bit (values greater 16 bit are lost)\r\n return new Uint16Array(indices);\r\n };\r\n /**\r\n * Bind a webGL buffer to the webGL context\r\n * @param buffer defines the buffer to bind\r\n */\r\n ThinEngine.prototype.bindArrayBuffer = function (buffer) {\r\n if (!this._vaoRecordInProgress) {\r\n this._unbindVertexArrayObject();\r\n }\r\n this.bindBuffer(buffer, this._gl.ARRAY_BUFFER);\r\n };\r\n /**\r\n * Bind a specific block at a given index in a specific shader program\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param blockName defines the block name\r\n * @param index defines the index where to bind the block\r\n */\r\n ThinEngine.prototype.bindUniformBlock = function (pipelineContext, blockName, index) {\r\n var program = pipelineContext.program;\r\n var uniformLocation = this._gl.getUniformBlockIndex(program, blockName);\r\n this._gl.uniformBlockBinding(program, uniformLocation, index);\r\n };\r\n ThinEngine.prototype.bindIndexBuffer = function (buffer) {\r\n if (!this._vaoRecordInProgress) {\r\n this._unbindVertexArrayObject();\r\n }\r\n this.bindBuffer(buffer, this._gl.ELEMENT_ARRAY_BUFFER);\r\n };\r\n ThinEngine.prototype.bindBuffer = function (buffer, target) {\r\n if (this._vaoRecordInProgress || this._currentBoundBuffer[target] !== buffer) {\r\n this._gl.bindBuffer(target, buffer ? buffer.underlyingResource : null);\r\n this._currentBoundBuffer[target] = buffer;\r\n }\r\n };\r\n /**\r\n * update the bound buffer with the given data\r\n * @param data defines the data to update\r\n */\r\n ThinEngine.prototype.updateArrayBuffer = function (data) {\r\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\r\n };\r\n ThinEngine.prototype._vertexAttribPointer = function (buffer, indx, size, type, normalized, stride, offset) {\r\n var pointer = this._currentBufferPointers[indx];\r\n var changed = false;\r\n if (!pointer.active) {\r\n changed = true;\r\n pointer.active = true;\r\n pointer.index = indx;\r\n pointer.size = size;\r\n pointer.type = type;\r\n pointer.normalized = normalized;\r\n pointer.stride = stride;\r\n pointer.offset = offset;\r\n pointer.buffer = buffer;\r\n }\r\n else {\r\n if (pointer.buffer !== buffer) {\r\n pointer.buffer = buffer;\r\n changed = true;\r\n }\r\n if (pointer.size !== size) {\r\n pointer.size = size;\r\n changed = true;\r\n }\r\n if (pointer.type !== type) {\r\n pointer.type = type;\r\n changed = true;\r\n }\r\n if (pointer.normalized !== normalized) {\r\n pointer.normalized = normalized;\r\n changed = true;\r\n }\r\n if (pointer.stride !== stride) {\r\n pointer.stride = stride;\r\n changed = true;\r\n }\r\n if (pointer.offset !== offset) {\r\n pointer.offset = offset;\r\n changed = true;\r\n }\r\n }\r\n if (changed || this._vaoRecordInProgress) {\r\n this.bindArrayBuffer(buffer);\r\n this._gl.vertexAttribPointer(indx, size, type, normalized, stride, offset);\r\n }\r\n };\r\n ThinEngine.prototype._bindIndexBufferWithCache = function (indexBuffer) {\r\n if (indexBuffer == null) {\r\n return;\r\n }\r\n if (this._cachedIndexBuffer !== indexBuffer) {\r\n this._cachedIndexBuffer = indexBuffer;\r\n this.bindIndexBuffer(indexBuffer);\r\n this._uintIndicesCurrentlySet = indexBuffer.is32Bits;\r\n }\r\n };\r\n ThinEngine.prototype._bindVertexBuffersAttributes = function (vertexBuffers, effect) {\r\n var attributes = effect.getAttributesNames();\r\n if (!this._vaoRecordInProgress) {\r\n this._unbindVertexArrayObject();\r\n }\r\n this.unbindAllAttributes();\r\n for (var index = 0; index < attributes.length; index++) {\r\n var order = effect.getAttributeLocation(index);\r\n if (order >= 0) {\r\n var vertexBuffer = vertexBuffers[attributes[index]];\r\n if (!vertexBuffer) {\r\n continue;\r\n }\r\n this._gl.enableVertexAttribArray(order);\r\n if (!this._vaoRecordInProgress) {\r\n this._vertexAttribArraysEnabled[order] = true;\r\n }\r\n var buffer = vertexBuffer.getBuffer();\r\n if (buffer) {\r\n this._vertexAttribPointer(buffer, order, vertexBuffer.getSize(), vertexBuffer.type, vertexBuffer.normalized, vertexBuffer.byteStride, vertexBuffer.byteOffset);\r\n if (vertexBuffer.getIsInstanced()) {\r\n this._gl.vertexAttribDivisor(order, vertexBuffer.getInstanceDivisor());\r\n if (!this._vaoRecordInProgress) {\r\n this._currentInstanceLocations.push(order);\r\n this._currentInstanceBuffers.push(buffer);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Records a vertex array object\r\n * @see http://doc.babylonjs.com/features/webgl2#vertex-array-objects\r\n * @param vertexBuffers defines the list of vertex buffers to store\r\n * @param indexBuffer defines the index buffer to store\r\n * @param effect defines the effect to store\r\n * @returns the new vertex array object\r\n */\r\n ThinEngine.prototype.recordVertexArrayObject = function (vertexBuffers, indexBuffer, effect) {\r\n var vao = this._gl.createVertexArray();\r\n this._vaoRecordInProgress = true;\r\n this._gl.bindVertexArray(vao);\r\n this._mustWipeVertexAttributes = true;\r\n this._bindVertexBuffersAttributes(vertexBuffers, effect);\r\n this.bindIndexBuffer(indexBuffer);\r\n this._vaoRecordInProgress = false;\r\n this._gl.bindVertexArray(null);\r\n return vao;\r\n };\r\n /**\r\n * Bind a specific vertex array object\r\n * @see http://doc.babylonjs.com/features/webgl2#vertex-array-objects\r\n * @param vertexArrayObject defines the vertex array object to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n */\r\n ThinEngine.prototype.bindVertexArrayObject = function (vertexArrayObject, indexBuffer) {\r\n if (this._cachedVertexArrayObject !== vertexArrayObject) {\r\n this._cachedVertexArrayObject = vertexArrayObject;\r\n this._gl.bindVertexArray(vertexArrayObject);\r\n this._cachedVertexBuffers = null;\r\n this._cachedIndexBuffer = null;\r\n this._uintIndicesCurrentlySet = indexBuffer != null && indexBuffer.is32Bits;\r\n this._mustWipeVertexAttributes = true;\r\n }\r\n };\r\n /**\r\n * Bind webGl buffers directly to the webGL context\r\n * @param vertexBuffer defines the vertex buffer to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n * @param vertexDeclaration defines the vertex declaration to use with the vertex buffer\r\n * @param vertexStrideSize defines the vertex stride of the vertex buffer\r\n * @param effect defines the effect associated with the vertex buffer\r\n */\r\n ThinEngine.prototype.bindBuffersDirectly = function (vertexBuffer, indexBuffer, vertexDeclaration, vertexStrideSize, effect) {\r\n if (this._cachedVertexBuffers !== vertexBuffer || this._cachedEffectForVertexBuffers !== effect) {\r\n this._cachedVertexBuffers = vertexBuffer;\r\n this._cachedEffectForVertexBuffers = effect;\r\n var attributesCount = effect.getAttributesCount();\r\n this._unbindVertexArrayObject();\r\n this.unbindAllAttributes();\r\n var offset = 0;\r\n for (var index = 0; index < attributesCount; index++) {\r\n if (index < vertexDeclaration.length) {\r\n var order = effect.getAttributeLocation(index);\r\n if (order >= 0) {\r\n this._gl.enableVertexAttribArray(order);\r\n this._vertexAttribArraysEnabled[order] = true;\r\n this._vertexAttribPointer(vertexBuffer, order, vertexDeclaration[index], this._gl.FLOAT, false, vertexStrideSize, offset);\r\n }\r\n offset += vertexDeclaration[index] * 4;\r\n }\r\n }\r\n }\r\n this._bindIndexBufferWithCache(indexBuffer);\r\n };\r\n ThinEngine.prototype._unbindVertexArrayObject = function () {\r\n if (!this._cachedVertexArrayObject) {\r\n return;\r\n }\r\n this._cachedVertexArrayObject = null;\r\n this._gl.bindVertexArray(null);\r\n };\r\n /**\r\n * Bind a list of vertex buffers to the webGL context\r\n * @param vertexBuffers defines the list of vertex buffers to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n * @param effect defines the effect associated with the vertex buffers\r\n */\r\n ThinEngine.prototype.bindBuffers = function (vertexBuffers, indexBuffer, effect) {\r\n if (this._cachedVertexBuffers !== vertexBuffers || this._cachedEffectForVertexBuffers !== effect) {\r\n this._cachedVertexBuffers = vertexBuffers;\r\n this._cachedEffectForVertexBuffers = effect;\r\n this._bindVertexBuffersAttributes(vertexBuffers, effect);\r\n }\r\n this._bindIndexBufferWithCache(indexBuffer);\r\n };\r\n /**\r\n * Unbind all instance attributes\r\n */\r\n ThinEngine.prototype.unbindInstanceAttributes = function () {\r\n var boundBuffer;\r\n for (var i = 0, ul = this._currentInstanceLocations.length; i < ul; i++) {\r\n var instancesBuffer = this._currentInstanceBuffers[i];\r\n if (boundBuffer != instancesBuffer && instancesBuffer.references) {\r\n boundBuffer = instancesBuffer;\r\n this.bindArrayBuffer(instancesBuffer);\r\n }\r\n var offsetLocation = this._currentInstanceLocations[i];\r\n this._gl.vertexAttribDivisor(offsetLocation, 0);\r\n }\r\n this._currentInstanceBuffers.length = 0;\r\n this._currentInstanceLocations.length = 0;\r\n };\r\n /**\r\n * Release and free the memory of a vertex array object\r\n * @param vao defines the vertex array object to delete\r\n */\r\n ThinEngine.prototype.releaseVertexArrayObject = function (vao) {\r\n this._gl.deleteVertexArray(vao);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._releaseBuffer = function (buffer) {\r\n buffer.references--;\r\n if (buffer.references === 0) {\r\n this._deleteBuffer(buffer);\r\n return true;\r\n }\r\n return false;\r\n };\r\n ThinEngine.prototype._deleteBuffer = function (buffer) {\r\n this._gl.deleteBuffer(buffer.underlyingResource);\r\n };\r\n /**\r\n * Update the content of a webGL buffer used with instanciation and bind it to the webGL context\r\n * @param instancesBuffer defines the webGL buffer to update and bind\r\n * @param data defines the data to store in the buffer\r\n * @param offsetLocations defines the offsets or attributes information used to determine where data must be stored in the buffer\r\n */\r\n ThinEngine.prototype.updateAndBindInstancesBuffer = function (instancesBuffer, data, offsetLocations) {\r\n this.bindArrayBuffer(instancesBuffer);\r\n if (data) {\r\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\r\n }\r\n if (offsetLocations[0].index !== undefined) {\r\n var stride = 0;\r\n for (var i = 0; i < offsetLocations.length; i++) {\r\n var ai = offsetLocations[i];\r\n stride += ai.attributeSize * 4;\r\n }\r\n for (var i = 0; i < offsetLocations.length; i++) {\r\n var ai = offsetLocations[i];\r\n if (!this._vertexAttribArraysEnabled[ai.index]) {\r\n this._gl.enableVertexAttribArray(ai.index);\r\n this._vertexAttribArraysEnabled[ai.index] = true;\r\n }\r\n this._vertexAttribPointer(instancesBuffer, ai.index, ai.attributeSize, ai.attributeType || this._gl.FLOAT, ai.normalized || false, stride, ai.offset);\r\n this._gl.vertexAttribDivisor(ai.index, 1);\r\n this._currentInstanceLocations.push(ai.index);\r\n this._currentInstanceBuffers.push(instancesBuffer);\r\n }\r\n }\r\n else {\r\n for (var index = 0; index < 4; index++) {\r\n var offsetLocation = offsetLocations[index];\r\n if (!this._vertexAttribArraysEnabled[offsetLocation]) {\r\n this._gl.enableVertexAttribArray(offsetLocation);\r\n this._vertexAttribArraysEnabled[offsetLocation] = true;\r\n }\r\n this._vertexAttribPointer(instancesBuffer, offsetLocation, 4, this._gl.FLOAT, false, 64, index * 16);\r\n this._gl.vertexAttribDivisor(offsetLocation, 1);\r\n this._currentInstanceLocations.push(offsetLocation);\r\n this._currentInstanceBuffers.push(instancesBuffer);\r\n }\r\n }\r\n };\r\n /**\r\n * Apply all cached states (depth, culling, stencil and alpha)\r\n */\r\n ThinEngine.prototype.applyStates = function () {\r\n this._depthCullingState.apply(this._gl);\r\n this._stencilState.apply(this._gl);\r\n this._alphaState.apply(this._gl);\r\n };\r\n /**\r\n * Send a draw order\r\n * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)\r\n * @param indexStart defines the starting index\r\n * @param indexCount defines the number of index to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.draw = function (useTriangles, indexStart, indexCount, instancesCount) {\r\n this.drawElementsType(useTriangles ? 0 : 1, indexStart, indexCount, instancesCount);\r\n };\r\n /**\r\n * Draw a list of points\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawPointClouds = function (verticesStart, verticesCount, instancesCount) {\r\n this.drawArraysType(2, verticesStart, verticesCount, instancesCount);\r\n };\r\n /**\r\n * Draw a list of unindexed primitives\r\n * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawUnIndexed = function (useTriangles, verticesStart, verticesCount, instancesCount) {\r\n this.drawArraysType(useTriangles ? 0 : 1, verticesStart, verticesCount, instancesCount);\r\n };\r\n /**\r\n * Draw a list of indexed primitives\r\n * @param fillMode defines the primitive to use\r\n * @param indexStart defines the starting index\r\n * @param indexCount defines the number of index to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawElementsType = function (fillMode, indexStart, indexCount, instancesCount) {\r\n // Apply states\r\n this.applyStates();\r\n this._reportDrawCall();\r\n // Render\r\n var drawMode = this._drawMode(fillMode);\r\n var indexFormat = this._uintIndicesCurrentlySet ? this._gl.UNSIGNED_INT : this._gl.UNSIGNED_SHORT;\r\n var mult = this._uintIndicesCurrentlySet ? 4 : 2;\r\n if (instancesCount) {\r\n this._gl.drawElementsInstanced(drawMode, indexCount, indexFormat, indexStart * mult, instancesCount);\r\n }\r\n else {\r\n this._gl.drawElements(drawMode, indexCount, indexFormat, indexStart * mult);\r\n }\r\n };\r\n /**\r\n * Draw a list of unindexed primitives\r\n * @param fillMode defines the primitive to use\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instanciation is enabled)\r\n */\r\n ThinEngine.prototype.drawArraysType = function (fillMode, verticesStart, verticesCount, instancesCount) {\r\n // Apply states\r\n this.applyStates();\r\n this._reportDrawCall();\r\n var drawMode = this._drawMode(fillMode);\r\n if (instancesCount) {\r\n this._gl.drawArraysInstanced(drawMode, verticesStart, verticesCount, instancesCount);\r\n }\r\n else {\r\n this._gl.drawArrays(drawMode, verticesStart, verticesCount);\r\n }\r\n };\r\n ThinEngine.prototype._drawMode = function (fillMode) {\r\n switch (fillMode) {\r\n // Triangle views\r\n case 0:\r\n return this._gl.TRIANGLES;\r\n case 2:\r\n return this._gl.POINTS;\r\n case 1:\r\n return this._gl.LINES;\r\n // Draw modes\r\n case 3:\r\n return this._gl.POINTS;\r\n case 4:\r\n return this._gl.LINES;\r\n case 5:\r\n return this._gl.LINE_LOOP;\r\n case 6:\r\n return this._gl.LINE_STRIP;\r\n case 7:\r\n return this._gl.TRIANGLE_STRIP;\r\n case 8:\r\n return this._gl.TRIANGLE_FAN;\r\n default:\r\n return this._gl.TRIANGLES;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._reportDrawCall = function () {\r\n // Will be implemented by children\r\n };\r\n // Shaders\r\n /** @hidden */\r\n ThinEngine.prototype._releaseEffect = function (effect) {\r\n if (this._compiledEffects[effect._key]) {\r\n delete this._compiledEffects[effect._key];\r\n this._deletePipelineContext(effect.getPipelineContext());\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._deletePipelineContext = function (pipelineContext) {\r\n var webGLPipelineContext = pipelineContext;\r\n if (webGLPipelineContext && webGLPipelineContext.program) {\r\n webGLPipelineContext.program.__SPECTOR_rebuildProgram = null;\r\n this._gl.deleteProgram(webGLPipelineContext.program);\r\n }\r\n };\r\n /**\r\n * Create a new effect (used to store vertex/fragment shaders)\r\n * @param baseName defines the base name of the effect (The name of file without .fragment.fx or .vertex.fx)\r\n * @param attributesNamesOrOptions defines either a list of attribute names or an IEffectCreationOptions object\r\n * @param uniformsNamesOrEngine defines either a list of uniform names or the engine to use\r\n * @param samplers defines an array of string used to represent textures\r\n * @param defines defines the string containing the defines to use to compile the shaders\r\n * @param fallbacks defines the list of potential fallbacks to use if shader conmpilation fails\r\n * @param onCompiled defines a function to call when the effect creation is successful\r\n * @param onError defines a function to call when the effect creation has failed\r\n * @param indexParameters defines an object containing the index values to use to compile shaders (like the maximum number of simultaneous lights)\r\n * @returns the new Effect\r\n */\r\n ThinEngine.prototype.createEffect = function (baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, defines, fallbacks, onCompiled, onError, indexParameters) {\r\n var vertex = baseName.vertexElement || baseName.vertex || baseName;\r\n var fragment = baseName.fragmentElement || baseName.fragment || baseName;\r\n var name = vertex + \"+\" + fragment + \"@\" + (defines ? defines : attributesNamesOrOptions.defines);\r\n if (this._compiledEffects[name]) {\r\n var compiledEffect = this._compiledEffects[name];\r\n if (onCompiled && compiledEffect.isReady()) {\r\n onCompiled(compiledEffect);\r\n }\r\n return compiledEffect;\r\n }\r\n var effect = new Effect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, this, defines, fallbacks, onCompiled, onError, indexParameters);\r\n effect._key = name;\r\n this._compiledEffects[name] = effect;\r\n return effect;\r\n };\r\n ThinEngine._ConcatenateShader = function (source, defines, shaderVersion) {\r\n if (shaderVersion === void 0) { shaderVersion = \"\"; }\r\n return shaderVersion + (defines ? defines + \"\\n\" : \"\") + source;\r\n };\r\n ThinEngine.prototype._compileShader = function (source, type, defines, shaderVersion) {\r\n return this._compileRawShader(ThinEngine._ConcatenateShader(source, defines, shaderVersion), type);\r\n };\r\n ThinEngine.prototype._compileRawShader = function (source, type) {\r\n var gl = this._gl;\r\n var shader = gl.createShader(type === \"vertex\" ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER);\r\n if (!shader) {\r\n throw new Error(\"Something went wrong while compile the shader.\");\r\n }\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n return shader;\r\n };\r\n /**\r\n * Directly creates a webGL program\r\n * @param pipelineContext defines the pipeline context to attach to\r\n * @param vertexCode defines the vertex shader code to use\r\n * @param fragmentCode defines the fragment shader code to use\r\n * @param context defines the webGL context to use (if not set, the current one will be used)\r\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\r\n * @returns the new webGL program\r\n */\r\n ThinEngine.prototype.createRawShaderProgram = function (pipelineContext, vertexCode, fragmentCode, context, transformFeedbackVaryings) {\r\n if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }\r\n context = context || this._gl;\r\n var vertexShader = this._compileRawShader(vertexCode, \"vertex\");\r\n var fragmentShader = this._compileRawShader(fragmentCode, \"fragment\");\r\n return this._createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings);\r\n };\r\n /**\r\n * Creates a webGL program\r\n * @param pipelineContext defines the pipeline context to attach to\r\n * @param vertexCode defines the vertex shader code to use\r\n * @param fragmentCode defines the fragment shader code to use\r\n * @param defines defines the string containing the defines to use to compile the shaders\r\n * @param context defines the webGL context to use (if not set, the current one will be used)\r\n * @param transformFeedbackVaryings defines the list of transform feedback varyings to use\r\n * @returns the new webGL program\r\n */\r\n ThinEngine.prototype.createShaderProgram = function (pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings) {\r\n if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }\r\n context = context || this._gl;\r\n var shaderVersion = (this._webGLVersion > 1) ? \"#version 300 es\\n#define WEBGL2 \\n\" : \"\";\r\n var vertexShader = this._compileShader(vertexCode, \"vertex\", defines, shaderVersion);\r\n var fragmentShader = this._compileShader(fragmentCode, \"fragment\", defines, shaderVersion);\r\n return this._createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings);\r\n };\r\n /**\r\n * Creates a new pipeline context\r\n * @returns the new pipeline\r\n */\r\n ThinEngine.prototype.createPipelineContext = function () {\r\n var pipelineContext = new WebGLPipelineContext();\r\n pipelineContext.engine = this;\r\n if (this._caps.parallelShaderCompile) {\r\n pipelineContext.isParallelCompiled = true;\r\n }\r\n return pipelineContext;\r\n };\r\n ThinEngine.prototype._createShaderProgram = function (pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings) {\r\n if (transformFeedbackVaryings === void 0) { transformFeedbackVaryings = null; }\r\n var shaderProgram = context.createProgram();\r\n pipelineContext.program = shaderProgram;\r\n if (!shaderProgram) {\r\n throw new Error(\"Unable to create program\");\r\n }\r\n context.attachShader(shaderProgram, vertexShader);\r\n context.attachShader(shaderProgram, fragmentShader);\r\n context.linkProgram(shaderProgram);\r\n pipelineContext.context = context;\r\n pipelineContext.vertexShader = vertexShader;\r\n pipelineContext.fragmentShader = fragmentShader;\r\n if (!pipelineContext.isParallelCompiled) {\r\n this._finalizePipelineContext(pipelineContext);\r\n }\r\n return shaderProgram;\r\n };\r\n ThinEngine.prototype._finalizePipelineContext = function (pipelineContext) {\r\n var context = pipelineContext.context;\r\n var vertexShader = pipelineContext.vertexShader;\r\n var fragmentShader = pipelineContext.fragmentShader;\r\n var program = pipelineContext.program;\r\n var linked = context.getProgramParameter(program, context.LINK_STATUS);\r\n if (!linked) { // Get more info\r\n // Vertex\r\n if (!this._gl.getShaderParameter(vertexShader, this._gl.COMPILE_STATUS)) {\r\n var log = this._gl.getShaderInfoLog(vertexShader);\r\n if (log) {\r\n throw new Error(\"VERTEX SHADER \" + log);\r\n }\r\n }\r\n // Fragment\r\n if (!this._gl.getShaderParameter(fragmentShader, this._gl.COMPILE_STATUS)) {\r\n var log = this._gl.getShaderInfoLog(fragmentShader);\r\n if (log) {\r\n throw new Error(\"FRAGMENT SHADER \" + log);\r\n }\r\n }\r\n var error = context.getProgramInfoLog(program);\r\n if (error) {\r\n throw new Error(error);\r\n }\r\n }\r\n if (this.validateShaderPrograms) {\r\n context.validateProgram(program);\r\n var validated = context.getProgramParameter(program, context.VALIDATE_STATUS);\r\n if (!validated) {\r\n var error = context.getProgramInfoLog(program);\r\n if (error) {\r\n throw new Error(error);\r\n }\r\n }\r\n }\r\n context.deleteShader(vertexShader);\r\n context.deleteShader(fragmentShader);\r\n pipelineContext.vertexShader = undefined;\r\n pipelineContext.fragmentShader = undefined;\r\n if (pipelineContext.onCompiled) {\r\n pipelineContext.onCompiled();\r\n pipelineContext.onCompiled = undefined;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._preparePipelineContext = function (pipelineContext, vertexSourceCode, fragmentSourceCode, createAsRaw, rebuildRebind, defines, transformFeedbackVaryings) {\r\n var webGLRenderingState = pipelineContext;\r\n if (createAsRaw) {\r\n webGLRenderingState.program = this.createRawShaderProgram(webGLRenderingState, vertexSourceCode, fragmentSourceCode, undefined, transformFeedbackVaryings);\r\n }\r\n else {\r\n webGLRenderingState.program = this.createShaderProgram(webGLRenderingState, vertexSourceCode, fragmentSourceCode, defines, undefined, transformFeedbackVaryings);\r\n }\r\n webGLRenderingState.program.__SPECTOR_rebuildProgram = rebuildRebind;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._isRenderingStateCompiled = function (pipelineContext) {\r\n var webGLPipelineContext = pipelineContext;\r\n if (this._gl.getProgramParameter(webGLPipelineContext.program, this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)) {\r\n this._finalizePipelineContext(webGLPipelineContext);\r\n return true;\r\n }\r\n return false;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._executeWhenRenderingStateIsCompiled = function (pipelineContext, action) {\r\n var webGLPipelineContext = pipelineContext;\r\n if (!webGLPipelineContext.isParallelCompiled) {\r\n action();\r\n return;\r\n }\r\n webGLPipelineContext.onCompiled = action;\r\n };\r\n /**\r\n * Gets the list of webGL uniform locations associated with a specific program based on a list of uniform names\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param uniformsNames defines the list of uniform names\r\n * @returns an array of webGL uniform locations\r\n */\r\n ThinEngine.prototype.getUniforms = function (pipelineContext, uniformsNames) {\r\n var results = new Array();\r\n var webGLPipelineContext = pipelineContext;\r\n for (var index = 0; index < uniformsNames.length; index++) {\r\n results.push(this._gl.getUniformLocation(webGLPipelineContext.program, uniformsNames[index]));\r\n }\r\n return results;\r\n };\r\n /**\r\n * Gets the lsit of active attributes for a given webGL program\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param attributesNames defines the list of attribute names to get\r\n * @returns an array of indices indicating the offset of each attribute\r\n */\r\n ThinEngine.prototype.getAttributes = function (pipelineContext, attributesNames) {\r\n var results = [];\r\n var webGLPipelineContext = pipelineContext;\r\n for (var index = 0; index < attributesNames.length; index++) {\r\n try {\r\n results.push(this._gl.getAttribLocation(webGLPipelineContext.program, attributesNames[index]));\r\n }\r\n catch (e) {\r\n results.push(-1);\r\n }\r\n }\r\n return results;\r\n };\r\n /**\r\n * Activates an effect, mkaing it the current one (ie. the one used for rendering)\r\n * @param effect defines the effect to activate\r\n */\r\n ThinEngine.prototype.enableEffect = function (effect) {\r\n if (!effect || effect === this._currentEffect) {\r\n return;\r\n }\r\n // Use program\r\n this.bindSamplers(effect);\r\n this._currentEffect = effect;\r\n if (effect.onBind) {\r\n effect.onBind(effect);\r\n }\r\n if (effect._onBindObservable) {\r\n effect._onBindObservable.notifyObservers(effect);\r\n }\r\n };\r\n /**\r\n * Set the value of an uniform to a number (int)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param value defines the int number to store\r\n */\r\n ThinEngine.prototype.setInt = function (uniform, value) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1i(uniform, value);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray = function (uniform, array) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray2 = function (uniform, array) {\r\n if (!uniform || array.length % 2 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform2iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray3 = function (uniform, array) {\r\n if (!uniform || array.length % 3 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform3iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n */\r\n ThinEngine.prototype.setIntArray4 = function (uniform, array) {\r\n if (!uniform || array.length % 4 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform4iv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray = function (uniform, array) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray2 = function (uniform, array) {\r\n if (!uniform || array.length % 2 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform2fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray3 = function (uniform, array) {\r\n if (!uniform || array.length % 3 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform3fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n */\r\n ThinEngine.prototype.setArray4 = function (uniform, array) {\r\n if (!uniform || array.length % 4 !== 0) {\r\n return;\r\n }\r\n this._gl.uniform4fv(uniform, array);\r\n };\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as matrices)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrices defines the array of float32 to store\r\n */\r\n ThinEngine.prototype.setMatrices = function (uniform, matrices) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniformMatrix4fv(uniform, false, matrices);\r\n };\r\n /**\r\n * Set the value of an uniform to a matrix (3x3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrix defines the Float32Array representing the 3x3 matrix to store\r\n */\r\n ThinEngine.prototype.setMatrix3x3 = function (uniform, matrix) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniformMatrix3fv(uniform, false, matrix);\r\n };\r\n /**\r\n * Set the value of an uniform to a matrix (2x2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrix defines the Float32Array representing the 2x2 matrix to store\r\n */\r\n ThinEngine.prototype.setMatrix2x2 = function (uniform, matrix) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniformMatrix2fv(uniform, false, matrix);\r\n };\r\n /**\r\n * Set the value of an uniform to a number (float)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param value defines the float number to store\r\n */\r\n ThinEngine.prototype.setFloat = function (uniform, value) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform1f(uniform, value);\r\n };\r\n /**\r\n * Set the value of an uniform to a vec2\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n */\r\n ThinEngine.prototype.setFloat2 = function (uniform, x, y) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform2f(uniform, x, y);\r\n };\r\n /**\r\n * Set the value of an uniform to a vec3\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @param z defines the 3rd component of the value\r\n */\r\n ThinEngine.prototype.setFloat3 = function (uniform, x, y, z) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform3f(uniform, x, y, z);\r\n };\r\n /**\r\n * Set the value of an uniform to a vec4\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @param z defines the 3rd component of the value\r\n * @param w defines the 4th component of the value\r\n */\r\n ThinEngine.prototype.setFloat4 = function (uniform, x, y, z, w) {\r\n if (!uniform) {\r\n return;\r\n }\r\n this._gl.uniform4f(uniform, x, y, z, w);\r\n };\r\n Object.defineProperty(ThinEngine.prototype, \"depthCullingState\", {\r\n // States\r\n /**\r\n * Gets the depth culling state manager\r\n */\r\n get: function () {\r\n return this._depthCullingState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"alphaState\", {\r\n /**\r\n * Gets the alpha state manager\r\n */\r\n get: function () {\r\n return this._alphaState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThinEngine.prototype, \"stencilState\", {\r\n /**\r\n * Gets the stencil state manager\r\n */\r\n get: function () {\r\n return this._stencilState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Textures\r\n /**\r\n * Clears the list of texture accessible through engine.\r\n * This can help preventing texture load conflict due to name collision.\r\n */\r\n ThinEngine.prototype.clearInternalTexturesCache = function () {\r\n this._internalTexturesCache = [];\r\n };\r\n /**\r\n * Force the entire cache to be cleared\r\n * You should not have to use this function unless your engine needs to share the webGL context with another engine\r\n * @param bruteForce defines a boolean to force clearing ALL caches (including stencil, detoh and alpha states)\r\n */\r\n ThinEngine.prototype.wipeCaches = function (bruteForce) {\r\n if (this.preventCacheWipeBetweenFrames && !bruteForce) {\r\n return;\r\n }\r\n this._currentEffect = null;\r\n this._viewportCached.x = 0;\r\n this._viewportCached.y = 0;\r\n this._viewportCached.z = 0;\r\n this._viewportCached.w = 0;\r\n if (bruteForce) {\r\n this.resetTextureCache();\r\n this._currentProgram = null;\r\n this._stencilState.reset();\r\n this._depthCullingState.reset();\r\n this._depthCullingState.depthFunc = this._gl.LEQUAL;\r\n this._alphaState.reset();\r\n this._unpackFlipYCached = null;\r\n this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this._gl.NONE);\r\n this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);\r\n }\r\n this._resetVertexBufferBinding();\r\n this._cachedIndexBuffer = null;\r\n this._cachedEffectForVertexBuffers = null;\r\n this._unbindVertexArrayObject();\r\n this.bindIndexBuffer(null);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getSamplingParameters = function (samplingMode, generateMipMaps) {\r\n var gl = this._gl;\r\n var magFilter = gl.NEAREST;\r\n var minFilter = gl.NEAREST;\r\n switch (samplingMode) {\r\n case 2:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case 3:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case 1:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case 4:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case 5:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case 6:\r\n magFilter = gl.NEAREST;\r\n if (generateMipMaps) {\r\n minFilter = gl.LINEAR_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.LINEAR;\r\n }\r\n break;\r\n case 7:\r\n magFilter = gl.NEAREST;\r\n minFilter = gl.LINEAR;\r\n break;\r\n case 8:\r\n magFilter = gl.NEAREST;\r\n minFilter = gl.NEAREST;\r\n break;\r\n case 9:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_NEAREST;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case 10:\r\n magFilter = gl.LINEAR;\r\n if (generateMipMaps) {\r\n minFilter = gl.NEAREST_MIPMAP_LINEAR;\r\n }\r\n else {\r\n minFilter = gl.NEAREST;\r\n }\r\n break;\r\n case 11:\r\n magFilter = gl.LINEAR;\r\n minFilter = gl.LINEAR;\r\n break;\r\n case 12:\r\n magFilter = gl.LINEAR;\r\n minFilter = gl.NEAREST;\r\n break;\r\n }\r\n return {\r\n min: minFilter,\r\n mag: magFilter\r\n };\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._createTexture = function () {\r\n var texture = this._gl.createTexture();\r\n if (!texture) {\r\n throw new Error(\"Unable to create texture\");\r\n }\r\n return texture;\r\n };\r\n /**\r\n * Usually called from Texture.ts.\r\n * Passed information to create a WebGLTexture\r\n * @param urlArg defines a value which contains one of the following:\r\n * * A conventional http URL, e.g. 'http://...' or 'file://...'\r\n * * A base64 string of in-line texture data, e.g. 'data:image/jpg;base64,/...'\r\n * * An indicator that data being passed using the buffer parameter, e.g. 'data:mytexture.jpg'\r\n * @param noMipmap defines a boolean indicating that no mipmaps shall be generated. Ignored for compressed textures. They must be in the file\r\n * @param invertY when true, image is flipped when loaded. You probably want true. Certain compressed textures may invert this if their default is inverted (eg. ktx)\r\n * @param scene needed for loading to the correct scene\r\n * @param samplingMode mode with should be used sample / access the texture (Default: Texture.TRILINEAR_SAMPLINGMODE)\r\n * @param onLoad optional callback to be called upon successful completion\r\n * @param onError optional callback to be called upon failure\r\n * @param buffer a source of a file previously fetched as either a base64 string, an ArrayBuffer (compressed or image format), HTMLImageElement (image format), or a Blob\r\n * @param fallback an internal argument in case the function must be called again, due to etc1 not having alpha capabilities\r\n * @param format internal format. Default: RGB when extension is '.jpg' else RGBA. Ignored for compressed textures\r\n * @param forcedExtension defines the extension to use to pick the right loader\r\n * @param excludeLoaders array of texture loaders that should be excluded when picking a loader for the texture (default: empty array)\r\n * @param mimeType defines an optional mime type\r\n * @returns a InternalTexture for assignment back into BABYLON.Texture\r\n */\r\n ThinEngine.prototype.createTexture = function (urlArg, noMipmap, invertY, scene, samplingMode, onLoad, onError, buffer, fallback, format, forcedExtension, excludeLoaders, mimeType) {\r\n var _this = this;\r\n if (samplingMode === void 0) { samplingMode = 3; }\r\n if (onLoad === void 0) { onLoad = null; }\r\n if (onError === void 0) { onError = null; }\r\n if (buffer === void 0) { buffer = null; }\r\n if (fallback === void 0) { fallback = null; }\r\n if (format === void 0) { format = null; }\r\n if (forcedExtension === void 0) { forcedExtension = null; }\r\n if (excludeLoaders === void 0) { excludeLoaders = []; }\r\n var url = String(urlArg); // assign a new string, so that the original is still available in case of fallback\r\n var fromData = url.substr(0, 5) === \"data:\";\r\n var fromBlob = url.substr(0, 5) === \"blob:\";\r\n var isBase64 = fromData && url.indexOf(\";base64,\") !== -1;\r\n var texture = fallback ? fallback : new InternalTexture(this, InternalTextureSource.Url);\r\n // establish the file extension, if possible\r\n var lastDot = url.lastIndexOf('.');\r\n var extension = forcedExtension ? forcedExtension : (lastDot > -1 ? url.substring(lastDot).toLowerCase() : \"\");\r\n var loader = null;\r\n for (var _i = 0, _a = ThinEngine._TextureLoaders; _i < _a.length; _i++) {\r\n var availableLoader = _a[_i];\r\n if (excludeLoaders.indexOf(availableLoader) === -1 && availableLoader.canLoad(extension, this._textureFormatInUse, fallback, isBase64, buffer ? true : false)) {\r\n loader = availableLoader;\r\n break;\r\n }\r\n }\r\n if (loader) {\r\n url = loader.transformUrl(url, this._textureFormatInUse);\r\n }\r\n if (scene) {\r\n scene._addPendingData(texture);\r\n }\r\n texture.url = url;\r\n texture.generateMipMaps = !noMipmap;\r\n texture.samplingMode = samplingMode;\r\n texture.invertY = invertY;\r\n if (!this._doNotHandleContextLost) {\r\n // Keep a link to the buffer only if we plan to handle context lost\r\n texture._buffer = buffer;\r\n }\r\n var onLoadObserver = null;\r\n if (onLoad && !fallback) {\r\n onLoadObserver = texture.onLoadedObservable.add(onLoad);\r\n }\r\n if (!fallback) {\r\n this._internalTexturesCache.push(texture);\r\n }\r\n var onInternalError = function (message, exception) {\r\n if (scene) {\r\n scene._removePendingData(texture);\r\n }\r\n var customFallback = false;\r\n if (loader) {\r\n var fallbackUrl = loader.getFallbackTextureUrl(url, _this._textureFormatInUse);\r\n if (fallbackUrl) {\r\n // Add Back\r\n customFallback = true;\r\n excludeLoaders.push(loader);\r\n _this.createTexture(urlArg, noMipmap, texture.invertY, scene, samplingMode, null, onError, buffer, texture, undefined, undefined, excludeLoaders);\r\n return;\r\n }\r\n }\r\n if (!customFallback) {\r\n if (onLoadObserver) {\r\n texture.onLoadedObservable.remove(onLoadObserver);\r\n }\r\n if (EngineStore.UseFallbackTexture) {\r\n _this.createTexture(EngineStore.FallbackTexture, noMipmap, texture.invertY, scene, samplingMode, null, onError, buffer, texture);\r\n return;\r\n }\r\n }\r\n if (onError) {\r\n onError(message || \"Unknown error\", exception);\r\n }\r\n };\r\n // processing for non-image formats\r\n if (loader) {\r\n var callback = function (data) {\r\n loader.loadData(data, texture, function (width, height, loadMipmap, isCompressed, done, loadFailed) {\r\n if (loadFailed) {\r\n onInternalError(\"TextureLoader failed to load data\");\r\n }\r\n else {\r\n _this._prepareWebGLTexture(texture, scene, width, height, texture.invertY, !loadMipmap, isCompressed, function () {\r\n done();\r\n return false;\r\n }, samplingMode);\r\n }\r\n });\r\n };\r\n if (!buffer) {\r\n this._loadFile(url, callback, undefined, scene ? scene.offlineProvider : undefined, true, function (request, exception) {\r\n onInternalError(\"Unable to load \" + (request ? request.responseURL : url, exception));\r\n });\r\n }\r\n else {\r\n //callback(buffer as ArrayBuffer);\r\n if (buffer instanceof ArrayBuffer) {\r\n callback(buffer);\r\n }\r\n else {\r\n if (onError) {\r\n onError(\"Unable to load: only ArrayBuffer supported here\", null);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n var onload = function (img) {\r\n if (fromBlob && !_this._doNotHandleContextLost) {\r\n // We need to store the image if we need to rebuild the texture\r\n // in case of a webgl context lost\r\n texture._buffer = img;\r\n }\r\n _this._prepareWebGLTexture(texture, scene, img.width, img.height, texture.invertY, noMipmap, false, function (potWidth, potHeight, continuationCallback) {\r\n var gl = _this._gl;\r\n var isPot = (img.width === potWidth && img.height === potHeight);\r\n var internalFormat = format ? _this._getInternalFormat(format) : ((extension === \".jpg\") ? gl.RGB : gl.RGBA);\r\n if (isPot) {\r\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, img);\r\n return false;\r\n }\r\n var maxTextureSize = _this._caps.maxTextureSize;\r\n if (img.width > maxTextureSize || img.height > maxTextureSize || !_this._supportsHardwareTextureRescaling) {\r\n _this._prepareWorkingCanvas();\r\n if (!_this._workingCanvas || !_this._workingContext) {\r\n return false;\r\n }\r\n _this._workingCanvas.width = potWidth;\r\n _this._workingCanvas.height = potHeight;\r\n _this._workingContext.drawImage(img, 0, 0, img.width, img.height, 0, 0, potWidth, potHeight);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, _this._workingCanvas);\r\n texture.width = potWidth;\r\n texture.height = potHeight;\r\n return false;\r\n }\r\n else {\r\n // Using shaders when possible to rescale because canvas.drawImage is lossy\r\n var source_1 = new InternalTexture(_this, InternalTextureSource.Temp);\r\n _this._bindTextureDirectly(gl.TEXTURE_2D, source_1, true);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, img);\r\n _this._rescaleTexture(source_1, texture, scene, internalFormat, function () {\r\n _this._releaseTexture(source_1);\r\n _this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\r\n continuationCallback();\r\n });\r\n }\r\n return true;\r\n }, samplingMode);\r\n };\r\n if (!fromData || isBase64) {\r\n if (buffer && (buffer.decoding || buffer.close)) {\r\n onload(buffer);\r\n }\r\n else {\r\n FileTools.LoadImage(url, onload, onInternalError, scene ? scene.offlineProvider : null, mimeType);\r\n }\r\n }\r\n else if (typeof buffer === \"string\" || buffer instanceof ArrayBuffer || ArrayBuffer.isView(buffer) || buffer instanceof Blob) {\r\n FileTools.LoadImage(buffer, onload, onInternalError, scene ? scene.offlineProvider : null, mimeType);\r\n }\r\n else if (buffer) {\r\n onload(buffer);\r\n }\r\n }\r\n return texture;\r\n };\r\n /**\r\n * @hidden\r\n */\r\n ThinEngine.prototype._rescaleTexture = function (source, destination, scene, internalFormat, onComplete) {\r\n };\r\n /**\r\n * Creates a raw texture\r\n * @param data defines the data to store in the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param format defines the format of the data\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @returns the raw texture inside an InternalTexture\r\n */\r\n ThinEngine.prototype.createRawTexture = function (data, width, height, format, generateMipMaps, invertY, samplingMode, compression, type) {\r\n if (compression === void 0) { compression = null; }\r\n if (type === void 0) { type = 0; }\r\n throw _DevTools.WarnImport(\"Engine.RawTexture\");\r\n };\r\n /**\r\n * Creates a new raw cube texture\r\n * @param data defines the array of data to use to create each face\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compression used (null by default)\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n ThinEngine.prototype.createRawCubeTexture = function (data, size, format, type, generateMipMaps, invertY, samplingMode, compression) {\r\n if (compression === void 0) { compression = null; }\r\n throw _DevTools.WarnImport(\"Engine.RawTexture\");\r\n };\r\n /**\r\n * Creates a new raw 3D texture\r\n * @param data defines the data used to create the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param depth defines the depth of the texture\r\n * @param format defines the format of the texture\r\n * @param generateMipMaps defines if the engine must generate mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compressed used (can be null)\r\n * @param textureType defines the compressed used (can be null)\r\n * @returns a new raw 3D texture (stored in an InternalTexture)\r\n */\r\n ThinEngine.prototype.createRawTexture3D = function (data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression, textureType) {\r\n if (compression === void 0) { compression = null; }\r\n if (textureType === void 0) { textureType = 0; }\r\n throw _DevTools.WarnImport(\"Engine.RawTexture\");\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._unpackFlipY = function (value) {\r\n if (this._unpackFlipYCached !== value) {\r\n this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL, value ? 1 : 0);\r\n if (this.enableUnpackFlipYCached) {\r\n this._unpackFlipYCached = value;\r\n }\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getUnpackAlignement = function () {\r\n return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT);\r\n };\r\n /**\r\n * Update the sampling mode of a given texture\r\n * @param samplingMode defines the required sampling mode\r\n * @param texture defines the texture to update\r\n */\r\n ThinEngine.prototype.updateTextureSamplingMode = function (samplingMode, texture) {\r\n var filters = this._getSamplingParameters(samplingMode, texture.generateMipMaps);\r\n if (texture.isCube) {\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_MIN_FILTER, filters.min);\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\r\n }\r\n else if (texture.is3D) {\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_MIN_FILTER, filters.min);\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\r\n }\r\n else {\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, filters.mag, texture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, filters.min);\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\r\n }\r\n texture.samplingMode = samplingMode;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._setupDepthStencilTexture = function (internalTexture, size, generateStencil, bilinearFiltering, comparisonFunction) {\r\n var width = size.width || size;\r\n var height = size.height || size;\r\n internalTexture.baseWidth = width;\r\n internalTexture.baseHeight = height;\r\n internalTexture.width = width;\r\n internalTexture.height = height;\r\n internalTexture.isReady = true;\r\n internalTexture.samples = 1;\r\n internalTexture.generateMipMaps = false;\r\n internalTexture._generateDepthBuffer = true;\r\n internalTexture._generateStencilBuffer = generateStencil;\r\n internalTexture.samplingMode = bilinearFiltering ? 2 : 1;\r\n internalTexture.type = 0;\r\n internalTexture._comparisonFunction = comparisonFunction;\r\n var gl = this._gl;\r\n var target = internalTexture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\r\n var samplingParameters = this._getSamplingParameters(internalTexture.samplingMode, false);\r\n gl.texParameteri(target, gl.TEXTURE_MAG_FILTER, samplingParameters.mag);\r\n gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, samplingParameters.min);\r\n gl.texParameteri(target, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(target, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (comparisonFunction === 0) {\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_FUNC, 515);\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_MODE, gl.NONE);\r\n }\r\n else {\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_FUNC, comparisonFunction);\r\n gl.texParameteri(target, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._uploadCompressedDataToTextureDirectly = function (texture, internalFormat, width, height, data, faceIndex, lod) {\r\n if (faceIndex === void 0) { faceIndex = 0; }\r\n if (lod === void 0) { lod = 0; }\r\n var gl = this._gl;\r\n var target = gl.TEXTURE_2D;\r\n if (texture.isCube) {\r\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\r\n }\r\n this._gl.compressedTexImage2D(target, lod, internalFormat, width, height, 0, data);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._uploadDataToTextureDirectly = function (texture, imageData, faceIndex, lod, babylonInternalFormat, useTextureWidthAndHeight) {\r\n if (faceIndex === void 0) { faceIndex = 0; }\r\n if (lod === void 0) { lod = 0; }\r\n if (useTextureWidthAndHeight === void 0) { useTextureWidthAndHeight = false; }\r\n var gl = this._gl;\r\n var textureType = this._getWebGLTextureType(texture.type);\r\n var format = this._getInternalFormat(texture.format);\r\n var internalFormat = babylonInternalFormat === undefined ? this._getRGBABufferInternalSizedFormat(texture.type, format) : this._getInternalFormat(babylonInternalFormat);\r\n this._unpackFlipY(texture.invertY);\r\n var target = gl.TEXTURE_2D;\r\n if (texture.isCube) {\r\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\r\n }\r\n var lodMaxWidth = Math.round(Math.log(texture.width) * Math.LOG2E);\r\n var lodMaxHeight = Math.round(Math.log(texture.height) * Math.LOG2E);\r\n var width = useTextureWidthAndHeight ? texture.width : Math.pow(2, Math.max(lodMaxWidth - lod, 0));\r\n var height = useTextureWidthAndHeight ? texture.height : Math.pow(2, Math.max(lodMaxHeight - lod, 0));\r\n gl.texImage2D(target, lod, internalFormat, width, height, 0, format, textureType, imageData);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._uploadArrayBufferViewToTexture = function (texture, imageData, faceIndex, lod) {\r\n if (faceIndex === void 0) { faceIndex = 0; }\r\n if (lod === void 0) { lod = 0; }\r\n var gl = this._gl;\r\n var bindTarget = texture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\r\n this._bindTextureDirectly(bindTarget, texture, true);\r\n this._uploadDataToTextureDirectly(texture, imageData, faceIndex, lod);\r\n this._bindTextureDirectly(bindTarget, null, true);\r\n };\r\n ThinEngine.prototype._prepareWebGLTextureContinuation = function (texture, scene, noMipmap, isCompressed, samplingMode) {\r\n var gl = this._gl;\r\n if (!gl) {\r\n return;\r\n }\r\n var filters = this._getSamplingParameters(samplingMode, !noMipmap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filters.mag);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filters.min);\r\n if (!noMipmap && !isCompressed) {\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n }\r\n this._bindTextureDirectly(gl.TEXTURE_2D, null);\r\n // this.resetTextureCache();\r\n if (scene) {\r\n scene._removePendingData(texture);\r\n }\r\n texture.onLoadedObservable.notifyObservers(texture);\r\n texture.onLoadedObservable.clear();\r\n };\r\n ThinEngine.prototype._prepareWebGLTexture = function (texture, scene, width, height, invertY, noMipmap, isCompressed, processFunction, samplingMode) {\r\n var _this = this;\r\n if (samplingMode === void 0) { samplingMode = 3; }\r\n var maxTextureSize = this.getCaps().maxTextureSize;\r\n var potWidth = Math.min(maxTextureSize, this.needPOTTextures ? ThinEngine.GetExponentOfTwo(width, maxTextureSize) : width);\r\n var potHeight = Math.min(maxTextureSize, this.needPOTTextures ? ThinEngine.GetExponentOfTwo(height, maxTextureSize) : height);\r\n var gl = this._gl;\r\n if (!gl) {\r\n return;\r\n }\r\n if (!texture._webGLTexture) {\r\n // this.resetTextureCache();\r\n if (scene) {\r\n scene._removePendingData(texture);\r\n }\r\n return;\r\n }\r\n this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);\r\n this._unpackFlipY(invertY === undefined ? true : (invertY ? true : false));\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.width = potWidth;\r\n texture.height = potHeight;\r\n texture.isReady = true;\r\n if (processFunction(potWidth, potHeight, function () {\r\n _this._prepareWebGLTextureContinuation(texture, scene, noMipmap, isCompressed, samplingMode);\r\n })) {\r\n // Returning as texture needs extra async steps\r\n return;\r\n }\r\n this._prepareWebGLTextureContinuation(texture, scene, noMipmap, isCompressed, samplingMode);\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._setupFramebufferDepthAttachments = function (generateStencilBuffer, generateDepthBuffer, width, height, samples) {\r\n if (samples === void 0) { samples = 1; }\r\n var depthStencilBuffer = null;\r\n var gl = this._gl;\r\n // Create the depth/stencil buffer\r\n if (generateStencilBuffer) {\r\n depthStencilBuffer = gl.createRenderbuffer();\r\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);\r\n if (samples > 1) {\r\n gl.renderbufferStorageMultisample(gl.RENDERBUFFER, samples, gl.DEPTH24_STENCIL8, width, height);\r\n }\r\n else {\r\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height);\r\n }\r\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, depthStencilBuffer);\r\n }\r\n else if (generateDepthBuffer) {\r\n depthStencilBuffer = gl.createRenderbuffer();\r\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);\r\n if (samples > 1) {\r\n gl.renderbufferStorageMultisample(gl.RENDERBUFFER, samples, gl.DEPTH_COMPONENT16, width, height);\r\n }\r\n else {\r\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, width, height);\r\n }\r\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthStencilBuffer);\r\n }\r\n return depthStencilBuffer;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._releaseFramebufferObjects = function (texture) {\r\n var gl = this._gl;\r\n if (texture._framebuffer) {\r\n gl.deleteFramebuffer(texture._framebuffer);\r\n texture._framebuffer = null;\r\n }\r\n if (texture._depthStencilBuffer) {\r\n gl.deleteRenderbuffer(texture._depthStencilBuffer);\r\n texture._depthStencilBuffer = null;\r\n }\r\n if (texture._MSAAFramebuffer) {\r\n gl.deleteFramebuffer(texture._MSAAFramebuffer);\r\n texture._MSAAFramebuffer = null;\r\n }\r\n if (texture._MSAARenderBuffer) {\r\n gl.deleteRenderbuffer(texture._MSAARenderBuffer);\r\n texture._MSAARenderBuffer = null;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._releaseTexture = function (texture) {\r\n this._releaseFramebufferObjects(texture);\r\n this._deleteTexture(texture._webGLTexture);\r\n // Unbind channels\r\n this.unbindAllTextures();\r\n var index = this._internalTexturesCache.indexOf(texture);\r\n if (index !== -1) {\r\n this._internalTexturesCache.splice(index, 1);\r\n }\r\n // Integrated fixed lod samplers.\r\n if (texture._lodTextureHigh) {\r\n texture._lodTextureHigh.dispose();\r\n }\r\n if (texture._lodTextureMid) {\r\n texture._lodTextureMid.dispose();\r\n }\r\n if (texture._lodTextureLow) {\r\n texture._lodTextureLow.dispose();\r\n }\r\n // Integrated irradiance map.\r\n if (texture._irradianceTexture) {\r\n texture._irradianceTexture.dispose();\r\n }\r\n };\r\n ThinEngine.prototype._deleteTexture = function (texture) {\r\n this._gl.deleteTexture(texture);\r\n };\r\n ThinEngine.prototype._setProgram = function (program) {\r\n if (this._currentProgram !== program) {\r\n this._gl.useProgram(program);\r\n this._currentProgram = program;\r\n }\r\n };\r\n /**\r\n * Binds an effect to the webGL context\r\n * @param effect defines the effect to bind\r\n */\r\n ThinEngine.prototype.bindSamplers = function (effect) {\r\n var webGLPipelineContext = effect.getPipelineContext();\r\n this._setProgram(webGLPipelineContext.program);\r\n var samplers = effect.getSamplers();\r\n for (var index = 0; index < samplers.length; index++) {\r\n var uniform = effect.getUniform(samplers[index]);\r\n if (uniform) {\r\n this._boundUniforms[index] = uniform;\r\n }\r\n }\r\n this._currentEffect = null;\r\n };\r\n ThinEngine.prototype._activateCurrentTexture = function () {\r\n if (this._currentTextureChannel !== this._activeChannel) {\r\n this._gl.activeTexture(this._gl.TEXTURE0 + this._activeChannel);\r\n this._currentTextureChannel = this._activeChannel;\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._bindTextureDirectly = function (target, texture, forTextureDataUpdate, force) {\r\n if (forTextureDataUpdate === void 0) { forTextureDataUpdate = false; }\r\n if (force === void 0) { force = false; }\r\n var wasPreviouslyBound = false;\r\n var isTextureForRendering = texture && texture._associatedChannel > -1;\r\n if (forTextureDataUpdate && isTextureForRendering) {\r\n this._activeChannel = texture._associatedChannel;\r\n }\r\n var currentTextureBound = this._boundTexturesCache[this._activeChannel];\r\n if (currentTextureBound !== texture || force) {\r\n this._activateCurrentTexture();\r\n if (texture && texture.isMultiview) {\r\n this._gl.bindTexture(target, texture ? texture._colorTextureArray : null);\r\n }\r\n else {\r\n this._gl.bindTexture(target, texture ? texture._webGLTexture : null);\r\n }\r\n this._boundTexturesCache[this._activeChannel] = texture;\r\n if (texture) {\r\n texture._associatedChannel = this._activeChannel;\r\n }\r\n }\r\n else if (forTextureDataUpdate) {\r\n wasPreviouslyBound = true;\r\n this._activateCurrentTexture();\r\n }\r\n if (isTextureForRendering && !forTextureDataUpdate) {\r\n this._bindSamplerUniformToChannel(texture._associatedChannel, this._activeChannel);\r\n }\r\n return wasPreviouslyBound;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._bindTexture = function (channel, texture) {\r\n if (channel === undefined) {\r\n return;\r\n }\r\n if (texture) {\r\n texture._associatedChannel = channel;\r\n }\r\n this._activeChannel = channel;\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture);\r\n };\r\n /**\r\n * Unbind all textures from the webGL context\r\n */\r\n ThinEngine.prototype.unbindAllTextures = function () {\r\n for (var channel = 0; channel < this._maxSimultaneousTextures; channel++) {\r\n this._activeChannel = channel;\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\r\n if (this.webGLVersion > 1) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets a texture to the according uniform.\r\n * @param channel The texture channel\r\n * @param uniform The uniform to set\r\n * @param texture The texture to apply\r\n */\r\n ThinEngine.prototype.setTexture = function (channel, uniform, texture) {\r\n if (channel === undefined) {\r\n return;\r\n }\r\n if (uniform) {\r\n this._boundUniforms[channel] = uniform;\r\n }\r\n this._setTexture(channel, texture);\r\n };\r\n ThinEngine.prototype._bindSamplerUniformToChannel = function (sourceSlot, destination) {\r\n var uniform = this._boundUniforms[sourceSlot];\r\n if (!uniform || uniform._currentState === destination) {\r\n return;\r\n }\r\n this._gl.uniform1i(uniform, destination);\r\n uniform._currentState = destination;\r\n };\r\n ThinEngine.prototype._getTextureWrapMode = function (mode) {\r\n switch (mode) {\r\n case 1:\r\n return this._gl.REPEAT;\r\n case 0:\r\n return this._gl.CLAMP_TO_EDGE;\r\n case 2:\r\n return this._gl.MIRRORED_REPEAT;\r\n }\r\n return this._gl.REPEAT;\r\n };\r\n ThinEngine.prototype._setTexture = function (channel, texture, isPartOfTextureArray, depthStencilTexture) {\r\n if (isPartOfTextureArray === void 0) { isPartOfTextureArray = false; }\r\n if (depthStencilTexture === void 0) { depthStencilTexture = false; }\r\n // Not ready?\r\n if (!texture) {\r\n if (this._boundTexturesCache[channel] != null) {\r\n this._activeChannel = channel;\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\r\n if (this.webGLVersion > 1) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, null);\r\n }\r\n }\r\n return false;\r\n }\r\n // Video\r\n if (texture.video) {\r\n this._activeChannel = channel;\r\n texture.update();\r\n }\r\n else if (texture.delayLoadState === 4) { // Delay loading\r\n texture.delayLoad();\r\n return false;\r\n }\r\n var internalTexture;\r\n if (depthStencilTexture) {\r\n internalTexture = texture.depthStencilTexture;\r\n }\r\n else if (texture.isReady()) {\r\n internalTexture = texture.getInternalTexture();\r\n }\r\n else if (texture.isCube) {\r\n internalTexture = this.emptyCubeTexture;\r\n }\r\n else if (texture.is3D) {\r\n internalTexture = this.emptyTexture3D;\r\n }\r\n else {\r\n internalTexture = this.emptyTexture;\r\n }\r\n if (!isPartOfTextureArray && internalTexture) {\r\n internalTexture._associatedChannel = channel;\r\n }\r\n var needToBind = true;\r\n if (this._boundTexturesCache[channel] === internalTexture) {\r\n if (!isPartOfTextureArray) {\r\n this._bindSamplerUniformToChannel(internalTexture._associatedChannel, channel);\r\n }\r\n needToBind = false;\r\n }\r\n this._activeChannel = channel;\r\n if (internalTexture && internalTexture.isMultiview) {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY, internalTexture, isPartOfTextureArray);\r\n }\r\n }\r\n else if (internalTexture && internalTexture.is3D) {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_3D, internalTexture, isPartOfTextureArray);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapU !== texture.wrapU) {\r\n internalTexture._cachedWrapU = texture.wrapU;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_WRAP_S, this._getTextureWrapMode(texture.wrapU), internalTexture);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapV !== texture.wrapV) {\r\n internalTexture._cachedWrapV = texture.wrapV;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_WRAP_T, this._getTextureWrapMode(texture.wrapV), internalTexture);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapR !== texture.wrapR) {\r\n internalTexture._cachedWrapR = texture.wrapR;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_3D, this._gl.TEXTURE_WRAP_R, this._getTextureWrapMode(texture.wrapR), internalTexture);\r\n }\r\n this._setAnisotropicLevel(this._gl.TEXTURE_3D, texture);\r\n }\r\n else if (internalTexture && internalTexture.isCube) {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, internalTexture, isPartOfTextureArray);\r\n }\r\n if (internalTexture._cachedCoordinatesMode !== texture.coordinatesMode) {\r\n internalTexture._cachedCoordinatesMode = texture.coordinatesMode;\r\n // CUBIC_MODE and SKYBOX_MODE both require CLAMP_TO_EDGE. All other modes use REPEAT.\r\n var textureWrapMode = (texture.coordinatesMode !== 3 && texture.coordinatesMode !== 5) ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_S, textureWrapMode, internalTexture);\r\n this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_T, textureWrapMode);\r\n }\r\n this._setAnisotropicLevel(this._gl.TEXTURE_CUBE_MAP, texture);\r\n }\r\n else {\r\n if (needToBind) {\r\n this._bindTextureDirectly(this._gl.TEXTURE_2D, internalTexture, isPartOfTextureArray);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapU !== texture.wrapU) {\r\n internalTexture._cachedWrapU = texture.wrapU;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_S, this._getTextureWrapMode(texture.wrapU), internalTexture);\r\n }\r\n if (internalTexture && internalTexture._cachedWrapV !== texture.wrapV) {\r\n internalTexture._cachedWrapV = texture.wrapV;\r\n this._setTextureParameterInteger(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_T, this._getTextureWrapMode(texture.wrapV), internalTexture);\r\n }\r\n this._setAnisotropicLevel(this._gl.TEXTURE_2D, texture);\r\n }\r\n return true;\r\n };\r\n /**\r\n * Sets an array of texture to the webGL context\r\n * @param channel defines the channel where the texture array must be set\r\n * @param uniform defines the associated uniform location\r\n * @param textures defines the array of textures to bind\r\n */\r\n ThinEngine.prototype.setTextureArray = function (channel, uniform, textures) {\r\n if (channel === undefined || !uniform) {\r\n return;\r\n }\r\n if (!this._textureUnits || this._textureUnits.length !== textures.length) {\r\n this._textureUnits = new Int32Array(textures.length);\r\n }\r\n for (var i = 0; i < textures.length; i++) {\r\n var texture = textures[i].getInternalTexture();\r\n if (texture) {\r\n this._textureUnits[i] = channel + i;\r\n texture._associatedChannel = channel + i;\r\n }\r\n else {\r\n this._textureUnits[i] = -1;\r\n }\r\n }\r\n this._gl.uniform1iv(uniform, this._textureUnits);\r\n for (var index = 0; index < textures.length; index++) {\r\n this._setTexture(this._textureUnits[index], textures[index], true);\r\n }\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._setAnisotropicLevel = function (target, texture) {\r\n var internalTexture = texture.getInternalTexture();\r\n if (!internalTexture) {\r\n return;\r\n }\r\n var anisotropicFilterExtension = this._caps.textureAnisotropicFilterExtension;\r\n var value = texture.anisotropicFilteringLevel;\r\n if (internalTexture.samplingMode !== 2\r\n && internalTexture.samplingMode !== 3\r\n && internalTexture.samplingMode !== 11) {\r\n value = 1; // Forcing the anisotropic to 1 because else webgl will force filters to linear\r\n }\r\n if (anisotropicFilterExtension && internalTexture._cachedAnisotropicFilteringLevel !== value) {\r\n this._setTextureParameterFloat(target, anisotropicFilterExtension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(value, this._caps.maxAnisotropy), internalTexture);\r\n internalTexture._cachedAnisotropicFilteringLevel = value;\r\n }\r\n };\r\n ThinEngine.prototype._setTextureParameterFloat = function (target, parameter, value, texture) {\r\n this._bindTextureDirectly(target, texture, true, true);\r\n this._gl.texParameterf(target, parameter, value);\r\n };\r\n ThinEngine.prototype._setTextureParameterInteger = function (target, parameter, value, texture) {\r\n if (texture) {\r\n this._bindTextureDirectly(target, texture, true, true);\r\n }\r\n this._gl.texParameteri(target, parameter, value);\r\n };\r\n /**\r\n * Unbind all vertex attributes from the webGL context\r\n */\r\n ThinEngine.prototype.unbindAllAttributes = function () {\r\n if (this._mustWipeVertexAttributes) {\r\n this._mustWipeVertexAttributes = false;\r\n for (var i = 0; i < this._caps.maxVertexAttribs; i++) {\r\n this._gl.disableVertexAttribArray(i);\r\n this._vertexAttribArraysEnabled[i] = false;\r\n this._currentBufferPointers[i].active = false;\r\n }\r\n return;\r\n }\r\n for (var i = 0, ul = this._vertexAttribArraysEnabled.length; i < ul; i++) {\r\n if (i >= this._caps.maxVertexAttribs || !this._vertexAttribArraysEnabled[i]) {\r\n continue;\r\n }\r\n this._gl.disableVertexAttribArray(i);\r\n this._vertexAttribArraysEnabled[i] = false;\r\n this._currentBufferPointers[i].active = false;\r\n }\r\n };\r\n /**\r\n * Force the engine to release all cached effects. This means that next effect compilation will have to be done completely even if a similar effect was already compiled\r\n */\r\n ThinEngine.prototype.releaseEffects = function () {\r\n for (var name in this._compiledEffects) {\r\n var webGLPipelineContext = this._compiledEffects[name].getPipelineContext();\r\n this._deletePipelineContext(webGLPipelineContext);\r\n }\r\n this._compiledEffects = {};\r\n };\r\n /**\r\n * Dispose and release all associated resources\r\n */\r\n ThinEngine.prototype.dispose = function () {\r\n this.stopRenderLoop();\r\n // Clear observables\r\n if (this.onBeforeTextureInitObservable) {\r\n this.onBeforeTextureInitObservable.clear();\r\n }\r\n // Empty texture\r\n if (this._emptyTexture) {\r\n this._releaseTexture(this._emptyTexture);\r\n this._emptyTexture = null;\r\n }\r\n if (this._emptyCubeTexture) {\r\n this._releaseTexture(this._emptyCubeTexture);\r\n this._emptyCubeTexture = null;\r\n }\r\n // Release effects\r\n this.releaseEffects();\r\n // Unbind\r\n this.unbindAllAttributes();\r\n this._boundUniforms = [];\r\n // Events\r\n if (DomManagement.IsWindowObjectExist()) {\r\n if (this._renderingCanvas) {\r\n if (!this._doNotHandleContextLost) {\r\n this._renderingCanvas.removeEventListener(\"webglcontextlost\", this._onContextLost);\r\n this._renderingCanvas.removeEventListener(\"webglcontextrestored\", this._onContextRestored);\r\n }\r\n }\r\n }\r\n this._workingCanvas = null;\r\n this._workingContext = null;\r\n this._currentBufferPointers = [];\r\n this._renderingCanvas = null;\r\n this._currentProgram = null;\r\n this._bindedRenderFunction = null;\r\n Effect.ResetCache();\r\n // Abort active requests\r\n for (var _i = 0, _a = this._activeRequests; _i < _a.length; _i++) {\r\n var request = _a[_i];\r\n request.abort();\r\n }\r\n };\r\n /**\r\n * Attach a new callback raised when context lost event is fired\r\n * @param callback defines the callback to call\r\n */\r\n ThinEngine.prototype.attachContextLostEvent = function (callback) {\r\n if (this._renderingCanvas) {\r\n this._renderingCanvas.addEventListener(\"webglcontextlost\", callback, false);\r\n }\r\n };\r\n /**\r\n * Attach a new callback raised when context restored event is fired\r\n * @param callback defines the callback to call\r\n */\r\n ThinEngine.prototype.attachContextRestoredEvent = function (callback) {\r\n if (this._renderingCanvas) {\r\n this._renderingCanvas.addEventListener(\"webglcontextrestored\", callback, false);\r\n }\r\n };\r\n /**\r\n * Get the current error code of the webGL context\r\n * @returns the error code\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError\r\n */\r\n ThinEngine.prototype.getError = function () {\r\n return this._gl.getError();\r\n };\r\n ThinEngine.prototype._canRenderToFloatFramebuffer = function () {\r\n if (this._webGLVersion > 1) {\r\n return this._caps.colorBufferFloat;\r\n }\r\n return this._canRenderToFramebuffer(1);\r\n };\r\n ThinEngine.prototype._canRenderToHalfFloatFramebuffer = function () {\r\n if (this._webGLVersion > 1) {\r\n return this._caps.colorBufferFloat;\r\n }\r\n return this._canRenderToFramebuffer(2);\r\n };\r\n // Thank you : http://stackoverflow.com/questions/28827511/webgl-ios-render-to-floating-point-texture\r\n ThinEngine.prototype._canRenderToFramebuffer = function (type) {\r\n var gl = this._gl;\r\n //clear existing errors\r\n while (gl.getError() !== gl.NO_ERROR) { }\r\n var successful = true;\r\n var texture = gl.createTexture();\r\n gl.bindTexture(gl.TEXTURE_2D, texture);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, this._getRGBABufferInternalSizedFormat(type), 1, 1, 0, gl.RGBA, this._getWebGLTextureType(type), null);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\r\n var fb = gl.createFramebuffer();\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, fb);\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\r\n var status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\r\n successful = successful && (status === gl.FRAMEBUFFER_COMPLETE);\r\n successful = successful && (gl.getError() === gl.NO_ERROR);\r\n //try render by clearing frame buffer's color buffer\r\n if (successful) {\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n successful = successful && (gl.getError() === gl.NO_ERROR);\r\n }\r\n //try reading from frame to ensure render occurs (just creating the FBO is not sufficient to determine if rendering is supported)\r\n if (successful) {\r\n //in practice it's sufficient to just read from the backbuffer rather than handle potentially issues reading from the texture\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n var readFormat = gl.RGBA;\r\n var readType = gl.UNSIGNED_BYTE;\r\n var buffer = new Uint8Array(4);\r\n gl.readPixels(0, 0, 1, 1, readFormat, readType, buffer);\r\n successful = successful && (gl.getError() === gl.NO_ERROR);\r\n }\r\n //clean up\r\n gl.deleteTexture(texture);\r\n gl.deleteFramebuffer(fb);\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n //clear accumulated errors\r\n while (!successful && (gl.getError() !== gl.NO_ERROR)) { }\r\n return successful;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getWebGLTextureType = function (type) {\r\n if (this._webGLVersion === 1) {\r\n switch (type) {\r\n case 1:\r\n return this._gl.FLOAT;\r\n case 2:\r\n return this._gl.HALF_FLOAT_OES;\r\n case 0:\r\n return this._gl.UNSIGNED_BYTE;\r\n case 8:\r\n return this._gl.UNSIGNED_SHORT_4_4_4_4;\r\n case 9:\r\n return this._gl.UNSIGNED_SHORT_5_5_5_1;\r\n case 10:\r\n return this._gl.UNSIGNED_SHORT_5_6_5;\r\n }\r\n return this._gl.UNSIGNED_BYTE;\r\n }\r\n switch (type) {\r\n case 3:\r\n return this._gl.BYTE;\r\n case 0:\r\n return this._gl.UNSIGNED_BYTE;\r\n case 4:\r\n return this._gl.SHORT;\r\n case 5:\r\n return this._gl.UNSIGNED_SHORT;\r\n case 6:\r\n return this._gl.INT;\r\n case 7: // Refers to UNSIGNED_INT\r\n return this._gl.UNSIGNED_INT;\r\n case 1:\r\n return this._gl.FLOAT;\r\n case 2:\r\n return this._gl.HALF_FLOAT;\r\n case 8:\r\n return this._gl.UNSIGNED_SHORT_4_4_4_4;\r\n case 9:\r\n return this._gl.UNSIGNED_SHORT_5_5_5_1;\r\n case 10:\r\n return this._gl.UNSIGNED_SHORT_5_6_5;\r\n case 11:\r\n return this._gl.UNSIGNED_INT_2_10_10_10_REV;\r\n case 12:\r\n return this._gl.UNSIGNED_INT_24_8;\r\n case 13:\r\n return this._gl.UNSIGNED_INT_10F_11F_11F_REV;\r\n case 14:\r\n return this._gl.UNSIGNED_INT_5_9_9_9_REV;\r\n case 15:\r\n return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV;\r\n }\r\n return this._gl.UNSIGNED_BYTE;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getInternalFormat = function (format) {\r\n var internalFormat = this._gl.RGBA;\r\n switch (format) {\r\n case 0:\r\n internalFormat = this._gl.ALPHA;\r\n break;\r\n case 1:\r\n internalFormat = this._gl.LUMINANCE;\r\n break;\r\n case 2:\r\n internalFormat = this._gl.LUMINANCE_ALPHA;\r\n break;\r\n case 6:\r\n internalFormat = this._gl.RED;\r\n break;\r\n case 7:\r\n internalFormat = this._gl.RG;\r\n break;\r\n case 4:\r\n internalFormat = this._gl.RGB;\r\n break;\r\n case 5:\r\n internalFormat = this._gl.RGBA;\r\n break;\r\n }\r\n if (this._webGLVersion > 1) {\r\n switch (format) {\r\n case 8:\r\n internalFormat = this._gl.RED_INTEGER;\r\n break;\r\n case 9:\r\n internalFormat = this._gl.RG_INTEGER;\r\n break;\r\n case 10:\r\n internalFormat = this._gl.RGB_INTEGER;\r\n break;\r\n case 11:\r\n internalFormat = this._gl.RGBA_INTEGER;\r\n break;\r\n }\r\n }\r\n return internalFormat;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getRGBABufferInternalSizedFormat = function (type, format) {\r\n if (this._webGLVersion === 1) {\r\n if (format !== undefined) {\r\n switch (format) {\r\n case 0:\r\n return this._gl.ALPHA;\r\n case 1:\r\n return this._gl.LUMINANCE;\r\n case 2:\r\n return this._gl.LUMINANCE_ALPHA;\r\n }\r\n }\r\n return this._gl.RGBA;\r\n }\r\n switch (type) {\r\n case 3:\r\n switch (format) {\r\n case 6:\r\n return this._gl.R8_SNORM;\r\n case 7:\r\n return this._gl.RG8_SNORM;\r\n case 4:\r\n return this._gl.RGB8_SNORM;\r\n case 8:\r\n return this._gl.R8I;\r\n case 9:\r\n return this._gl.RG8I;\r\n case 10:\r\n return this._gl.RGB8I;\r\n case 11:\r\n return this._gl.RGBA8I;\r\n default:\r\n return this._gl.RGBA8_SNORM;\r\n }\r\n case 0:\r\n switch (format) {\r\n case 6:\r\n return this._gl.R8;\r\n case 7:\r\n return this._gl.RG8;\r\n case 4:\r\n return this._gl.RGB8; // By default. Other possibilities are RGB565, SRGB8.\r\n case 5:\r\n return this._gl.RGBA8; // By default. Other possibilities are RGB5_A1, RGBA4, SRGB8_ALPHA8.\r\n case 8:\r\n return this._gl.R8UI;\r\n case 9:\r\n return this._gl.RG8UI;\r\n case 10:\r\n return this._gl.RGB8UI;\r\n case 11:\r\n return this._gl.RGBA8UI;\r\n case 0:\r\n return this._gl.ALPHA;\r\n case 1:\r\n return this._gl.LUMINANCE;\r\n case 2:\r\n return this._gl.LUMINANCE_ALPHA;\r\n default:\r\n return this._gl.RGBA8;\r\n }\r\n case 4:\r\n switch (format) {\r\n case 8:\r\n return this._gl.R16I;\r\n case 9:\r\n return this._gl.RG16I;\r\n case 10:\r\n return this._gl.RGB16I;\r\n case 11:\r\n return this._gl.RGBA16I;\r\n default:\r\n return this._gl.RGBA16I;\r\n }\r\n case 5:\r\n switch (format) {\r\n case 8:\r\n return this._gl.R16UI;\r\n case 9:\r\n return this._gl.RG16UI;\r\n case 10:\r\n return this._gl.RGB16UI;\r\n case 11:\r\n return this._gl.RGBA16UI;\r\n default:\r\n return this._gl.RGBA16UI;\r\n }\r\n case 6:\r\n switch (format) {\r\n case 8:\r\n return this._gl.R32I;\r\n case 9:\r\n return this._gl.RG32I;\r\n case 10:\r\n return this._gl.RGB32I;\r\n case 11:\r\n return this._gl.RGBA32I;\r\n default:\r\n return this._gl.RGBA32I;\r\n }\r\n case 7: // Refers to UNSIGNED_INT\r\n switch (format) {\r\n case 8:\r\n return this._gl.R32UI;\r\n case 9:\r\n return this._gl.RG32UI;\r\n case 10:\r\n return this._gl.RGB32UI;\r\n case 11:\r\n return this._gl.RGBA32UI;\r\n default:\r\n return this._gl.RGBA32UI;\r\n }\r\n case 1:\r\n switch (format) {\r\n case 6:\r\n return this._gl.R32F; // By default. Other possibility is R16F.\r\n case 7:\r\n return this._gl.RG32F; // By default. Other possibility is RG16F.\r\n case 4:\r\n return this._gl.RGB32F; // By default. Other possibilities are RGB16F, R11F_G11F_B10F, RGB9_E5.\r\n case 5:\r\n return this._gl.RGBA32F; // By default. Other possibility is RGBA16F.\r\n default:\r\n return this._gl.RGBA32F;\r\n }\r\n case 2:\r\n switch (format) {\r\n case 6:\r\n return this._gl.R16F;\r\n case 7:\r\n return this._gl.RG16F;\r\n case 4:\r\n return this._gl.RGB16F; // By default. Other possibilities are R11F_G11F_B10F, RGB9_E5.\r\n case 5:\r\n return this._gl.RGBA16F;\r\n default:\r\n return this._gl.RGBA16F;\r\n }\r\n case 10:\r\n return this._gl.RGB565;\r\n case 13:\r\n return this._gl.R11F_G11F_B10F;\r\n case 14:\r\n return this._gl.RGB9_E5;\r\n case 8:\r\n return this._gl.RGBA4;\r\n case 9:\r\n return this._gl.RGB5_A1;\r\n case 11:\r\n switch (format) {\r\n case 5:\r\n return this._gl.RGB10_A2; // By default. Other possibility is RGB5_A1.\r\n case 11:\r\n return this._gl.RGB10_A2UI;\r\n default:\r\n return this._gl.RGB10_A2;\r\n }\r\n }\r\n return this._gl.RGBA8;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._getRGBAMultiSampleBufferFormat = function (type) {\r\n if (type === 1) {\r\n return this._gl.RGBA32F;\r\n }\r\n else if (type === 2) {\r\n return this._gl.RGBA16F;\r\n }\r\n return this._gl.RGBA8;\r\n };\r\n /** @hidden */\r\n ThinEngine.prototype._loadFile = function (url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError) {\r\n var _this = this;\r\n var request = FileTools.LoadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError);\r\n this._activeRequests.push(request);\r\n request.onCompleteObservable.add(function (request) {\r\n _this._activeRequests.splice(_this._activeRequests.indexOf(request), 1);\r\n });\r\n return request;\r\n };\r\n // Statics\r\n /**\r\n * Gets a boolean indicating if the engine can be instanciated (ie. if a webGL context can be found)\r\n * @returns true if the engine can be created\r\n * @ignorenaming\r\n */\r\n ThinEngine.isSupported = function () {\r\n try {\r\n var tempcanvas = CanvasGenerator.CreateCanvas(1, 1);\r\n var gl = tempcanvas.getContext(\"webgl\") || tempcanvas.getContext(\"experimental-webgl\");\r\n return gl != null && !!window.WebGLRenderingContext;\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Find the next highest power of two.\r\n * @param x Number to start search from.\r\n * @return Next highest power of two.\r\n */\r\n ThinEngine.CeilingPOT = function (x) {\r\n x--;\r\n x |= x >> 1;\r\n x |= x >> 2;\r\n x |= x >> 4;\r\n x |= x >> 8;\r\n x |= x >> 16;\r\n x++;\r\n return x;\r\n };\r\n /**\r\n * Find the next lowest power of two.\r\n * @param x Number to start search from.\r\n * @return Next lowest power of two.\r\n */\r\n ThinEngine.FloorPOT = function (x) {\r\n x = x | (x >> 1);\r\n x = x | (x >> 2);\r\n x = x | (x >> 4);\r\n x = x | (x >> 8);\r\n x = x | (x >> 16);\r\n return x - (x >> 1);\r\n };\r\n /**\r\n * Find the nearest power of two.\r\n * @param x Number to start search from.\r\n * @return Next nearest power of two.\r\n */\r\n ThinEngine.NearestPOT = function (x) {\r\n var c = ThinEngine.CeilingPOT(x);\r\n var f = ThinEngine.FloorPOT(x);\r\n return (c - x) > (x - f) ? f : c;\r\n };\r\n /**\r\n * Get the closest exponent of two\r\n * @param value defines the value to approximate\r\n * @param max defines the maximum value to return\r\n * @param mode defines how to define the closest value\r\n * @returns closest exponent of two of the given value\r\n */\r\n ThinEngine.GetExponentOfTwo = function (value, max, mode) {\r\n if (mode === void 0) { mode = 2; }\r\n var pot;\r\n switch (mode) {\r\n case 1:\r\n pot = ThinEngine.FloorPOT(value);\r\n break;\r\n case 2:\r\n pot = ThinEngine.NearestPOT(value);\r\n break;\r\n case 3:\r\n default:\r\n pot = ThinEngine.CeilingPOT(value);\r\n break;\r\n }\r\n return Math.min(pot, max);\r\n };\r\n /**\r\n * Queue a new function into the requested animation frame pool (ie. this function will be executed byt the browser for the next frame)\r\n * @param func - the function to be called\r\n * @param requester - the object that will request the next frame. Falls back to window.\r\n * @returns frame number\r\n */\r\n ThinEngine.QueueNewFrame = function (func, requester) {\r\n if (!DomManagement.IsWindowObjectExist()) {\r\n if (typeof requestAnimationFrame !== \"undefined\") {\r\n return requestAnimationFrame(func);\r\n }\r\n return setTimeout(func, 16);\r\n }\r\n if (!requester) {\r\n requester = window;\r\n }\r\n if (requester.requestAnimationFrame) {\r\n return requester.requestAnimationFrame(func);\r\n }\r\n else if (requester.msRequestAnimationFrame) {\r\n return requester.msRequestAnimationFrame(func);\r\n }\r\n else if (requester.webkitRequestAnimationFrame) {\r\n return requester.webkitRequestAnimationFrame(func);\r\n }\r\n else if (requester.mozRequestAnimationFrame) {\r\n return requester.mozRequestAnimationFrame(func);\r\n }\r\n else if (requester.oRequestAnimationFrame) {\r\n return requester.oRequestAnimationFrame(func);\r\n }\r\n else {\r\n return window.setTimeout(func, 16);\r\n }\r\n };\r\n /** Use this array to turn off some WebGL2 features on known buggy browsers version */\r\n ThinEngine.ExceptionList = [\r\n { key: \"Chrome\\/63\\.0\", capture: \"63\\\\.0\\\\.3239\\\\.(\\\\d+)\", captureConstraint: 108, targets: [\"uniformBuffer\"] },\r\n { key: \"Firefox\\/58\", capture: null, captureConstraint: null, targets: [\"uniformBuffer\"] },\r\n { key: \"Firefox\\/59\", capture: null, captureConstraint: null, targets: [\"uniformBuffer\"] },\r\n { key: \"Chrome\\/72.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Chrome\\/73.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Chrome\\/74.+?Mobile\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Mac OS.+Chrome\\/71\", capture: null, captureConstraint: null, targets: [\"vao\"] },\r\n { key: \"Mac OS.+Chrome\\/72\", capture: null, captureConstraint: null, targets: [\"vao\"] }\r\n ];\r\n /** @hidden */\r\n ThinEngine._TextureLoaders = [];\r\n // Updatable statics so stick with vars here\r\n /**\r\n * Gets or sets the epsilon value used by collision engine\r\n */\r\n ThinEngine.CollisionsEpsilon = 0.001;\r\n return ThinEngine;\r\n}());\r\nexport { ThinEngine };\r\n//# sourceMappingURL=thinEngine.js.map"
  5138. },
  5139. {
  5140. "id": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5141. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  5142. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5143. "index": 28,
  5144. "index2": 27,
  5145. "size": 17052,
  5146. "cacheable": true,
  5147. "built": true,
  5148. "optional": false,
  5149. "prefetched": false,
  5150. "chunks": [
  5151. "thinEngineOnly"
  5152. ],
  5153. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5154. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5155. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5156. "issuerPath": [
  5157. {
  5158. "id": "./thinEngineOnly.ts",
  5159. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5160. "name": "./thinEngineOnly.ts",
  5161. "profile": {
  5162. "factory": 25,
  5163. "building": 1793
  5164. }
  5165. },
  5166. {
  5167. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5168. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5169. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5170. "profile": {
  5171. "factory": 10,
  5172. "building": 63
  5173. }
  5174. }
  5175. ],
  5176. "profile": {
  5177. "factory": 6,
  5178. "building": 38,
  5179. "dependencies": 28
  5180. },
  5181. "failed": false,
  5182. "errors": 0,
  5183. "warnings": 0,
  5184. "assets": [],
  5185. "reasons": [
  5186. {
  5187. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5188. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5189. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5190. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5191. "type": "harmony side effect evaluation",
  5192. "userRequest": "../Materials/Textures/internalTexture",
  5193. "loc": "8:0-95"
  5194. },
  5195. {
  5196. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5197. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5198. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5199. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5200. "type": "harmony import specifier",
  5201. "userRequest": "../Materials/Textures/internalTexture",
  5202. "loc": "2237:48-63"
  5203. },
  5204. {
  5205. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5206. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5207. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5208. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5209. "type": "harmony import specifier",
  5210. "userRequest": "../Materials/Textures/internalTexture",
  5211. "loc": "2237:70-91"
  5212. },
  5213. {
  5214. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5215. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5216. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5217. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5218. "type": "harmony import specifier",
  5219. "userRequest": "../Materials/Textures/internalTexture",
  5220. "loc": "2361:43-58"
  5221. },
  5222. {
  5223. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5224. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5225. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5226. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5227. "type": "harmony import specifier",
  5228. "userRequest": "../Materials/Textures/internalTexture",
  5229. "loc": "2361:66-87"
  5230. }
  5231. ],
  5232. "providedExports": [
  5233. "InternalTextureSource",
  5234. "InternalTexture"
  5235. ],
  5236. "optimizationBailout": [],
  5237. "depth": 2,
  5238. "source": "import { Observable } from \"../../Misc/observable\";\r\nimport { RenderTargetCreationOptions } from \"../../Materials/Textures/renderTargetCreationOptions\";\r\nimport { _DevTools } from '../../Misc/devTools';\r\n/**\r\n * Defines the source of the internal texture\r\n */\r\nexport var InternalTextureSource;\r\n(function (InternalTextureSource) {\r\n /**\r\n * The source of the texture data is unknown\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Unknown\"] = 0] = \"Unknown\";\r\n /**\r\n * Texture data comes from an URL\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Url\"] = 1] = \"Url\";\r\n /**\r\n * Texture data is only used for temporary storage\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Temp\"] = 2] = \"Temp\";\r\n /**\r\n * Texture data comes from raw data (ArrayBuffer)\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Raw\"] = 3] = \"Raw\";\r\n /**\r\n * Texture content is dynamic (video or dynamic texture)\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Dynamic\"] = 4] = \"Dynamic\";\r\n /**\r\n * Texture content is generated by rendering to it\r\n */\r\n InternalTextureSource[InternalTextureSource[\"RenderTarget\"] = 5] = \"RenderTarget\";\r\n /**\r\n * Texture content is part of a multi render target process\r\n */\r\n InternalTextureSource[InternalTextureSource[\"MultiRenderTarget\"] = 6] = \"MultiRenderTarget\";\r\n /**\r\n * Texture data comes from a cube data file\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Cube\"] = 7] = \"Cube\";\r\n /**\r\n * Texture data comes from a raw cube data\r\n */\r\n InternalTextureSource[InternalTextureSource[\"CubeRaw\"] = 8] = \"CubeRaw\";\r\n /**\r\n * Texture data come from a prefiltered cube data file\r\n */\r\n InternalTextureSource[InternalTextureSource[\"CubePrefiltered\"] = 9] = \"CubePrefiltered\";\r\n /**\r\n * Texture content is raw 3D data\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Raw3D\"] = 10] = \"Raw3D\";\r\n /**\r\n * Texture content is a depth texture\r\n */\r\n InternalTextureSource[InternalTextureSource[\"Depth\"] = 11] = \"Depth\";\r\n /**\r\n * Texture data comes from a raw cube data encoded with RGBD\r\n */\r\n InternalTextureSource[InternalTextureSource[\"CubeRawRGBD\"] = 12] = \"CubeRawRGBD\";\r\n})(InternalTextureSource || (InternalTextureSource = {}));\r\n/**\r\n * Class used to store data associated with WebGL texture data for the engine\r\n * This class should not be used directly\r\n */\r\nvar InternalTexture = /** @class */ (function () {\r\n /**\r\n * Creates a new InternalTexture\r\n * @param engine defines the engine to use\r\n * @param source defines the type of data that will be used\r\n * @param delayAllocation if the texture allocation should be delayed (default: false)\r\n */\r\n function InternalTexture(engine, source, delayAllocation) {\r\n if (delayAllocation === void 0) { delayAllocation = false; }\r\n /**\r\n * Defines if the texture is ready\r\n */\r\n this.isReady = false;\r\n /**\r\n * Defines if the texture is a cube texture\r\n */\r\n this.isCube = false;\r\n /**\r\n * Defines if the texture contains 3D data\r\n */\r\n this.is3D = false;\r\n /**\r\n * Defines if the texture contains multiview data\r\n */\r\n this.isMultiview = false;\r\n /**\r\n * Gets the URL used to load this texture\r\n */\r\n this.url = \"\";\r\n /**\r\n * Gets the sampling mode of the texture\r\n */\r\n this.samplingMode = -1;\r\n /**\r\n * Gets a boolean indicating if the texture needs mipmaps generation\r\n */\r\n this.generateMipMaps = false;\r\n /**\r\n * Gets the number of samples used by the texture (WebGL2+ only)\r\n */\r\n this.samples = 0;\r\n /**\r\n * Gets the type of the texture (int, float...)\r\n */\r\n this.type = -1;\r\n /**\r\n * Gets the format of the texture (RGB, RGBA...)\r\n */\r\n this.format = -1;\r\n /**\r\n * Observable called when the texture is loaded\r\n */\r\n this.onLoadedObservable = new Observable();\r\n /**\r\n * Gets the width of the texture\r\n */\r\n this.width = 0;\r\n /**\r\n * Gets the height of the texture\r\n */\r\n this.height = 0;\r\n /**\r\n * Gets the depth of the texture\r\n */\r\n this.depth = 0;\r\n /**\r\n * Gets the initial width of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n this.baseWidth = 0;\r\n /**\r\n * Gets the initial height of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n this.baseHeight = 0;\r\n /**\r\n * Gets the initial depth of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n this.baseDepth = 0;\r\n /**\r\n * Gets a boolean indicating if the texture is inverted on Y axis\r\n */\r\n this.invertY = false;\r\n // Private\r\n /** @hidden */\r\n this._invertVScale = false;\r\n /** @hidden */\r\n this._associatedChannel = -1;\r\n /** @hidden */\r\n this._source = InternalTextureSource.Unknown;\r\n /** @hidden */\r\n this._buffer = null;\r\n /** @hidden */\r\n this._bufferView = null;\r\n /** @hidden */\r\n this._bufferViewArray = null;\r\n /** @hidden */\r\n this._bufferViewArrayArray = null;\r\n /** @hidden */\r\n this._size = 0;\r\n /** @hidden */\r\n this._extension = \"\";\r\n /** @hidden */\r\n this._files = null;\r\n /** @hidden */\r\n this._workingCanvas = null;\r\n /** @hidden */\r\n this._workingContext = null;\r\n /** @hidden */\r\n this._framebuffer = null;\r\n /** @hidden */\r\n this._depthStencilBuffer = null;\r\n /** @hidden */\r\n this._MSAAFramebuffer = null;\r\n /** @hidden */\r\n this._MSAARenderBuffer = null;\r\n /** @hidden */\r\n this._attachments = null;\r\n /** @hidden */\r\n this._cachedCoordinatesMode = null;\r\n /** @hidden */\r\n this._cachedWrapU = null;\r\n /** @hidden */\r\n this._cachedWrapV = null;\r\n /** @hidden */\r\n this._cachedWrapR = null;\r\n /** @hidden */\r\n this._cachedAnisotropicFilteringLevel = null;\r\n /** @hidden */\r\n this._isDisabled = false;\r\n /** @hidden */\r\n this._compression = null;\r\n /** @hidden */\r\n this._generateStencilBuffer = false;\r\n /** @hidden */\r\n this._generateDepthBuffer = false;\r\n /** @hidden */\r\n this._comparisonFunction = 0;\r\n /** @hidden */\r\n this._sphericalPolynomial = null;\r\n /** @hidden */\r\n this._lodGenerationScale = 0;\r\n /** @hidden */\r\n this._lodGenerationOffset = 0;\r\n // Multiview\r\n /** @hidden */\r\n this._colorTextureArray = null;\r\n /** @hidden */\r\n this._depthStencilTextureArray = null;\r\n // The following three fields helps sharing generated fixed LODs for texture filtering\r\n // In environment not supporting the textureLOD extension like EDGE. They are for internal use only.\r\n // They are at the level of the gl texture to benefit from the cache.\r\n /** @hidden */\r\n this._lodTextureHigh = null;\r\n /** @hidden */\r\n this._lodTextureMid = null;\r\n /** @hidden */\r\n this._lodTextureLow = null;\r\n /** @hidden */\r\n this._isRGBD = false;\r\n /** @hidden */\r\n this._linearSpecularLOD = false;\r\n /** @hidden */\r\n this._irradianceTexture = null;\r\n /** @hidden */\r\n this._webGLTexture = null;\r\n /** @hidden */\r\n this._references = 1;\r\n this._engine = engine;\r\n this._source = source;\r\n if (!delayAllocation) {\r\n this._webGLTexture = engine._createTexture();\r\n }\r\n }\r\n /**\r\n * Gets the Engine the texture belongs to.\r\n * @returns The babylon engine\r\n */\r\n InternalTexture.prototype.getEngine = function () {\r\n return this._engine;\r\n };\r\n Object.defineProperty(InternalTexture.prototype, \"source\", {\r\n /**\r\n * Gets the data source type of the texture\r\n */\r\n get: function () {\r\n return this._source;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Increments the number of references (ie. the number of Texture that point to it)\r\n */\r\n InternalTexture.prototype.incrementReferences = function () {\r\n this._references++;\r\n };\r\n /**\r\n * Change the size of the texture (not the size of the content)\r\n * @param width defines the new width\r\n * @param height defines the new height\r\n * @param depth defines the new depth (1 by default)\r\n */\r\n InternalTexture.prototype.updateSize = function (width, height, depth) {\r\n if (depth === void 0) { depth = 1; }\r\n this.width = width;\r\n this.height = height;\r\n this.depth = depth;\r\n this.baseWidth = width;\r\n this.baseHeight = height;\r\n this.baseDepth = depth;\r\n this._size = width * height * depth;\r\n };\r\n /** @hidden */\r\n InternalTexture.prototype._rebuild = function () {\r\n var _this = this;\r\n var proxy;\r\n this.isReady = false;\r\n this._cachedCoordinatesMode = null;\r\n this._cachedWrapU = null;\r\n this._cachedWrapV = null;\r\n this._cachedAnisotropicFilteringLevel = null;\r\n switch (this.source) {\r\n case InternalTextureSource.Temp:\r\n return;\r\n case InternalTextureSource.Url:\r\n proxy = this._engine.createTexture(this.url, !this.generateMipMaps, this.invertY, null, this.samplingMode, function () {\r\n proxy._swapAndDie(_this);\r\n _this.isReady = true;\r\n }, null, this._buffer, undefined, this.format);\r\n return;\r\n case InternalTextureSource.Raw:\r\n proxy = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTextureSource.Raw3D:\r\n proxy = this._engine.createRawTexture3D(this._bufferView, this.baseWidth, this.baseHeight, this.baseDepth, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTextureSource.Dynamic:\r\n proxy = this._engine.createDynamicTexture(this.baseWidth, this.baseHeight, this.generateMipMaps, this.samplingMode);\r\n proxy._swapAndDie(this);\r\n this._engine.updateDynamicTexture(this, this._engine.getRenderingCanvas(), this.invertY, undefined, undefined, true);\r\n // The engine will make sure to update content so no need to flag it as isReady = true\r\n return;\r\n case InternalTextureSource.RenderTarget:\r\n var options = new RenderTargetCreationOptions();\r\n options.generateDepthBuffer = this._generateDepthBuffer;\r\n options.generateMipMaps = this.generateMipMaps;\r\n options.generateStencilBuffer = this._generateStencilBuffer;\r\n options.samplingMode = this.samplingMode;\r\n options.type = this.type;\r\n if (this.isCube) {\r\n proxy = this._engine.createRenderTargetCubeTexture(this.width, options);\r\n }\r\n else {\r\n var size = {\r\n width: this.width,\r\n height: this.height\r\n };\r\n proxy = this._engine.createRenderTargetTexture(size, options);\r\n }\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTextureSource.Depth:\r\n var depthTextureOptions = {\r\n bilinearFiltering: this.samplingMode !== 2,\r\n comparisonFunction: this._comparisonFunction,\r\n generateStencil: this._generateStencilBuffer,\r\n isCube: this.isCube\r\n };\r\n proxy = this._engine.createDepthStencilTexture({ width: this.width, height: this.height }, depthTextureOptions);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTextureSource.Cube:\r\n proxy = this._engine.createCubeTexture(this.url, null, this._files, !this.generateMipMaps, function () {\r\n proxy._swapAndDie(_this);\r\n _this.isReady = true;\r\n }, null, this.format, this._extension);\r\n return;\r\n case InternalTextureSource.CubeRaw:\r\n proxy = this._engine.createRawCubeTexture(this._bufferViewArray, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n proxy._swapAndDie(this);\r\n this.isReady = true;\r\n return;\r\n case InternalTextureSource.CubeRawRGBD:\r\n proxy = this._engine.createRawCubeTexture(null, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\r\n InternalTexture._UpdateRGBDAsync(proxy, this._bufferViewArrayArray, this._sphericalPolynomial, this._lodGenerationScale, this._lodGenerationOffset).then(function () {\r\n proxy._swapAndDie(_this);\r\n _this.isReady = true;\r\n });\r\n return;\r\n case InternalTextureSource.CubePrefiltered:\r\n proxy = this._engine.createPrefilteredCubeTexture(this.url, null, this._lodGenerationScale, this._lodGenerationOffset, function (proxy) {\r\n if (proxy) {\r\n proxy._swapAndDie(_this);\r\n }\r\n _this.isReady = true;\r\n }, null, this.format, this._extension);\r\n proxy._sphericalPolynomial = this._sphericalPolynomial;\r\n return;\r\n }\r\n };\r\n /** @hidden */\r\n InternalTexture.prototype._swapAndDie = function (target) {\r\n target._webGLTexture = this._webGLTexture;\r\n target._isRGBD = this._isRGBD;\r\n if (this._framebuffer) {\r\n target._framebuffer = this._framebuffer;\r\n }\r\n if (this._depthStencilBuffer) {\r\n target._depthStencilBuffer = this._depthStencilBuffer;\r\n }\r\n if (this._lodTextureHigh) {\r\n if (target._lodTextureHigh) {\r\n target._lodTextureHigh.dispose();\r\n }\r\n target._lodTextureHigh = this._lodTextureHigh;\r\n }\r\n if (this._lodTextureMid) {\r\n if (target._lodTextureMid) {\r\n target._lodTextureMid.dispose();\r\n }\r\n target._lodTextureMid = this._lodTextureMid;\r\n }\r\n if (this._lodTextureLow) {\r\n if (target._lodTextureLow) {\r\n target._lodTextureLow.dispose();\r\n }\r\n target._lodTextureLow = this._lodTextureLow;\r\n }\r\n if (this._irradianceTexture) {\r\n if (target._irradianceTexture) {\r\n target._irradianceTexture.dispose();\r\n }\r\n target._irradianceTexture = this._irradianceTexture;\r\n }\r\n var cache = this._engine.getLoadedTexturesCache();\r\n var index = cache.indexOf(this);\r\n if (index !== -1) {\r\n cache.splice(index, 1);\r\n }\r\n var index = cache.indexOf(target);\r\n if (index === -1) {\r\n cache.push(target);\r\n }\r\n };\r\n /**\r\n * Dispose the current allocated resources\r\n */\r\n InternalTexture.prototype.dispose = function () {\r\n if (!this._webGLTexture) {\r\n return;\r\n }\r\n this._references--;\r\n if (this._references === 0) {\r\n this._engine._releaseTexture(this);\r\n this._webGLTexture = null;\r\n }\r\n };\r\n /** @hidden */\r\n InternalTexture._UpdateRGBDAsync = function (internalTexture, data, sphericalPolynomial, lodScale, lodOffset) {\r\n throw _DevTools.WarnImport(\"environmentTextureTools\");\r\n };\r\n return InternalTexture;\r\n}());\r\nexport { InternalTexture };\r\n//# sourceMappingURL=internalTexture.js.map"
  5239. },
  5240. {
  5241. "id": "../../.temp/packageES6Dev/core/Materials/Textures/renderTargetCreationOptions.js",
  5242. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\renderTargetCreationOptions.js",
  5243. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/renderTargetCreationOptions.js",
  5244. "index": 29,
  5245. "index2": 26,
  5246. "size": 329,
  5247. "cacheable": true,
  5248. "built": true,
  5249. "optional": false,
  5250. "prefetched": false,
  5251. "chunks": [
  5252. "thinEngineOnly"
  5253. ],
  5254. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  5255. "issuerId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5256. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5257. "issuerPath": [
  5258. {
  5259. "id": "./thinEngineOnly.ts",
  5260. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5261. "name": "./thinEngineOnly.ts",
  5262. "profile": {
  5263. "factory": 25,
  5264. "building": 1793
  5265. }
  5266. },
  5267. {
  5268. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5269. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5270. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5271. "profile": {
  5272. "factory": 10,
  5273. "building": 63
  5274. }
  5275. },
  5276. {
  5277. "id": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5278. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  5279. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5280. "profile": {
  5281. "factory": 6,
  5282. "building": 38,
  5283. "dependencies": 28
  5284. }
  5285. }
  5286. ],
  5287. "profile": {
  5288. "factory": 15,
  5289. "building": 6
  5290. },
  5291. "failed": false,
  5292. "errors": 0,
  5293. "warnings": 0,
  5294. "assets": [],
  5295. "reasons": [
  5296. {
  5297. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5298. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  5299. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5300. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5301. "type": "harmony side effect evaluation",
  5302. "userRequest": "../../Materials/Textures/renderTargetCreationOptions",
  5303. "loc": "2:0-99"
  5304. },
  5305. {
  5306. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5307. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  5308. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5309. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5310. "type": "harmony import specifier",
  5311. "userRequest": "../../Materials/Textures/renderTargetCreationOptions",
  5312. "loc": "312:34-61"
  5313. }
  5314. ],
  5315. "providedExports": [
  5316. "RenderTargetCreationOptions"
  5317. ],
  5318. "optimizationBailout": [],
  5319. "depth": 3,
  5320. "source": "/**\r\n * Define options used to create a render target texture\r\n */\r\nvar RenderTargetCreationOptions = /** @class */ (function () {\r\n function RenderTargetCreationOptions() {\r\n }\r\n return RenderTargetCreationOptions;\r\n}());\r\nexport { RenderTargetCreationOptions };\r\n//# sourceMappingURL=renderTargetCreationOptions.js.map"
  5321. },
  5322. {
  5323. "id": "../../.temp/packageES6Dev/core/Materials/effect.js",
  5324. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  5325. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  5326. "index": 3,
  5327. "index2": 21,
  5328. "size": 42975,
  5329. "cacheable": true,
  5330. "built": true,
  5331. "optional": false,
  5332. "prefetched": false,
  5333. "chunks": [
  5334. "thinEngineOnly"
  5335. ],
  5336. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5337. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5338. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5339. "issuerPath": [
  5340. {
  5341. "id": "./thinEngineOnly.ts",
  5342. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5343. "name": "./thinEngineOnly.ts",
  5344. "profile": {
  5345. "factory": 25,
  5346. "building": 1793
  5347. }
  5348. },
  5349. {
  5350. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5351. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5352. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5353. "profile": {
  5354. "factory": 10,
  5355. "building": 63
  5356. }
  5357. }
  5358. ],
  5359. "profile": {
  5360. "factory": 6,
  5361. "building": 38,
  5362. "dependencies": 28
  5363. },
  5364. "failed": false,
  5365. "errors": 0,
  5366. "warnings": 0,
  5367. "assets": [],
  5368. "reasons": [
  5369. {
  5370. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5371. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5372. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5373. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5374. "type": "harmony side effect evaluation",
  5375. "userRequest": "../Materials/effect",
  5376. "loc": "2:0-45"
  5377. },
  5378. {
  5379. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5380. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5381. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5382. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5383. "type": "harmony import specifier",
  5384. "userRequest": "../Materials/effect",
  5385. "loc": "344:19-25"
  5386. },
  5387. {
  5388. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5389. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5390. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5391. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5392. "type": "harmony import specifier",
  5393. "userRequest": "../Materials/effect",
  5394. "loc": "347:12-18"
  5395. },
  5396. {
  5397. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5398. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5399. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5400. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5401. "type": "harmony import specifier",
  5402. "userRequest": "../Materials/effect",
  5403. "loc": "486:8-14"
  5404. },
  5405. {
  5406. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5407. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5408. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5409. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5410. "type": "harmony import specifier",
  5411. "userRequest": "../Materials/effect",
  5412. "loc": "1631:25-31"
  5413. },
  5414. {
  5415. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5416. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5417. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5418. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5419. "type": "harmony import specifier",
  5420. "userRequest": "../Materials/effect",
  5421. "loc": "3034:8-14"
  5422. }
  5423. ],
  5424. "providedExports": [
  5425. "Effect"
  5426. ],
  5427. "optimizationBailout": [],
  5428. "depth": 2,
  5429. "source": "import { Observable } from \"../Misc/observable\";\r\nimport { DomManagement } from \"../Misc/domManagement\";\r\nimport { Logger } from \"../Misc/logger\";\r\nimport { ShaderProcessor } from '../Engines/Processors/shaderProcessor';\r\n/**\r\n * Effect containing vertex and fragment shader that can be executed on an object.\r\n */\r\nvar Effect = /** @class */ (function () {\r\n /**\r\n * Instantiates an effect.\r\n * An effect can be used to create/manage/execute vertex and fragment shaders.\r\n * @param baseName Name of the effect.\r\n * @param attributesNamesOrOptions List of attribute names that will be passed to the shader or set of all options to create the effect.\r\n * @param uniformsNamesOrEngine List of uniform variable names that will be passed to the shader or the engine that will be used to render effect.\r\n * @param samplers List of sampler variables that will be passed to the shader.\r\n * @param engine Engine to be used to render the effect\r\n * @param defines Define statements to be added to the shader.\r\n * @param fallbacks Possible fallbacks for this effect to improve performance when needed.\r\n * @param onCompiled Callback that will be called when the shader is compiled.\r\n * @param onError Callback that will be called if an error occurs during shader compilation.\r\n * @param indexParameters Parameters to be used with Babylons include syntax to iterate over an array (eg. {lights: 10})\r\n */\r\n function Effect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, engine, defines, fallbacks, onCompiled, onError, indexParameters) {\r\n var _this = this;\r\n if (samplers === void 0) { samplers = null; }\r\n if (defines === void 0) { defines = null; }\r\n if (fallbacks === void 0) { fallbacks = null; }\r\n if (onCompiled === void 0) { onCompiled = null; }\r\n if (onError === void 0) { onError = null; }\r\n /**\r\n * Name of the effect.\r\n */\r\n this.name = null;\r\n /**\r\n * String container all the define statements that should be set on the shader.\r\n */\r\n this.defines = \"\";\r\n /**\r\n * Callback that will be called when the shader is compiled.\r\n */\r\n this.onCompiled = null;\r\n /**\r\n * Callback that will be called if an error occurs during shader compilation.\r\n */\r\n this.onError = null;\r\n /**\r\n * Callback that will be called when effect is bound.\r\n */\r\n this.onBind = null;\r\n /**\r\n * Unique ID of the effect.\r\n */\r\n this.uniqueId = 0;\r\n /**\r\n * Observable that will be called when the shader is compiled.\r\n * It is recommended to use executeWhenCompile() or to make sure that scene.isReady() is called to get this observable raised.\r\n */\r\n this.onCompileObservable = new Observable();\r\n /**\r\n * Observable that will be called if an error occurs during shader compilation.\r\n */\r\n this.onErrorObservable = new Observable();\r\n /** @hidden */\r\n this._onBindObservable = null;\r\n /** @hidden */\r\n this._bonesComputationForcedToCPU = false;\r\n this._uniformBuffersNames = {};\r\n this._samplers = {};\r\n this._isReady = false;\r\n this._compilationError = \"\";\r\n this._allFallbacksProcessed = false;\r\n this._uniforms = {};\r\n /**\r\n * Key for the effect.\r\n * @hidden\r\n */\r\n this._key = \"\";\r\n this._fallbacks = null;\r\n this._vertexSourceCode = \"\";\r\n this._fragmentSourceCode = \"\";\r\n this._vertexSourceCodeOverride = \"\";\r\n this._fragmentSourceCodeOverride = \"\";\r\n this._transformFeedbackVaryings = null;\r\n /**\r\n * Compiled shader to webGL program.\r\n * @hidden\r\n */\r\n this._pipelineContext = null;\r\n this._valueCache = {};\r\n this.name = baseName;\r\n if (attributesNamesOrOptions.attributes) {\r\n var options = attributesNamesOrOptions;\r\n this._engine = uniformsNamesOrEngine;\r\n this._attributesNames = options.attributes;\r\n this._uniformsNames = options.uniformsNames.concat(options.samplers);\r\n this._samplerList = options.samplers.slice();\r\n this.defines = options.defines;\r\n this.onError = options.onError;\r\n this.onCompiled = options.onCompiled;\r\n this._fallbacks = options.fallbacks;\r\n this._indexParameters = options.indexParameters;\r\n this._transformFeedbackVaryings = options.transformFeedbackVaryings || null;\r\n if (options.uniformBuffersNames) {\r\n for (var i = 0; i < options.uniformBuffersNames.length; i++) {\r\n this._uniformBuffersNames[options.uniformBuffersNames[i]] = i;\r\n }\r\n }\r\n }\r\n else {\r\n this._engine = engine;\r\n this.defines = (defines == null ? \"\" : defines);\r\n this._uniformsNames = uniformsNamesOrEngine.concat(samplers);\r\n this._samplerList = samplers ? samplers.slice() : [];\r\n this._attributesNames = attributesNamesOrOptions;\r\n this.onError = onError;\r\n this.onCompiled = onCompiled;\r\n this._indexParameters = indexParameters;\r\n this._fallbacks = fallbacks;\r\n }\r\n this.uniqueId = Effect._uniqueIdSeed++;\r\n var vertexSource;\r\n var fragmentSource;\r\n if (baseName.vertexSource) {\r\n vertexSource = \"source:\" + baseName.vertexSource;\r\n }\r\n else if (baseName.vertexElement) {\r\n vertexSource = document.getElementById(baseName.vertexElement);\r\n if (!vertexSource) {\r\n vertexSource = baseName.vertexElement;\r\n }\r\n }\r\n else {\r\n vertexSource = baseName.vertex || baseName;\r\n }\r\n if (baseName.fragmentSource) {\r\n fragmentSource = \"source:\" + baseName.fragmentSource;\r\n }\r\n else if (baseName.fragmentElement) {\r\n fragmentSource = document.getElementById(baseName.fragmentElement);\r\n if (!fragmentSource) {\r\n fragmentSource = baseName.fragmentElement;\r\n }\r\n }\r\n else {\r\n fragmentSource = baseName.fragment || baseName;\r\n }\r\n var processorOptions = {\r\n defines: this.defines.split(\"\\n\"),\r\n indexParameters: this._indexParameters,\r\n isFragment: false,\r\n shouldUseHighPrecisionShader: this._engine._shouldUseHighPrecisionShader,\r\n processor: this._engine._shaderProcessor,\r\n supportsUniformBuffers: this._engine.supportsUniformBuffers,\r\n shadersRepository: Effect.ShadersRepository,\r\n includesShadersStore: Effect.IncludesShadersStore,\r\n version: (this._engine.webGLVersion * 100).toString(),\r\n platformName: this._engine.webGLVersion >= 2 ? \"WEBGL2\" : \"WEBGL1\"\r\n };\r\n this._loadShader(vertexSource, \"Vertex\", \"\", function (vertexCode) {\r\n _this._loadShader(fragmentSource, \"Fragment\", \"Pixel\", function (fragmentCode) {\r\n ShaderProcessor.Process(vertexCode, processorOptions, function (migratedVertexCode) {\r\n processorOptions.isFragment = true;\r\n ShaderProcessor.Process(fragmentCode, processorOptions, function (migratedFragmentCode) {\r\n _this._useFinalCode(migratedVertexCode, migratedFragmentCode, baseName);\r\n });\r\n });\r\n });\r\n });\r\n }\r\n Object.defineProperty(Effect.prototype, \"onBindObservable\", {\r\n /**\r\n * Observable that will be called when effect is bound.\r\n */\r\n get: function () {\r\n if (!this._onBindObservable) {\r\n this._onBindObservable = new Observable();\r\n }\r\n return this._onBindObservable;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Effect.prototype._useFinalCode = function (migratedVertexCode, migratedFragmentCode, baseName) {\r\n if (baseName) {\r\n var vertex = baseName.vertexElement || baseName.vertex || baseName.spectorName || baseName;\r\n var fragment = baseName.fragmentElement || baseName.fragment || baseName.spectorName || baseName;\r\n this._vertexSourceCode = \"#define SHADER_NAME vertex:\" + vertex + \"\\n\" + migratedVertexCode;\r\n this._fragmentSourceCode = \"#define SHADER_NAME fragment:\" + fragment + \"\\n\" + migratedFragmentCode;\r\n }\r\n else {\r\n this._vertexSourceCode = migratedVertexCode;\r\n this._fragmentSourceCode = migratedFragmentCode;\r\n }\r\n this._prepareEffect();\r\n };\r\n Object.defineProperty(Effect.prototype, \"key\", {\r\n /**\r\n * Unique key for this effect\r\n */\r\n get: function () {\r\n return this._key;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * If the effect has been compiled and prepared.\r\n * @returns if the effect is compiled and prepared.\r\n */\r\n Effect.prototype.isReady = function () {\r\n try {\r\n return this._isReadyInternal();\r\n }\r\n catch (_a) {\r\n return false;\r\n }\r\n };\r\n Effect.prototype._isReadyInternal = function () {\r\n if (this._isReady) {\r\n return true;\r\n }\r\n if (this._pipelineContext) {\r\n return this._pipelineContext.isReady;\r\n }\r\n return false;\r\n };\r\n /**\r\n * The engine the effect was initialized with.\r\n * @returns the engine.\r\n */\r\n Effect.prototype.getEngine = function () {\r\n return this._engine;\r\n };\r\n /**\r\n * The pipeline context for this effect\r\n * @returns the associated pipeline context\r\n */\r\n Effect.prototype.getPipelineContext = function () {\r\n return this._pipelineContext;\r\n };\r\n /**\r\n * The set of names of attribute variables for the shader.\r\n * @returns An array of attribute names.\r\n */\r\n Effect.prototype.getAttributesNames = function () {\r\n return this._attributesNames;\r\n };\r\n /**\r\n * Returns the attribute at the given index.\r\n * @param index The index of the attribute.\r\n * @returns The location of the attribute.\r\n */\r\n Effect.prototype.getAttributeLocation = function (index) {\r\n return this._attributes[index];\r\n };\r\n /**\r\n * Returns the attribute based on the name of the variable.\r\n * @param name of the attribute to look up.\r\n * @returns the attribute location.\r\n */\r\n Effect.prototype.getAttributeLocationByName = function (name) {\r\n var index = this._attributesNames.indexOf(name);\r\n return this._attributes[index];\r\n };\r\n /**\r\n * The number of attributes.\r\n * @returns the numnber of attributes.\r\n */\r\n Effect.prototype.getAttributesCount = function () {\r\n return this._attributes.length;\r\n };\r\n /**\r\n * Gets the index of a uniform variable.\r\n * @param uniformName of the uniform to look up.\r\n * @returns the index.\r\n */\r\n Effect.prototype.getUniformIndex = function (uniformName) {\r\n return this._uniformsNames.indexOf(uniformName);\r\n };\r\n /**\r\n * Returns the attribute based on the name of the variable.\r\n * @param uniformName of the uniform to look up.\r\n * @returns the location of the uniform.\r\n */\r\n Effect.prototype.getUniform = function (uniformName) {\r\n return this._uniforms[uniformName];\r\n };\r\n /**\r\n * Returns an array of sampler variable names\r\n * @returns The array of sampler variable neames.\r\n */\r\n Effect.prototype.getSamplers = function () {\r\n return this._samplerList;\r\n };\r\n /**\r\n * The error from the last compilation.\r\n * @returns the error string.\r\n */\r\n Effect.prototype.getCompilationError = function () {\r\n return this._compilationError;\r\n };\r\n /**\r\n * Gets a boolean indicating that all fallbacks were used during compilation\r\n * @returns true if all fallbacks were used\r\n */\r\n Effect.prototype.allFallbacksProcessed = function () {\r\n return this._allFallbacksProcessed;\r\n };\r\n /**\r\n * Adds a callback to the onCompiled observable and call the callback imediatly if already ready.\r\n * @param func The callback to be used.\r\n */\r\n Effect.prototype.executeWhenCompiled = function (func) {\r\n var _this = this;\r\n if (this.isReady()) {\r\n func(this);\r\n return;\r\n }\r\n this.onCompileObservable.add(function (effect) {\r\n func(effect);\r\n });\r\n if (!this._pipelineContext || this._pipelineContext.isAsync) {\r\n setTimeout(function () {\r\n _this._checkIsReady();\r\n }, 16);\r\n }\r\n };\r\n Effect.prototype._checkIsReady = function () {\r\n var _this = this;\r\n try {\r\n if (this._isReadyInternal()) {\r\n return;\r\n }\r\n }\r\n catch (e) {\r\n this._processCompilationErrors(e);\r\n return;\r\n }\r\n setTimeout(function () {\r\n _this._checkIsReady();\r\n }, 16);\r\n };\r\n Effect.prototype._loadShader = function (shader, key, optionalKey, callback) {\r\n if (typeof (HTMLElement) !== \"undefined\") {\r\n // DOM element ?\r\n if (shader instanceof HTMLElement) {\r\n var shaderCode = DomManagement.GetDOMTextContent(shader);\r\n callback(shaderCode);\r\n return;\r\n }\r\n }\r\n // Direct source ?\r\n if (shader.substr(0, 7) === \"source:\") {\r\n callback(shader.substr(7));\r\n return;\r\n }\r\n // Base64 encoded ?\r\n if (shader.substr(0, 7) === \"base64:\") {\r\n var shaderBinary = window.atob(shader.substr(7));\r\n callback(shaderBinary);\r\n return;\r\n }\r\n // Is in local store ?\r\n if (Effect.ShadersStore[shader + key + \"Shader\"]) {\r\n callback(Effect.ShadersStore[shader + key + \"Shader\"]);\r\n return;\r\n }\r\n if (optionalKey && Effect.ShadersStore[shader + optionalKey + \"Shader\"]) {\r\n callback(Effect.ShadersStore[shader + optionalKey + \"Shader\"]);\r\n return;\r\n }\r\n var shaderUrl;\r\n if (shader[0] === \".\" || shader[0] === \"/\" || shader.indexOf(\"http\") > -1) {\r\n shaderUrl = shader;\r\n }\r\n else {\r\n shaderUrl = Effect.ShadersRepository + shader;\r\n }\r\n // Vertex shader\r\n this._engine._loadFile(shaderUrl + \".\" + key.toLowerCase() + \".fx\", callback);\r\n };\r\n /**\r\n * Recompiles the webGL program\r\n * @param vertexSourceCode The source code for the vertex shader.\r\n * @param fragmentSourceCode The source code for the fragment shader.\r\n * @param onCompiled Callback called when completed.\r\n * @param onError Callback called on error.\r\n * @hidden\r\n */\r\n Effect.prototype._rebuildProgram = function (vertexSourceCode, fragmentSourceCode, onCompiled, onError) {\r\n var _this = this;\r\n this._isReady = false;\r\n this._vertexSourceCodeOverride = vertexSourceCode;\r\n this._fragmentSourceCodeOverride = fragmentSourceCode;\r\n this.onError = function (effect, error) {\r\n if (onError) {\r\n onError(error);\r\n }\r\n };\r\n this.onCompiled = function () {\r\n var scenes = _this.getEngine().scenes;\r\n for (var i = 0; i < scenes.length; i++) {\r\n scenes[i].markAllMaterialsAsDirty(31);\r\n }\r\n _this._pipelineContext._handlesSpectorRebuildCallback(onCompiled);\r\n };\r\n this._fallbacks = null;\r\n this._prepareEffect();\r\n };\r\n /**\r\n * Prepares the effect\r\n * @hidden\r\n */\r\n Effect.prototype._prepareEffect = function () {\r\n var _this = this;\r\n var attributesNames = this._attributesNames;\r\n var defines = this.defines;\r\n this._valueCache = {};\r\n var previousPipelineContext = this._pipelineContext;\r\n try {\r\n var engine_1 = this._engine;\r\n this._pipelineContext = engine_1.createPipelineContext();\r\n var rebuildRebind = this._rebuildProgram.bind(this);\r\n if (this._vertexSourceCodeOverride && this._fragmentSourceCodeOverride) {\r\n engine_1._preparePipelineContext(this._pipelineContext, this._vertexSourceCodeOverride, this._fragmentSourceCodeOverride, true, rebuildRebind, null, this._transformFeedbackVaryings);\r\n }\r\n else {\r\n engine_1._preparePipelineContext(this._pipelineContext, this._vertexSourceCode, this._fragmentSourceCode, false, rebuildRebind, defines, this._transformFeedbackVaryings);\r\n }\r\n engine_1._executeWhenRenderingStateIsCompiled(this._pipelineContext, function () {\r\n if (engine_1.supportsUniformBuffers) {\r\n for (var name in _this._uniformBuffersNames) {\r\n _this.bindUniformBlock(name, _this._uniformBuffersNames[name]);\r\n }\r\n }\r\n var uniforms = engine_1.getUniforms(_this._pipelineContext, _this._uniformsNames);\r\n uniforms.forEach(function (uniform, index) {\r\n _this._uniforms[_this._uniformsNames[index]] = uniform;\r\n });\r\n _this._attributes = engine_1.getAttributes(_this._pipelineContext, attributesNames);\r\n var index;\r\n for (index = 0; index < _this._samplerList.length; index++) {\r\n var sampler = _this.getUniform(_this._samplerList[index]);\r\n if (sampler == null) {\r\n _this._samplerList.splice(index, 1);\r\n index--;\r\n }\r\n }\r\n _this._samplerList.forEach(function (name, index) {\r\n _this._samplers[name] = index;\r\n });\r\n engine_1.bindSamplers(_this);\r\n _this._compilationError = \"\";\r\n _this._isReady = true;\r\n if (_this.onCompiled) {\r\n _this.onCompiled(_this);\r\n }\r\n _this.onCompileObservable.notifyObservers(_this);\r\n _this.onCompileObservable.clear();\r\n // Unbind mesh reference in fallbacks\r\n if (_this._fallbacks) {\r\n _this._fallbacks.unBindMesh();\r\n }\r\n if (previousPipelineContext) {\r\n _this.getEngine()._deletePipelineContext(previousPipelineContext);\r\n }\r\n });\r\n if (this._pipelineContext.isAsync) {\r\n this._checkIsReady();\r\n }\r\n }\r\n catch (e) {\r\n this._processCompilationErrors(e, previousPipelineContext);\r\n }\r\n };\r\n Effect.prototype._processCompilationErrors = function (e, previousPipelineContext) {\r\n if (previousPipelineContext === void 0) { previousPipelineContext = null; }\r\n this._compilationError = e.message;\r\n var attributesNames = this._attributesNames;\r\n var fallbacks = this._fallbacks;\r\n // Let's go through fallbacks then\r\n Logger.Error(\"Unable to compile effect:\");\r\n Logger.Error(\"Uniforms: \" + this._uniformsNames.map(function (uniform) {\r\n return \" \" + uniform;\r\n }));\r\n Logger.Error(\"Attributes: \" + attributesNames.map(function (attribute) {\r\n return \" \" + attribute;\r\n }));\r\n Logger.Error(\"Defines:\\r\\n\" + this.defines);\r\n Logger.Error(\"Error: \" + this._compilationError);\r\n if (previousPipelineContext) {\r\n this._pipelineContext = previousPipelineContext;\r\n this._isReady = true;\r\n if (this.onError) {\r\n this.onError(this, this._compilationError);\r\n }\r\n this.onErrorObservable.notifyObservers(this);\r\n }\r\n if (fallbacks) {\r\n this._pipelineContext = null;\r\n if (fallbacks.hasMoreFallbacks) {\r\n this._allFallbacksProcessed = false;\r\n Logger.Error(\"Trying next fallback.\");\r\n this.defines = fallbacks.reduce(this.defines, this);\r\n this._prepareEffect();\r\n }\r\n else { // Sorry we did everything we can\r\n this._allFallbacksProcessed = true;\r\n if (this.onError) {\r\n this.onError(this, this._compilationError);\r\n }\r\n this.onErrorObservable.notifyObservers(this);\r\n this.onErrorObservable.clear();\r\n // Unbind mesh reference in fallbacks\r\n if (this._fallbacks) {\r\n this._fallbacks.unBindMesh();\r\n }\r\n }\r\n }\r\n else {\r\n this._allFallbacksProcessed = true;\r\n }\r\n };\r\n Object.defineProperty(Effect.prototype, \"isSupported\", {\r\n /**\r\n * Checks if the effect is supported. (Must be called after compilation)\r\n */\r\n get: function () {\r\n return this._compilationError === \"\";\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Binds a texture to the engine to be used as output of the shader.\r\n * @param channel Name of the output variable.\r\n * @param texture Texture to bind.\r\n * @hidden\r\n */\r\n Effect.prototype._bindTexture = function (channel, texture) {\r\n this._engine._bindTexture(this._samplers[channel], texture);\r\n };\r\n /**\r\n * Sets a texture on the engine to be used in the shader.\r\n * @param channel Name of the sampler variable.\r\n * @param texture Texture to set.\r\n */\r\n Effect.prototype.setTexture = function (channel, texture) {\r\n this._engine.setTexture(this._samplers[channel], this._uniforms[channel], texture);\r\n };\r\n /**\r\n * Sets a depth stencil texture from a render target on the engine to be used in the shader.\r\n * @param channel Name of the sampler variable.\r\n * @param texture Texture to set.\r\n */\r\n Effect.prototype.setDepthStencilTexture = function (channel, texture) {\r\n this._engine.setDepthStencilTexture(this._samplers[channel], this._uniforms[channel], texture);\r\n };\r\n /**\r\n * Sets an array of textures on the engine to be used in the shader.\r\n * @param channel Name of the variable.\r\n * @param textures Textures to set.\r\n */\r\n Effect.prototype.setTextureArray = function (channel, textures) {\r\n var exName = channel + \"Ex\";\r\n if (this._samplerList.indexOf(exName + \"0\") === -1) {\r\n var initialPos = this._samplerList.indexOf(channel);\r\n for (var index = 1; index < textures.length; index++) {\r\n var currentExName = exName + (index - 1).toString();\r\n this._samplerList.splice(initialPos + index, 0, currentExName);\r\n }\r\n // Reset every channels\r\n var channelIndex = 0;\r\n for (var _i = 0, _a = this._samplerList; _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n this._samplers[key] = channelIndex;\r\n channelIndex += 1;\r\n }\r\n }\r\n this._engine.setTextureArray(this._samplers[channel], this._uniforms[channel], textures);\r\n };\r\n /**\r\n * Sets a texture to be the input of the specified post process. (To use the output, pass in the next post process in the pipeline)\r\n * @param channel Name of the sampler variable.\r\n * @param postProcess Post process to get the input texture from.\r\n */\r\n Effect.prototype.setTextureFromPostProcess = function (channel, postProcess) {\r\n this._engine.setTextureFromPostProcess(this._samplers[channel], postProcess);\r\n };\r\n /**\r\n * (Warning! setTextureFromPostProcessOutput may be desired instead)\r\n * Sets the input texture of the passed in post process to be input of this effect. (To use the output of the passed in post process use setTextureFromPostProcessOutput)\r\n * @param channel Name of the sampler variable.\r\n * @param postProcess Post process to get the output texture from.\r\n */\r\n Effect.prototype.setTextureFromPostProcessOutput = function (channel, postProcess) {\r\n this._engine.setTextureFromPostProcessOutput(this._samplers[channel], postProcess);\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheMatrix = function (uniformName, matrix) {\r\n var cache = this._valueCache[uniformName];\r\n var flag = matrix.updateFlag;\r\n if (cache !== undefined && cache === flag) {\r\n return false;\r\n }\r\n this._valueCache[uniformName] = flag;\r\n return true;\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheFloat2 = function (uniformName, x, y) {\r\n var cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n var changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n return changed;\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheFloat3 = function (uniformName, x, y, z) {\r\n var cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y, z];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n var changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n if (cache[2] !== z) {\r\n cache[2] = z;\r\n changed = true;\r\n }\r\n return changed;\r\n };\r\n /** @hidden */\r\n Effect.prototype._cacheFloat4 = function (uniformName, x, y, z, w) {\r\n var cache = this._valueCache[uniformName];\r\n if (!cache) {\r\n cache = [x, y, z, w];\r\n this._valueCache[uniformName] = cache;\r\n return true;\r\n }\r\n var changed = false;\r\n if (cache[0] !== x) {\r\n cache[0] = x;\r\n changed = true;\r\n }\r\n if (cache[1] !== y) {\r\n cache[1] = y;\r\n changed = true;\r\n }\r\n if (cache[2] !== z) {\r\n cache[2] = z;\r\n changed = true;\r\n }\r\n if (cache[3] !== w) {\r\n cache[3] = w;\r\n changed = true;\r\n }\r\n return changed;\r\n };\r\n /**\r\n * Binds a buffer to a uniform.\r\n * @param buffer Buffer to bind.\r\n * @param name Name of the uniform variable to bind to.\r\n */\r\n Effect.prototype.bindUniformBuffer = function (buffer, name) {\r\n var bufferName = this._uniformBuffersNames[name];\r\n if (bufferName === undefined || Effect._baseCache[bufferName] === buffer) {\r\n return;\r\n }\r\n Effect._baseCache[bufferName] = buffer;\r\n this._engine.bindUniformBufferBase(buffer, bufferName);\r\n };\r\n /**\r\n * Binds block to a uniform.\r\n * @param blockName Name of the block to bind.\r\n * @param index Index to bind.\r\n */\r\n Effect.prototype.bindUniformBlock = function (blockName, index) {\r\n this._engine.bindUniformBlock(this._pipelineContext, blockName, index);\r\n };\r\n /**\r\n * Sets an interger value on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setInt = function (uniformName, value) {\r\n var cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = value;\r\n this._engine.setInt(this._uniforms[uniformName], value);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray2 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray2(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray3 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray3(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setIntArray4 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setIntArray4(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray2 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray2(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray3 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray3(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an float array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloatArray4 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray4(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray2 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray2(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray3 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray3(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)\r\n * @param uniformName Name of the variable.\r\n * @param array array to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setArray4 = function (uniformName, array) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setArray4(this._uniforms[uniformName], array);\r\n return this;\r\n };\r\n /**\r\n * Sets matrices on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrices matrices to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrices = function (uniformName, matrices) {\r\n if (!matrices) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrices(this._uniforms[uniformName], matrices);\r\n return this;\r\n };\r\n /**\r\n * Sets matrix on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrix = function (uniformName, matrix) {\r\n if (this._cacheMatrix(uniformName, matrix)) {\r\n this._engine.setMatrices(this._uniforms[uniformName], matrix.toArray());\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a 3x3 matrix on a uniform variable. (Speicified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrix3x3 = function (uniformName, matrix) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrix3x3(this._uniforms[uniformName], matrix);\r\n return this;\r\n };\r\n /**\r\n * Sets a 2x2 matrix on a uniform variable. (Speicified as [1,2,3,4] will result in [1,2][3,4] matrix)\r\n * @param uniformName Name of the variable.\r\n * @param matrix matrix to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setMatrix2x2 = function (uniformName, matrix) {\r\n this._valueCache[uniformName] = null;\r\n this._engine.setMatrix2x2(this._uniforms[uniformName], matrix);\r\n return this;\r\n };\r\n /**\r\n * Sets a float on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param value value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat = function (uniformName, value) {\r\n var cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === value) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = value;\r\n this._engine.setFloat(this._uniforms[uniformName], value);\r\n return this;\r\n };\r\n /**\r\n * Sets a boolean on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param bool value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setBool = function (uniformName, bool) {\r\n var cache = this._valueCache[uniformName];\r\n if (cache !== undefined && cache === bool) {\r\n return this;\r\n }\r\n this._valueCache[uniformName] = bool;\r\n this._engine.setInt(this._uniforms[uniformName], bool ? 1 : 0);\r\n return this;\r\n };\r\n /**\r\n * Sets a Vector2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector2 vector2 to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setVector2 = function (uniformName, vector2) {\r\n if (this._cacheFloat2(uniformName, vector2.x, vector2.y)) {\r\n this._engine.setFloat2(this._uniforms[uniformName], vector2.x, vector2.y);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a float2 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float2.\r\n * @param y Second float in float2.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat2 = function (uniformName, x, y) {\r\n if (this._cacheFloat2(uniformName, x, y)) {\r\n this._engine.setFloat2(this._uniforms[uniformName], x, y);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Vector3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector3 Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setVector3 = function (uniformName, vector3) {\r\n if (this._cacheFloat3(uniformName, vector3.x, vector3.y, vector3.z)) {\r\n this._engine.setFloat3(this._uniforms[uniformName], vector3.x, vector3.y, vector3.z);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a float3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float3.\r\n * @param y Second float in float3.\r\n * @param z Third float in float3.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat3 = function (uniformName, x, y, z) {\r\n if (this._cacheFloat3(uniformName, x, y, z)) {\r\n this._engine.setFloat3(this._uniforms[uniformName], x, y, z);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Vector4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param vector4 Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setVector4 = function (uniformName, vector4) {\r\n if (this._cacheFloat4(uniformName, vector4.x, vector4.y, vector4.z, vector4.w)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], vector4.x, vector4.y, vector4.z, vector4.w);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a float4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param x First float in float4.\r\n * @param y Second float in float4.\r\n * @param z Third float in float4.\r\n * @param w Fourth float in float4.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setFloat4 = function (uniformName, x, y, z, w) {\r\n if (this._cacheFloat4(uniformName, x, y, z, w)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], x, y, z, w);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Color3 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setColor3 = function (uniformName, color3) {\r\n if (this._cacheFloat3(uniformName, color3.r, color3.g, color3.b)) {\r\n this._engine.setFloat3(this._uniforms[uniformName], color3.r, color3.g, color3.b);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Color4 on a uniform variable.\r\n * @param uniformName Name of the variable.\r\n * @param color3 Value to be set.\r\n * @param alpha Alpha value to be set.\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setColor4 = function (uniformName, color3, alpha) {\r\n if (this._cacheFloat4(uniformName, color3.r, color3.g, color3.b, alpha)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], color3.r, color3.g, color3.b, alpha);\r\n }\r\n return this;\r\n };\r\n /**\r\n * Sets a Color4 on a uniform variable\r\n * @param uniformName defines the name of the variable\r\n * @param color4 defines the value to be set\r\n * @returns this effect.\r\n */\r\n Effect.prototype.setDirectColor4 = function (uniformName, color4) {\r\n if (this._cacheFloat4(uniformName, color4.r, color4.g, color4.b, color4.a)) {\r\n this._engine.setFloat4(this._uniforms[uniformName], color4.r, color4.g, color4.b, color4.a);\r\n }\r\n return this;\r\n };\r\n /** Release all associated resources */\r\n Effect.prototype.dispose = function () {\r\n this._engine._releaseEffect(this);\r\n };\r\n /**\r\n * This function will add a new shader to the shader store\r\n * @param name the name of the shader\r\n * @param pixelShader optional pixel shader content\r\n * @param vertexShader optional vertex shader content\r\n */\r\n Effect.RegisterShader = function (name, pixelShader, vertexShader) {\r\n if (pixelShader) {\r\n Effect.ShadersStore[name + \"PixelShader\"] = pixelShader;\r\n }\r\n if (vertexShader) {\r\n Effect.ShadersStore[name + \"VertexShader\"] = vertexShader;\r\n }\r\n };\r\n /**\r\n * Resets the cache of effects.\r\n */\r\n Effect.ResetCache = function () {\r\n Effect._baseCache = {};\r\n };\r\n /**\r\n * Gets or sets the relative url used to load shaders if using the engine in non-minified mode\r\n */\r\n Effect.ShadersRepository = \"src/Shaders/\";\r\n Effect._uniqueIdSeed = 0;\r\n Effect._baseCache = {};\r\n /**\r\n * Store of each shader (The can be looked up using effect.key)\r\n */\r\n Effect.ShadersStore = {};\r\n /**\r\n * Store of each included file for a shader (The can be looked up using effect.key)\r\n */\r\n Effect.IncludesShadersStore = {};\r\n return Effect;\r\n}());\r\nexport { Effect };\r\n//# sourceMappingURL=effect.js.map"
  5430. },
  5431. {
  5432. "id": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5433. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  5434. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5435. "index": 31,
  5436. "index2": 30,
  5437. "size": 685,
  5438. "cacheable": true,
  5439. "built": true,
  5440. "optional": false,
  5441. "prefetched": false,
  5442. "chunks": [
  5443. "thinEngineOnly"
  5444. ],
  5445. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5446. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5447. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5448. "issuerPath": [
  5449. {
  5450. "id": "./thinEngineOnly.ts",
  5451. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5452. "name": "./thinEngineOnly.ts",
  5453. "profile": {
  5454. "factory": 25,
  5455. "building": 1793
  5456. }
  5457. },
  5458. {
  5459. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5460. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5461. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5462. "profile": {
  5463. "factory": 10,
  5464. "building": 63
  5465. }
  5466. }
  5467. ],
  5468. "profile": {
  5469. "factory": 6,
  5470. "building": 38,
  5471. "dependencies": 28
  5472. },
  5473. "failed": false,
  5474. "errors": 0,
  5475. "warnings": 0,
  5476. "assets": [],
  5477. "reasons": [
  5478. {
  5479. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5480. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5481. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5482. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5483. "type": "harmony side effect evaluation",
  5484. "userRequest": "../Meshes/WebGL/webGLDataBuffer",
  5485. "loc": "12:0-66"
  5486. },
  5487. {
  5488. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5489. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5490. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5491. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5492. "type": "harmony import specifier",
  5493. "userRequest": "../Meshes/WebGL/webGLDataBuffer",
  5494. "loc": "1126:29-44"
  5495. },
  5496. {
  5497. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5498. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5499. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5500. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5501. "type": "harmony import specifier",
  5502. "userRequest": "../Meshes/WebGL/webGLDataBuffer",
  5503. "loc": "1158:29-44"
  5504. }
  5505. ],
  5506. "providedExports": [
  5507. "WebGLDataBuffer"
  5508. ],
  5509. "optimizationBailout": [],
  5510. "depth": 2,
  5511. "source": "import { __extends } from \"tslib\";\r\nimport { DataBuffer } from '../dataBuffer';\r\n/** @hidden */\r\nvar WebGLDataBuffer = /** @class */ (function (_super) {\r\n __extends(WebGLDataBuffer, _super);\r\n function WebGLDataBuffer(resource) {\r\n var _this = _super.call(this) || this;\r\n _this._buffer = resource;\r\n return _this;\r\n }\r\n Object.defineProperty(WebGLDataBuffer.prototype, \"underlyingResource\", {\r\n get: function () {\r\n return this._buffer;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return WebGLDataBuffer;\r\n}(DataBuffer));\r\nexport { WebGLDataBuffer };\r\n//# sourceMappingURL=webGLDataBuffer.js.map"
  5512. },
  5513. {
  5514. "id": "../../.temp/packageES6Dev/core/Meshes/dataBuffer.js",
  5515. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\dataBuffer.js",
  5516. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/dataBuffer.js",
  5517. "index": 32,
  5518. "index2": 29,
  5519. "size": 866,
  5520. "cacheable": true,
  5521. "built": true,
  5522. "optional": false,
  5523. "prefetched": false,
  5524. "chunks": [
  5525. "thinEngineOnly"
  5526. ],
  5527. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  5528. "issuerId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5529. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5530. "issuerPath": [
  5531. {
  5532. "id": "./thinEngineOnly.ts",
  5533. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5534. "name": "./thinEngineOnly.ts",
  5535. "profile": {
  5536. "factory": 25,
  5537. "building": 1793
  5538. }
  5539. },
  5540. {
  5541. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5542. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5543. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5544. "profile": {
  5545. "factory": 10,
  5546. "building": 63
  5547. }
  5548. },
  5549. {
  5550. "id": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5551. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  5552. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5553. "profile": {
  5554. "factory": 6,
  5555. "building": 38,
  5556. "dependencies": 28
  5557. }
  5558. }
  5559. ],
  5560. "profile": {
  5561. "factory": 28,
  5562. "building": 7
  5563. },
  5564. "failed": false,
  5565. "errors": 0,
  5566. "warnings": 0,
  5567. "assets": [],
  5568. "reasons": [
  5569. {
  5570. "moduleId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5571. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  5572. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5573. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5574. "type": "harmony side effect evaluation",
  5575. "userRequest": "../dataBuffer",
  5576. "loc": "2:0-43"
  5577. },
  5578. {
  5579. "moduleId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5580. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  5581. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5582. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  5583. "type": "harmony import specifier",
  5584. "userRequest": "../dataBuffer",
  5585. "loc": "19:2-12"
  5586. }
  5587. ],
  5588. "providedExports": [
  5589. "DataBuffer"
  5590. ],
  5591. "optimizationBailout": [],
  5592. "depth": 3,
  5593. "source": "/**\r\n * Class used to store gfx data (like WebGLBuffer)\r\n */\r\nvar DataBuffer = /** @class */ (function () {\r\n function DataBuffer() {\r\n /**\r\n * Gets or sets the number of objects referencing this buffer\r\n */\r\n this.references = 0;\r\n /** Gets or sets the size of the underlying buffer */\r\n this.capacity = 0;\r\n /**\r\n * Gets or sets a boolean indicating if the buffer contains 32bits indices\r\n */\r\n this.is32Bits = false;\r\n }\r\n Object.defineProperty(DataBuffer.prototype, \"underlyingResource\", {\r\n /**\r\n * Gets the underlying buffer\r\n */\r\n get: function () {\r\n return null;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return DataBuffer;\r\n}());\r\nexport { DataBuffer };\r\n//# sourceMappingURL=dataBuffer.js.map"
  5594. },
  5595. {
  5596. "id": "../../.temp/packageES6Dev/core/Misc/baseError.js",
  5597. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\baseError.js",
  5598. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/baseError.js",
  5599. "index": 23,
  5600. "index2": 18,
  5601. "size": 847,
  5602. "cacheable": true,
  5603. "built": true,
  5604. "optional": false,
  5605. "prefetched": false,
  5606. "chunks": [
  5607. "thinEngineOnly"
  5608. ],
  5609. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  5610. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  5611. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5612. "issuerPath": [
  5613. {
  5614. "id": "./thinEngineOnly.ts",
  5615. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5616. "name": "./thinEngineOnly.ts",
  5617. "profile": {
  5618. "factory": 25,
  5619. "building": 1793
  5620. }
  5621. },
  5622. {
  5623. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5624. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5625. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5626. "profile": {
  5627. "factory": 10,
  5628. "building": 63
  5629. }
  5630. },
  5631. {
  5632. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  5633. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  5634. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5635. "profile": {
  5636. "factory": 6,
  5637. "building": 38,
  5638. "dependencies": 28
  5639. }
  5640. }
  5641. ],
  5642. "profile": {
  5643. "factory": 33,
  5644. "building": 7,
  5645. "dependencies": 10
  5646. },
  5647. "failed": false,
  5648. "errors": 0,
  5649. "warnings": 0,
  5650. "assets": [],
  5651. "reasons": [
  5652. {
  5653. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  5654. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  5655. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5656. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5657. "type": "harmony side effect evaluation",
  5658. "userRequest": "./baseError",
  5659. "loc": "7:0-40"
  5660. },
  5661. {
  5662. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  5663. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  5664. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5665. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5666. "type": "harmony import specifier",
  5667. "userRequest": "./baseError",
  5668. "loc": "21:8-17"
  5669. },
  5670. {
  5671. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  5672. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  5673. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5674. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5675. "type": "harmony import specifier",
  5676. "userRequest": "./baseError",
  5677. "loc": "31:2-11"
  5678. },
  5679. {
  5680. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  5681. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  5682. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5683. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5684. "type": "harmony import specifier",
  5685. "userRequest": "./baseError",
  5686. "loc": "45:8-17"
  5687. },
  5688. {
  5689. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  5690. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  5691. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5692. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5693. "type": "harmony import specifier",
  5694. "userRequest": "./baseError",
  5695. "loc": "49:2-11"
  5696. },
  5697. {
  5698. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  5699. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  5700. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5701. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5702. "type": "harmony import specifier",
  5703. "userRequest": "./baseError",
  5704. "loc": "63:8-17"
  5705. },
  5706. {
  5707. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  5708. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  5709. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5710. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  5711. "type": "harmony import specifier",
  5712. "userRequest": "./baseError",
  5713. "loc": "67:2-11"
  5714. }
  5715. ],
  5716. "providedExports": [
  5717. "BaseError"
  5718. ],
  5719. "optimizationBailout": [],
  5720. "depth": 3,
  5721. "source": "import { __extends } from \"tslib\";\r\n/**\r\n * @ignore\r\n * Application error to support additional information when loading a file\r\n */\r\nvar BaseError = /** @class */ (function (_super) {\r\n __extends(BaseError, _super);\r\n function BaseError() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n // See https://stackoverflow.com/questions/12915412/how-do-i-extend-a-host-object-e-g-error-in-typescript\r\n // and https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work\r\n // Polyfill for Object.setPrototypeOf if necessary.\r\n BaseError._setPrototypeOf = Object.setPrototypeOf || (function (o, proto) { o.__proto__ = proto; return o; });\r\n return BaseError;\r\n}(Error));\r\nexport { BaseError };\r\n//# sourceMappingURL=baseError.js.map"
  5722. },
  5723. {
  5724. "id": "../../.temp/packageES6Dev/core/Misc/canvasGenerator.js",
  5725. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\canvasGenerator.js",
  5726. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/canvasGenerator.js",
  5727. "index": 34,
  5728. "index2": 32,
  5729. "size": 845,
  5730. "cacheable": true,
  5731. "built": true,
  5732. "optional": false,
  5733. "prefetched": false,
  5734. "chunks": [
  5735. "thinEngineOnly"
  5736. ],
  5737. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5738. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5739. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5740. "issuerPath": [
  5741. {
  5742. "id": "./thinEngineOnly.ts",
  5743. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5744. "name": "./thinEngineOnly.ts",
  5745. "profile": {
  5746. "factory": 25,
  5747. "building": 1793
  5748. }
  5749. },
  5750. {
  5751. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5752. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5753. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5754. "profile": {
  5755. "factory": 10,
  5756. "building": 63
  5757. }
  5758. }
  5759. ],
  5760. "profile": {
  5761. "factory": 6,
  5762. "building": 38,
  5763. "dependencies": 28
  5764. },
  5765. "failed": false,
  5766. "errors": 0,
  5767. "warnings": 0,
  5768. "assets": [],
  5769. "reasons": [
  5770. {
  5771. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5772. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5773. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5774. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5775. "type": "harmony side effect evaluation",
  5776. "userRequest": "../Misc/canvasGenerator",
  5777. "loc": "15:0-58"
  5778. },
  5779. {
  5780. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5781. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5782. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5783. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5784. "type": "harmony import specifier",
  5785. "userRequest": "../Misc/canvasGenerator",
  5786. "loc": "731:30-45"
  5787. },
  5788. {
  5789. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5790. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5791. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5792. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5793. "type": "harmony import specifier",
  5794. "userRequest": "../Misc/canvasGenerator",
  5795. "loc": "3408:29-44"
  5796. }
  5797. ],
  5798. "providedExports": [
  5799. "CanvasGenerator"
  5800. ],
  5801. "optimizationBailout": [],
  5802. "depth": 2,
  5803. "source": "/**\r\n * Helper class used to generate a canvas to manipulate images\r\n */\r\nvar CanvasGenerator = /** @class */ (function () {\r\n function CanvasGenerator() {\r\n }\r\n /**\r\n * Create a new canvas (or offscreen canvas depending on the context)\r\n * @param width defines the expected width\r\n * @param height defines the expected height\r\n * @return a new canvas or offscreen canvas\r\n */\r\n CanvasGenerator.CreateCanvas = function (width, height) {\r\n if (typeof document === \"undefined\") {\r\n return new OffscreenCanvas(width, height);\r\n }\r\n var canvas = document.createElement(\"canvas\");\r\n canvas.width = width;\r\n canvas.height = height;\r\n return canvas;\r\n };\r\n return CanvasGenerator;\r\n}());\r\nexport { CanvasGenerator };\r\n//# sourceMappingURL=canvasGenerator.js.map"
  5804. },
  5805. {
  5806. "id": "../../.temp/packageES6Dev/core/Misc/devTools.js",
  5807. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\devTools.js",
  5808. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/devTools.js",
  5809. "index": 24,
  5810. "index2": 22,
  5811. "size": 347,
  5812. "cacheable": true,
  5813. "built": true,
  5814. "optional": false,
  5815. "prefetched": false,
  5816. "chunks": [
  5817. "thinEngineOnly"
  5818. ],
  5819. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5820. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5821. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5822. "issuerPath": [
  5823. {
  5824. "id": "./thinEngineOnly.ts",
  5825. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5826. "name": "./thinEngineOnly.ts",
  5827. "profile": {
  5828. "factory": 25,
  5829. "building": 1793
  5830. }
  5831. },
  5832. {
  5833. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5834. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5835. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5836. "profile": {
  5837. "factory": 10,
  5838. "building": 63
  5839. }
  5840. }
  5841. ],
  5842. "profile": {
  5843. "factory": 6,
  5844. "building": 38,
  5845. "dependencies": 28
  5846. },
  5847. "failed": false,
  5848. "errors": 0,
  5849. "warnings": 0,
  5850. "assets": [],
  5851. "reasons": [
  5852. {
  5853. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5854. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5855. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5856. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5857. "type": "harmony side effect evaluation",
  5858. "userRequest": "../Misc/devTools",
  5859. "loc": "3:0-45"
  5860. },
  5861. {
  5862. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5863. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5864. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5865. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5866. "type": "harmony import specifier",
  5867. "userRequest": "../Misc/devTools",
  5868. "loc": "2411:14-23"
  5869. },
  5870. {
  5871. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5872. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5873. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5874. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5875. "type": "harmony import specifier",
  5876. "userRequest": "../Misc/devTools",
  5877. "loc": "2427:14-23"
  5878. },
  5879. {
  5880. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5881. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5882. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5883. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5884. "type": "harmony import specifier",
  5885. "userRequest": "../Misc/devTools",
  5886. "loc": "2446:14-23"
  5887. },
  5888. {
  5889. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5890. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  5891. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5892. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5893. "type": "harmony side effect evaluation",
  5894. "userRequest": "../../Misc/devTools",
  5895. "loc": "3:0-48"
  5896. },
  5897. {
  5898. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5899. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  5900. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5901. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  5902. "type": "harmony import specifier",
  5903. "userRequest": "../../Misc/devTools",
  5904. "loc": "430:14-23"
  5905. }
  5906. ],
  5907. "providedExports": [
  5908. "_DevTools"
  5909. ],
  5910. "optimizationBailout": [],
  5911. "depth": 2,
  5912. "source": "/** @hidden */\r\nvar _DevTools = /** @class */ (function () {\r\n function _DevTools() {\r\n }\r\n _DevTools.WarnImport = function (name) {\r\n return name + \" needs to be imported before as it contains a side-effect required by your code.\";\r\n };\r\n return _DevTools;\r\n}());\r\nexport { _DevTools };\r\n//# sourceMappingURL=devTools.js.map"
  5913. },
  5914. {
  5915. "id": "../../.temp/packageES6Dev/core/Misc/domManagement.js",
  5916. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\domManagement.js",
  5917. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/domManagement.js",
  5918. "index": 5,
  5919. "index2": 2,
  5920. "size": 1249,
  5921. "cacheable": true,
  5922. "built": true,
  5923. "optional": false,
  5924. "prefetched": false,
  5925. "chunks": [
  5926. "thinEngineOnly"
  5927. ],
  5928. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5929. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5930. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5931. "issuerPath": [
  5932. {
  5933. "id": "./thinEngineOnly.ts",
  5934. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  5935. "name": "./thinEngineOnly.ts",
  5936. "profile": {
  5937. "factory": 25,
  5938. "building": 1793
  5939. }
  5940. },
  5941. {
  5942. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5943. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5944. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5945. "profile": {
  5946. "factory": 10,
  5947. "building": 63
  5948. }
  5949. }
  5950. ],
  5951. "profile": {
  5952. "factory": 6,
  5953. "building": 38,
  5954. "dependencies": 28
  5955. },
  5956. "failed": false,
  5957. "errors": 0,
  5958. "warnings": 0,
  5959. "assets": [],
  5960. "reasons": [
  5961. {
  5962. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5963. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5964. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5965. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5966. "type": "harmony side effect evaluation",
  5967. "userRequest": "../Misc/domManagement",
  5968. "loc": "10:0-54"
  5969. },
  5970. {
  5971. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5972. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5973. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5974. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5975. "type": "harmony import specifier",
  5976. "userRequest": "../Misc/domManagement",
  5977. "loc": "284:31-44"
  5978. },
  5979. {
  5980. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5981. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5982. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5983. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5984. "type": "harmony import specifier",
  5985. "userRequest": "../Misc/domManagement",
  5986. "loc": "844:13-26"
  5987. },
  5988. {
  5989. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5990. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  5991. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5992. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  5993. "type": "harmony import specifier",
  5994. "userRequest": "../Misc/domManagement",
  5995. "loc": "970:12-25"
  5996. },
  5997. {
  5998. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  5999. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6000. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6001. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6002. "type": "harmony import specifier",
  6003. "userRequest": "../Misc/domManagement",
  6004. "loc": "3020:12-25"
  6005. },
  6006. {
  6007. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6008. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6009. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6010. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6011. "type": "harmony import specifier",
  6012. "userRequest": "../Misc/domManagement",
  6013. "loc": "3485:13-26"
  6014. },
  6015. {
  6016. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6017. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6018. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6019. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6020. "type": "harmony side effect evaluation",
  6021. "userRequest": "../Misc/domManagement",
  6022. "loc": "2:0-54"
  6023. },
  6024. {
  6025. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6026. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6027. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6028. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6029. "type": "harmony import specifier",
  6030. "userRequest": "../Misc/domManagement",
  6031. "loc": "347:33-46"
  6032. },
  6033. {
  6034. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6035. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6036. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6037. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6038. "type": "harmony side effect evaluation",
  6039. "userRequest": "./domManagement",
  6040. "loc": "3:0-48"
  6041. },
  6042. {
  6043. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6044. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6045. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6046. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6047. "type": "harmony import specifier",
  6048. "userRequest": "./domManagement",
  6049. "loc": "334:106-119"
  6050. }
  6051. ],
  6052. "providedExports": [
  6053. "DomManagement"
  6054. ],
  6055. "optimizationBailout": [],
  6056. "depth": 2,
  6057. "source": "/**\r\n * Sets of helpers dealing with the DOM and some of the recurrent functions needed in\r\n * Babylon.js\r\n */\r\nvar DomManagement = /** @class */ (function () {\r\n function DomManagement() {\r\n }\r\n /**\r\n * Checks if the window object exists\r\n * @returns true if the window object exists\r\n */\r\n DomManagement.IsWindowObjectExist = function () {\r\n return (typeof window) !== \"undefined\";\r\n };\r\n /**\r\n * Checks if the navigator object exists\r\n * @returns true if the navigator object exists\r\n */\r\n DomManagement.IsNavigatorAvailable = function () {\r\n return (typeof navigator) !== \"undefined\";\r\n };\r\n /**\r\n * Extracts text content from a DOM element hierarchy\r\n * @param element defines the root element\r\n * @returns a string\r\n */\r\n DomManagement.GetDOMTextContent = function (element) {\r\n var result = \"\";\r\n var child = element.firstChild;\r\n while (child) {\r\n if (child.nodeType === 3) {\r\n result += child.textContent;\r\n }\r\n child = (child.nextSibling);\r\n }\r\n return result;\r\n };\r\n return DomManagement;\r\n}());\r\nexport { DomManagement };\r\n//# sourceMappingURL=domManagement.js.map"
  6058. },
  6059. {
  6060. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6061. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6062. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6063. "index": 19,
  6064. "index2": 19,
  6065. "size": 17892,
  6066. "cacheable": true,
  6067. "built": true,
  6068. "optional": false,
  6069. "prefetched": false,
  6070. "chunks": [
  6071. "thinEngineOnly"
  6072. ],
  6073. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6074. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6075. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6076. "issuerPath": [
  6077. {
  6078. "id": "./thinEngineOnly.ts",
  6079. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  6080. "name": "./thinEngineOnly.ts",
  6081. "profile": {
  6082. "factory": 25,
  6083. "building": 1793
  6084. }
  6085. },
  6086. {
  6087. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6088. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6089. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6090. "profile": {
  6091. "factory": 10,
  6092. "building": 63
  6093. }
  6094. }
  6095. ],
  6096. "profile": {
  6097. "factory": 6,
  6098. "building": 38,
  6099. "dependencies": 28
  6100. },
  6101. "failed": false,
  6102. "errors": 0,
  6103. "warnings": 0,
  6104. "assets": [],
  6105. "reasons": [
  6106. {
  6107. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  6108. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  6109. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  6110. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  6111. "type": "harmony side effect evaluation",
  6112. "userRequest": "../../Misc/fileTools",
  6113. "loc": "9:0-49"
  6114. },
  6115. {
  6116. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  6117. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderProcessor.js",
  6118. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  6119. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderProcessor.js",
  6120. "type": "harmony import specifier",
  6121. "userRequest": "../../Misc/fileTools",
  6122. "loc": "284:16-25"
  6123. },
  6124. {
  6125. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6126. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6127. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6128. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6129. "type": "harmony side effect evaluation",
  6130. "userRequest": "../Misc/fileTools",
  6131. "loc": "14:0-46"
  6132. },
  6133. {
  6134. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6135. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6136. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6137. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6138. "type": "harmony import specifier",
  6139. "userRequest": "../Misc/fileTools",
  6140. "loc": "2378:20-29"
  6141. },
  6142. {
  6143. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6144. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6145. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6146. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6147. "type": "harmony import specifier",
  6148. "userRequest": "../Misc/fileTools",
  6149. "loc": "2382:16-25"
  6150. },
  6151. {
  6152. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6153. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6154. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6155. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6156. "type": "harmony import specifier",
  6157. "userRequest": "../Misc/fileTools",
  6158. "loc": "3393:22-31"
  6159. }
  6160. ],
  6161. "providedExports": [
  6162. "LoadFileError",
  6163. "RequestFileError",
  6164. "ReadFileError",
  6165. "FileTools"
  6166. ],
  6167. "optimizationBailout": [],
  6168. "depth": 2,
  6169. "source": "import { __extends } from \"tslib\";\r\nimport { WebRequest } from './webRequest';\r\nimport { DomManagement } from './domManagement';\r\nimport { Observable } from './observable';\r\nimport { FilesInputStore } from './filesInputStore';\r\nimport { RetryStrategy } from './retryStrategy';\r\nimport { BaseError } from './baseError';\r\nimport { StringTools } from './stringTools';\r\n/** @ignore */\r\nvar LoadFileError = /** @class */ (function (_super) {\r\n __extends(LoadFileError, _super);\r\n /**\r\n * Creates a new LoadFileError\r\n * @param message defines the message of the error\r\n * @param request defines the optional web request\r\n * @param file defines the optional file\r\n */\r\n function LoadFileError(message, object) {\r\n var _this = _super.call(this, message) || this;\r\n _this.name = \"LoadFileError\";\r\n BaseError._setPrototypeOf(_this, LoadFileError.prototype);\r\n if (object instanceof WebRequest) {\r\n _this.request = object;\r\n }\r\n else {\r\n _this.file = object;\r\n }\r\n return _this;\r\n }\r\n return LoadFileError;\r\n}(BaseError));\r\nexport { LoadFileError };\r\n/** @ignore */\r\nvar RequestFileError = /** @class */ (function (_super) {\r\n __extends(RequestFileError, _super);\r\n /**\r\n * Creates a new LoadFileError\r\n * @param message defines the message of the error\r\n * @param request defines the optional web request\r\n */\r\n function RequestFileError(message, request) {\r\n var _this = _super.call(this, message) || this;\r\n _this.request = request;\r\n _this.name = \"RequestFileError\";\r\n BaseError._setPrototypeOf(_this, RequestFileError.prototype);\r\n return _this;\r\n }\r\n return RequestFileError;\r\n}(BaseError));\r\nexport { RequestFileError };\r\n/** @ignore */\r\nvar ReadFileError = /** @class */ (function (_super) {\r\n __extends(ReadFileError, _super);\r\n /**\r\n * Creates a new ReadFileError\r\n * @param message defines the message of the error\r\n * @param file defines the optional file\r\n */\r\n function ReadFileError(message, file) {\r\n var _this = _super.call(this, message) || this;\r\n _this.file = file;\r\n _this.name = \"ReadFileError\";\r\n BaseError._setPrototypeOf(_this, ReadFileError.prototype);\r\n return _this;\r\n }\r\n return ReadFileError;\r\n}(BaseError));\r\nexport { ReadFileError };\r\n/**\r\n * @hidden\r\n */\r\nvar FileTools = /** @class */ (function () {\r\n function FileTools() {\r\n }\r\n /**\r\n * Removes unwanted characters from an url\r\n * @param url defines the url to clean\r\n * @returns the cleaned url\r\n */\r\n FileTools._CleanUrl = function (url) {\r\n url = url.replace(/#/mg, \"%23\");\r\n return url;\r\n };\r\n /**\r\n * Sets the cors behavior on a dom element. This will add the required Tools.CorsBehavior to the element.\r\n * @param url define the url we are trying\r\n * @param element define the dom element where to configure the cors policy\r\n */\r\n FileTools.SetCorsBehavior = function (url, element) {\r\n if (url && url.indexOf(\"data:\") === 0) {\r\n return;\r\n }\r\n if (this.CorsBehavior) {\r\n if (typeof (this.CorsBehavior) === 'string' || this.CorsBehavior instanceof String) {\r\n element.crossOrigin = this.CorsBehavior;\r\n }\r\n else {\r\n var result = this.CorsBehavior(url);\r\n if (result) {\r\n element.crossOrigin = result;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Loads an image as an HTMLImageElement.\r\n * @param input url string, ArrayBuffer, or Blob to load\r\n * @param onLoad callback called when the image successfully loads\r\n * @param onError callback called when the image fails to load\r\n * @param offlineProvider offline provider for caching\r\n * @param mimeType optional mime type\r\n * @returns the HTMLImageElement of the loaded image\r\n */\r\n FileTools.LoadImage = function (input, onLoad, onError, offlineProvider, mimeType) {\r\n var url;\r\n var usingObjectURL = false;\r\n if (input instanceof ArrayBuffer || ArrayBuffer.isView(input)) {\r\n if (typeof Blob !== 'undefined') {\r\n url = URL.createObjectURL(new Blob([input]));\r\n usingObjectURL = true;\r\n }\r\n else {\r\n url = \"data:\" + (mimeType || \"image/jpg\") + \";base64,\" + StringTools.EncodeArrayBufferToBase64(input);\r\n }\r\n }\r\n else if (input instanceof Blob) {\r\n url = URL.createObjectURL(input);\r\n usingObjectURL = true;\r\n }\r\n else {\r\n url = this._CleanUrl(input);\r\n url = this.PreprocessUrl(input);\r\n }\r\n if (typeof Image === \"undefined\") {\r\n this.LoadFile(url, function (data) {\r\n createImageBitmap(new Blob([data])).then(function (imgBmp) {\r\n onLoad(imgBmp);\r\n if (usingObjectURL) {\r\n URL.revokeObjectURL(url);\r\n }\r\n }).catch(function (reason) {\r\n if (onError) {\r\n onError(\"Error while trying to load image: \" + input, reason);\r\n }\r\n });\r\n }, undefined, offlineProvider || undefined, true, function (request, exception) {\r\n if (onError) {\r\n onError(\"Error while trying to load image: \" + input, exception);\r\n }\r\n });\r\n return null;\r\n }\r\n var img = new Image();\r\n this.SetCorsBehavior(url, img);\r\n var loadHandler = function () {\r\n img.removeEventListener(\"load\", loadHandler);\r\n img.removeEventListener(\"error\", errorHandler);\r\n onLoad(img);\r\n // Must revoke the URL after calling onLoad to avoid security exceptions in\r\n // certain scenarios (e.g. when hosted in vscode).\r\n if (usingObjectURL && img.src) {\r\n URL.revokeObjectURL(img.src);\r\n }\r\n };\r\n var errorHandler = function (err) {\r\n img.removeEventListener(\"load\", loadHandler);\r\n img.removeEventListener(\"error\", errorHandler);\r\n if (onError) {\r\n onError(\"Error while trying to load image: \" + input, err);\r\n }\r\n if (usingObjectURL && img.src) {\r\n URL.revokeObjectURL(img.src);\r\n }\r\n };\r\n img.addEventListener(\"load\", loadHandler);\r\n img.addEventListener(\"error\", errorHandler);\r\n var noOfflineSupport = function () {\r\n img.src = url;\r\n };\r\n var loadFromOfflineSupport = function () {\r\n if (offlineProvider) {\r\n offlineProvider.loadImage(url, img);\r\n }\r\n };\r\n if (url.substr(0, 5) !== \"data:\" && offlineProvider && offlineProvider.enableTexturesOffline) {\r\n offlineProvider.open(loadFromOfflineSupport, noOfflineSupport);\r\n }\r\n else {\r\n if (url.indexOf(\"file:\") !== -1) {\r\n var textureName = decodeURIComponent(url.substring(5).toLowerCase());\r\n if (FilesInputStore.FilesToLoad[textureName]) {\r\n try {\r\n var blobURL;\r\n try {\r\n blobURL = URL.createObjectURL(FilesInputStore.FilesToLoad[textureName]);\r\n }\r\n catch (ex) {\r\n // Chrome doesn't support oneTimeOnly parameter\r\n blobURL = URL.createObjectURL(FilesInputStore.FilesToLoad[textureName]);\r\n }\r\n img.src = blobURL;\r\n usingObjectURL = true;\r\n }\r\n catch (e) {\r\n img.src = \"\";\r\n }\r\n return img;\r\n }\r\n }\r\n noOfflineSupport();\r\n }\r\n return img;\r\n };\r\n /**\r\n * Reads a file from a File object\r\n * @param file defines the file to load\r\n * @param onSuccess defines the callback to call when data is loaded\r\n * @param onProgress defines the callback to call during loading process\r\n * @param useArrayBuffer defines a boolean indicating that data must be returned as an ArrayBuffer\r\n * @param onError defines the callback to call when an error occurs\r\n * @returns a file request object\r\n */\r\n FileTools.ReadFile = function (file, onSuccess, onProgress, useArrayBuffer, onError) {\r\n var reader = new FileReader();\r\n var request = {\r\n onCompleteObservable: new Observable(),\r\n abort: function () { return reader.abort(); },\r\n };\r\n reader.onloadend = function (e) { return request.onCompleteObservable.notifyObservers(request); };\r\n if (onError) {\r\n reader.onerror = function (e) {\r\n onError(new ReadFileError(\"Unable to read \" + file.name, file));\r\n };\r\n }\r\n reader.onload = function (e) {\r\n //target doesn't have result from ts 1.3\r\n onSuccess(e.target['result']);\r\n };\r\n if (onProgress) {\r\n reader.onprogress = onProgress;\r\n }\r\n if (!useArrayBuffer) {\r\n // Asynchronous read\r\n reader.readAsText(file);\r\n }\r\n else {\r\n reader.readAsArrayBuffer(file);\r\n }\r\n return request;\r\n };\r\n /**\r\n * Loads a file from a url\r\n * @param url url to load\r\n * @param onSuccess callback called when the file successfully loads\r\n * @param onProgress callback called while file is loading (if the server supports this mode)\r\n * @param offlineProvider defines the offline provider for caching\r\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\r\n * @param onError callback called when the file fails to load\r\n * @returns a file request object\r\n */\r\n FileTools.LoadFile = function (url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError) {\r\n // If file and file input are set\r\n if (url.indexOf(\"file:\") !== -1) {\r\n var fileName = decodeURIComponent(url.substring(5).toLowerCase());\r\n var file = FilesInputStore.FilesToLoad[fileName];\r\n if (file) {\r\n return this.ReadFile(file, onSuccess, onProgress, useArrayBuffer, onError ? function (error) { return onError(undefined, new LoadFileError(error.message, error.file)); } : undefined);\r\n }\r\n }\r\n return this.RequestFile(url, function (data, request) {\r\n onSuccess(data, request ? request.responseURL : undefined);\r\n }, onProgress, offlineProvider, useArrayBuffer, onError ? function (error) {\r\n onError(error.request, new LoadFileError(error.message, error.request));\r\n } : undefined);\r\n };\r\n /**\r\n * Loads a file\r\n * @param url url to load\r\n * @param onSuccess callback called when the file successfully loads\r\n * @param onProgress callback called while file is loading (if the server supports this mode)\r\n * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer\r\n * @param onError callback called when the file fails to load\r\n * @param onOpened callback called when the web request is opened\r\n * @returns a file request object\r\n */\r\n FileTools.RequestFile = function (url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError, onOpened) {\r\n var _this = this;\r\n url = this._CleanUrl(url);\r\n url = this.PreprocessUrl(url);\r\n var loadUrl = this.BaseUrl + url;\r\n var aborted = false;\r\n var fileRequest = {\r\n onCompleteObservable: new Observable(),\r\n abort: function () { return aborted = true; },\r\n };\r\n var requestFile = function () {\r\n var request = new WebRequest();\r\n var retryHandle = null;\r\n fileRequest.abort = function () {\r\n aborted = true;\r\n if (request.readyState !== (XMLHttpRequest.DONE || 4)) {\r\n request.abort();\r\n }\r\n if (retryHandle !== null) {\r\n clearTimeout(retryHandle);\r\n retryHandle = null;\r\n }\r\n };\r\n var retryLoop = function (retryIndex) {\r\n request.open('GET', loadUrl);\r\n if (onOpened) {\r\n onOpened(request);\r\n }\r\n if (useArrayBuffer) {\r\n request.responseType = \"arraybuffer\";\r\n }\r\n if (onProgress) {\r\n request.addEventListener(\"progress\", onProgress);\r\n }\r\n var onLoadEnd = function () {\r\n request.removeEventListener(\"loadend\", onLoadEnd);\r\n fileRequest.onCompleteObservable.notifyObservers(fileRequest);\r\n fileRequest.onCompleteObservable.clear();\r\n };\r\n request.addEventListener(\"loadend\", onLoadEnd);\r\n var onReadyStateChange = function () {\r\n if (aborted) {\r\n return;\r\n }\r\n // In case of undefined state in some browsers.\r\n if (request.readyState === (XMLHttpRequest.DONE || 4)) {\r\n // Some browsers have issues where onreadystatechange can be called multiple times with the same value.\r\n request.removeEventListener(\"readystatechange\", onReadyStateChange);\r\n if ((request.status >= 200 && request.status < 300) || (request.status === 0 && (!DomManagement.IsWindowObjectExist() || _this.IsFileURL()))) {\r\n onSuccess(useArrayBuffer ? request.response : request.responseText, request);\r\n return;\r\n }\r\n var retryStrategy = _this.DefaultRetryStrategy;\r\n if (retryStrategy) {\r\n var waitTime = retryStrategy(loadUrl, request, retryIndex);\r\n if (waitTime !== -1) {\r\n // Prevent the request from completing for retry.\r\n request.removeEventListener(\"loadend\", onLoadEnd);\r\n request = new WebRequest();\r\n retryHandle = setTimeout(function () { return retryLoop(retryIndex + 1); }, waitTime);\r\n return;\r\n }\r\n }\r\n var error = new RequestFileError(\"Error status: \" + request.status + \" \" + request.statusText + \" - Unable to load \" + loadUrl, request);\r\n if (onError) {\r\n onError(error);\r\n }\r\n }\r\n };\r\n request.addEventListener(\"readystatechange\", onReadyStateChange);\r\n request.send();\r\n };\r\n retryLoop(0);\r\n };\r\n // Caching all files\r\n if (offlineProvider && offlineProvider.enableSceneOffline) {\r\n var noOfflineSupport_1 = function (request) {\r\n if (request && request.status > 400) {\r\n if (onError) {\r\n onError(request);\r\n }\r\n }\r\n else {\r\n requestFile();\r\n }\r\n };\r\n var loadFromOfflineSupport = function () {\r\n // TODO: database needs to support aborting and should return a IFileRequest\r\n if (offlineProvider) {\r\n offlineProvider.loadFile(_this.BaseUrl + url, function (data) {\r\n if (!aborted) {\r\n onSuccess(data);\r\n }\r\n fileRequest.onCompleteObservable.notifyObservers(fileRequest);\r\n }, onProgress ? function (event) {\r\n if (!aborted) {\r\n onProgress(event);\r\n }\r\n } : undefined, noOfflineSupport_1, useArrayBuffer);\r\n }\r\n };\r\n offlineProvider.open(loadFromOfflineSupport, noOfflineSupport_1);\r\n }\r\n else {\r\n requestFile();\r\n }\r\n return fileRequest;\r\n };\r\n /**\r\n * Checks if the loaded document was accessed via `file:`-Protocol.\r\n * @returns boolean\r\n */\r\n FileTools.IsFileURL = function () {\r\n return location.protocol === \"file:\";\r\n };\r\n /**\r\n * Gets or sets the retry strategy to apply when an error happens while loading an asset\r\n */\r\n FileTools.DefaultRetryStrategy = RetryStrategy.ExponentialBackoff();\r\n /**\r\n * Gets or sets the base URL to use to load assets\r\n */\r\n FileTools.BaseUrl = \"\";\r\n /**\r\n * Default behaviour for cors in the application.\r\n * It can be a string if the expected behavior is identical in the entire app.\r\n * Or a callback to be able to set it per url or on a group of them (in case of Video source for instance)\r\n */\r\n FileTools.CorsBehavior = \"anonymous\";\r\n /**\r\n * Gets or sets a function used to pre-process url before using them to load assets\r\n */\r\n FileTools.PreprocessUrl = function (url) {\r\n return url;\r\n };\r\n return FileTools;\r\n}());\r\nexport { FileTools };\r\n//# sourceMappingURL=fileTools.js.map"
  6170. },
  6171. {
  6172. "id": "../../.temp/packageES6Dev/core/Misc/filesInputStore.js",
  6173. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\filesInputStore.js",
  6174. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/filesInputStore.js",
  6175. "index": 21,
  6176. "index2": 16,
  6177. "size": 387,
  6178. "cacheable": true,
  6179. "built": true,
  6180. "optional": false,
  6181. "prefetched": false,
  6182. "chunks": [
  6183. "thinEngineOnly"
  6184. ],
  6185. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6186. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6187. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6188. "issuerPath": [
  6189. {
  6190. "id": "./thinEngineOnly.ts",
  6191. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  6192. "name": "./thinEngineOnly.ts",
  6193. "profile": {
  6194. "factory": 25,
  6195. "building": 1793
  6196. }
  6197. },
  6198. {
  6199. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6200. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6201. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6202. "profile": {
  6203. "factory": 10,
  6204. "building": 63
  6205. }
  6206. },
  6207. {
  6208. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6209. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6210. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6211. "profile": {
  6212. "factory": 6,
  6213. "building": 38,
  6214. "dependencies": 28
  6215. }
  6216. }
  6217. ],
  6218. "profile": {
  6219. "factory": 33,
  6220. "building": 7,
  6221. "dependencies": 10
  6222. },
  6223. "failed": false,
  6224. "errors": 0,
  6225. "warnings": 0,
  6226. "assets": [],
  6227. "reasons": [
  6228. {
  6229. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6230. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6231. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6232. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6233. "type": "harmony side effect evaluation",
  6234. "userRequest": "./filesInputStore",
  6235. "loc": "5:0-52"
  6236. },
  6237. {
  6238. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6239. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6240. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6241. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6242. "type": "harmony import specifier",
  6243. "userRequest": "./filesInputStore",
  6244. "loc": "191:20-35"
  6245. },
  6246. {
  6247. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6248. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6249. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6250. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6251. "type": "harmony import specifier",
  6252. "userRequest": "./filesInputStore",
  6253. "loc": "195:58-73"
  6254. },
  6255. {
  6256. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6257. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6258. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6259. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6260. "type": "harmony import specifier",
  6261. "userRequest": "./filesInputStore",
  6262. "loc": "199:58-73"
  6263. },
  6264. {
  6265. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6266. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6267. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6268. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6269. "type": "harmony import specifier",
  6270. "userRequest": "./filesInputStore",
  6271. "loc": "265:23-38"
  6272. }
  6273. ],
  6274. "providedExports": [
  6275. "FilesInputStore"
  6276. ],
  6277. "optimizationBailout": [],
  6278. "depth": 3,
  6279. "source": "/**\r\n * Class used to help managing file picking and drag'n'drop\r\n * File Storage\r\n */\r\nvar FilesInputStore = /** @class */ (function () {\r\n function FilesInputStore() {\r\n }\r\n /**\r\n * List of files ready to be loaded\r\n */\r\n FilesInputStore.FilesToLoad = {};\r\n return FilesInputStore;\r\n}());\r\nexport { FilesInputStore };\r\n//# sourceMappingURL=filesInputStore.js.map"
  6280. },
  6281. {
  6282. "id": "../../.temp/packageES6Dev/core/Misc/logger.js",
  6283. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\logger.js",
  6284. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/logger.js",
  6285. "index": 6,
  6286. "index2": 3,
  6287. "size": 4161,
  6288. "cacheable": true,
  6289. "built": true,
  6290. "optional": false,
  6291. "prefetched": false,
  6292. "chunks": [
  6293. "thinEngineOnly"
  6294. ],
  6295. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6296. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6297. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6298. "issuerPath": [
  6299. {
  6300. "id": "./thinEngineOnly.ts",
  6301. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  6302. "name": "./thinEngineOnly.ts",
  6303. "profile": {
  6304. "factory": 25,
  6305. "building": 1793
  6306. }
  6307. },
  6308. {
  6309. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6310. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6311. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6312. "profile": {
  6313. "factory": 10,
  6314. "building": 63
  6315. }
  6316. }
  6317. ],
  6318. "profile": {
  6319. "factory": 6,
  6320. "building": 38,
  6321. "dependencies": 28
  6322. },
  6323. "failed": false,
  6324. "errors": 0,
  6325. "warnings": 0,
  6326. "assets": [],
  6327. "reasons": [
  6328. {
  6329. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6330. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6331. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6332. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6333. "type": "harmony side effect evaluation",
  6334. "userRequest": "../Misc/logger",
  6335. "loc": "9:0-40"
  6336. },
  6337. {
  6338. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6339. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6340. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6341. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6342. "type": "harmony import specifier",
  6343. "userRequest": "../Misc/logger",
  6344. "loc": "211:20-26"
  6345. },
  6346. {
  6347. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6348. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6349. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6350. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6351. "type": "harmony import specifier",
  6352. "userRequest": "../Misc/logger",
  6353. "loc": "227:24-30"
  6354. },
  6355. {
  6356. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6357. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6358. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6359. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6360. "type": "harmony side effect evaluation",
  6361. "userRequest": "../Misc/logger",
  6362. "loc": "3:0-40"
  6363. },
  6364. {
  6365. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6366. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6367. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6368. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6369. "type": "harmony import specifier",
  6370. "userRequest": "../Misc/logger",
  6371. "loc": "482:8-14"
  6372. },
  6373. {
  6374. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6375. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6376. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6377. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6378. "type": "harmony import specifier",
  6379. "userRequest": "../Misc/logger",
  6380. "loc": "483:8-14"
  6381. },
  6382. {
  6383. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6384. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6385. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6386. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6387. "type": "harmony import specifier",
  6388. "userRequest": "../Misc/logger",
  6389. "loc": "486:8-14"
  6390. },
  6391. {
  6392. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6393. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6394. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6395. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6396. "type": "harmony import specifier",
  6397. "userRequest": "../Misc/logger",
  6398. "loc": "489:8-14"
  6399. },
  6400. {
  6401. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6402. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6403. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6404. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6405. "type": "harmony import specifier",
  6406. "userRequest": "../Misc/logger",
  6407. "loc": "490:8-14"
  6408. },
  6409. {
  6410. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6411. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6412. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6413. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6414. "type": "harmony import specifier",
  6415. "userRequest": "../Misc/logger",
  6416. "loc": "503:16-22"
  6417. }
  6418. ],
  6419. "providedExports": [
  6420. "Logger"
  6421. ],
  6422. "optimizationBailout": [],
  6423. "depth": 2,
  6424. "source": "/**\r\n * Logger used througouht the application to allow configuration of\r\n * the log level required for the messages.\r\n */\r\nvar Logger = /** @class */ (function () {\r\n function Logger() {\r\n }\r\n Logger._AddLogEntry = function (entry) {\r\n Logger._LogCache = entry + Logger._LogCache;\r\n if (Logger.OnNewCacheEntry) {\r\n Logger.OnNewCacheEntry(entry);\r\n }\r\n };\r\n Logger._FormatMessage = function (message) {\r\n var padStr = function (i) { return (i < 10) ? \"0\" + i : \"\" + i; };\r\n var date = new Date();\r\n return \"[\" + padStr(date.getHours()) + \":\" + padStr(date.getMinutes()) + \":\" + padStr(date.getSeconds()) + \"]: \" + message;\r\n };\r\n Logger._LogDisabled = function (message) {\r\n // nothing to do\r\n };\r\n Logger._LogEnabled = function (message) {\r\n var formattedMessage = Logger._FormatMessage(message);\r\n console.log(\"BJS - \" + formattedMessage);\r\n var entry = \"<div style='color:white'>\" + formattedMessage + \"</div><br>\";\r\n Logger._AddLogEntry(entry);\r\n };\r\n Logger._WarnDisabled = function (message) {\r\n // nothing to do\r\n };\r\n Logger._WarnEnabled = function (message) {\r\n var formattedMessage = Logger._FormatMessage(message);\r\n console.warn(\"BJS - \" + formattedMessage);\r\n var entry = \"<div style='color:orange'>\" + formattedMessage + \"</div><br>\";\r\n Logger._AddLogEntry(entry);\r\n };\r\n Logger._ErrorDisabled = function (message) {\r\n // nothing to do\r\n };\r\n Logger._ErrorEnabled = function (message) {\r\n Logger.errorsCount++;\r\n var formattedMessage = Logger._FormatMessage(message);\r\n console.error(\"BJS - \" + formattedMessage);\r\n var entry = \"<div style='color:red'>\" + formattedMessage + \"</div><br>\";\r\n Logger._AddLogEntry(entry);\r\n };\r\n Object.defineProperty(Logger, \"LogCache\", {\r\n /**\r\n * Gets current log cache (list of logs)\r\n */\r\n get: function () {\r\n return Logger._LogCache;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Clears the log cache\r\n */\r\n Logger.ClearLogCache = function () {\r\n Logger._LogCache = \"\";\r\n Logger.errorsCount = 0;\r\n };\r\n Object.defineProperty(Logger, \"LogLevels\", {\r\n /**\r\n * Sets the current log level (MessageLogLevel / WarningLogLevel / ErrorLogLevel)\r\n */\r\n set: function (level) {\r\n if ((level & Logger.MessageLogLevel) === Logger.MessageLogLevel) {\r\n Logger.Log = Logger._LogEnabled;\r\n }\r\n else {\r\n Logger.Log = Logger._LogDisabled;\r\n }\r\n if ((level & Logger.WarningLogLevel) === Logger.WarningLogLevel) {\r\n Logger.Warn = Logger._WarnEnabled;\r\n }\r\n else {\r\n Logger.Warn = Logger._WarnDisabled;\r\n }\r\n if ((level & Logger.ErrorLogLevel) === Logger.ErrorLogLevel) {\r\n Logger.Error = Logger._ErrorEnabled;\r\n }\r\n else {\r\n Logger.Error = Logger._ErrorDisabled;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * No log\r\n */\r\n Logger.NoneLogLevel = 0;\r\n /**\r\n * Only message logs\r\n */\r\n Logger.MessageLogLevel = 1;\r\n /**\r\n * Only warning logs\r\n */\r\n Logger.WarningLogLevel = 2;\r\n /**\r\n * Only error logs\r\n */\r\n Logger.ErrorLogLevel = 4;\r\n /**\r\n * All logs\r\n */\r\n Logger.AllLogLevel = 7;\r\n Logger._LogCache = \"\";\r\n /**\r\n * Gets a value indicating the number of loading errors\r\n * @ignorenaming\r\n */\r\n Logger.errorsCount = 0;\r\n /**\r\n * Log a message to the console\r\n */\r\n Logger.Log = Logger._LogEnabled;\r\n /**\r\n * Write a warning message to the console\r\n */\r\n Logger.Warn = Logger._WarnEnabled;\r\n /**\r\n * Write an error message to the console\r\n */\r\n Logger.Error = Logger._ErrorEnabled;\r\n return Logger;\r\n}());\r\nexport { Logger };\r\n//# sourceMappingURL=logger.js.map"
  6425. },
  6426. {
  6427. "id": "../../.temp/packageES6Dev/core/Misc/observable.js",
  6428. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\observable.js",
  6429. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/observable.js",
  6430. "index": 4,
  6431. "index2": 1,
  6432. "size": 17013,
  6433. "cacheable": true,
  6434. "built": true,
  6435. "optional": false,
  6436. "prefetched": false,
  6437. "chunks": [
  6438. "thinEngineOnly"
  6439. ],
  6440. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6441. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6442. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6443. "issuerPath": [
  6444. {
  6445. "id": "./thinEngineOnly.ts",
  6446. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  6447. "name": "./thinEngineOnly.ts",
  6448. "profile": {
  6449. "factory": 25,
  6450. "building": 1793
  6451. }
  6452. },
  6453. {
  6454. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6455. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6456. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6457. "profile": {
  6458. "factory": 10,
  6459. "building": 63
  6460. }
  6461. }
  6462. ],
  6463. "profile": {
  6464. "factory": 6,
  6465. "building": 38,
  6466. "dependencies": 28
  6467. },
  6468. "failed": false,
  6469. "errors": 0,
  6470. "warnings": 0,
  6471. "assets": [],
  6472. "reasons": [
  6473. {
  6474. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6475. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6476. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6477. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6478. "type": "harmony side effect evaluation",
  6479. "userRequest": "../Misc/observable",
  6480. "loc": "4:0-48"
  6481. },
  6482. {
  6483. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6484. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6485. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6486. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6487. "type": "harmony import specifier",
  6488. "userRequest": "../Misc/observable",
  6489. "loc": "81:43-53"
  6490. },
  6491. {
  6492. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6493. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6494. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6495. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6496. "type": "harmony import specifier",
  6497. "userRequest": "../Misc/observable",
  6498. "loc": "85:47-57"
  6499. },
  6500. {
  6501. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6502. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6503. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6504. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6505. "type": "harmony import specifier",
  6506. "userRequest": "../Misc/observable",
  6507. "loc": "131:49-59"
  6508. },
  6509. {
  6510. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  6511. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  6512. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  6513. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  6514. "type": "harmony side effect evaluation",
  6515. "userRequest": "../../Misc/observable",
  6516. "loc": "1:0-51"
  6517. },
  6518. {
  6519. "moduleId": "../../.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  6520. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\Textures\\internalTexture.js",
  6521. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  6522. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/Textures/internalTexture.js",
  6523. "type": "harmony import specifier",
  6524. "userRequest": "../../Misc/observable",
  6525. "loc": "118:38-48"
  6526. },
  6527. {
  6528. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6529. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6530. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6531. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6532. "type": "harmony side effect evaluation",
  6533. "userRequest": "../Misc/observable",
  6534. "loc": "1:0-48"
  6535. },
  6536. {
  6537. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6538. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6539. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6540. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6541. "type": "harmony import specifier",
  6542. "userRequest": "../Misc/observable",
  6543. "loc": "58:39-49"
  6544. },
  6545. {
  6546. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6547. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6548. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6549. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6550. "type": "harmony import specifier",
  6551. "userRequest": "../Misc/observable",
  6552. "loc": "62:37-47"
  6553. },
  6554. {
  6555. "moduleId": "../../.temp/packageES6Dev/core/Materials/effect.js",
  6556. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Materials\\effect.js",
  6557. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6558. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Materials/effect.js",
  6559. "type": "harmony import specifier",
  6560. "userRequest": "../Misc/observable",
  6561. "loc": "176:45-55"
  6562. },
  6563. {
  6564. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6565. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6566. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6567. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6568. "type": "harmony side effect evaluation",
  6569. "userRequest": "./observable",
  6570. "loc": "4:0-42"
  6571. },
  6572. {
  6573. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6574. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6575. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6576. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6577. "type": "harmony import specifier",
  6578. "userRequest": "./observable",
  6579. "loc": "226:38-48"
  6580. },
  6581. {
  6582. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6583. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6584. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6585. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6586. "type": "harmony import specifier",
  6587. "userRequest": "./observable",
  6588. "loc": "293:38-48"
  6589. }
  6590. ],
  6591. "providedExports": [
  6592. "EventState",
  6593. "Observer",
  6594. "MultiObserver",
  6595. "Observable"
  6596. ],
  6597. "optimizationBailout": [],
  6598. "depth": 2,
  6599. "source": "/**\r\n * A class serves as a medium between the observable and its observers\r\n */\r\nvar EventState = /** @class */ (function () {\r\n /**\r\n * Create a new EventState\r\n * @param mask defines the mask associated with this state\r\n * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true\r\n * @param target defines the original target of the state\r\n * @param currentTarget defines the current target of the state\r\n */\r\n function EventState(mask, skipNextObservers, target, currentTarget) {\r\n if (skipNextObservers === void 0) { skipNextObservers = false; }\r\n this.initalize(mask, skipNextObservers, target, currentTarget);\r\n }\r\n /**\r\n * Initialize the current event state\r\n * @param mask defines the mask associated with this state\r\n * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true\r\n * @param target defines the original target of the state\r\n * @param currentTarget defines the current target of the state\r\n * @returns the current event state\r\n */\r\n EventState.prototype.initalize = function (mask, skipNextObservers, target, currentTarget) {\r\n if (skipNextObservers === void 0) { skipNextObservers = false; }\r\n this.mask = mask;\r\n this.skipNextObservers = skipNextObservers;\r\n this.target = target;\r\n this.currentTarget = currentTarget;\r\n return this;\r\n };\r\n return EventState;\r\n}());\r\nexport { EventState };\r\n/**\r\n * Represent an Observer registered to a given Observable object.\r\n */\r\nvar Observer = /** @class */ (function () {\r\n /**\r\n * Creates a new observer\r\n * @param callback defines the callback to call when the observer is notified\r\n * @param mask defines the mask of the observer (used to filter notifications)\r\n * @param scope defines the current scope used to restore the JS context\r\n */\r\n function Observer(\r\n /**\r\n * Defines the callback to call when the observer is notified\r\n */\r\n callback, \r\n /**\r\n * Defines the mask of the observer (used to filter notifications)\r\n */\r\n mask, \r\n /**\r\n * Defines the current scope used to restore the JS context\r\n */\r\n scope) {\r\n if (scope === void 0) { scope = null; }\r\n this.callback = callback;\r\n this.mask = mask;\r\n this.scope = scope;\r\n /** @hidden */\r\n this._willBeUnregistered = false;\r\n /**\r\n * Gets or sets a property defining that the observer as to be unregistered after the next notification\r\n */\r\n this.unregisterOnNextCall = false;\r\n }\r\n return Observer;\r\n}());\r\nexport { Observer };\r\n/**\r\n * Represent a list of observers registered to multiple Observables object.\r\n */\r\nvar MultiObserver = /** @class */ (function () {\r\n function MultiObserver() {\r\n }\r\n /**\r\n * Release associated resources\r\n */\r\n MultiObserver.prototype.dispose = function () {\r\n if (this._observers && this._observables) {\r\n for (var index = 0; index < this._observers.length; index++) {\r\n this._observables[index].remove(this._observers[index]);\r\n }\r\n }\r\n this._observers = null;\r\n this._observables = null;\r\n };\r\n /**\r\n * Raise a callback when one of the observable will notify\r\n * @param observables defines a list of observables to watch\r\n * @param callback defines the callback to call on notification\r\n * @param mask defines the mask used to filter notifications\r\n * @param scope defines the current scope used to restore the JS context\r\n * @returns the new MultiObserver\r\n */\r\n MultiObserver.Watch = function (observables, callback, mask, scope) {\r\n if (mask === void 0) { mask = -1; }\r\n if (scope === void 0) { scope = null; }\r\n var result = new MultiObserver();\r\n result._observers = new Array();\r\n result._observables = observables;\r\n for (var _i = 0, observables_1 = observables; _i < observables_1.length; _i++) {\r\n var observable = observables_1[_i];\r\n var observer = observable.add(callback, mask, false, scope);\r\n if (observer) {\r\n result._observers.push(observer);\r\n }\r\n }\r\n return result;\r\n };\r\n return MultiObserver;\r\n}());\r\nexport { MultiObserver };\r\n/**\r\n * The Observable class is a simple implementation of the Observable pattern.\r\n *\r\n * There's one slight particularity though: a given Observable can notify its observer using a particular mask value, only the Observers registered with this mask value will be notified.\r\n * This enable a more fine grained execution without having to rely on multiple different Observable objects.\r\n * For instance you may have a given Observable that have four different types of notifications: Move (mask = 0x01), Stop (mask = 0x02), Turn Right (mask = 0X04), Turn Left (mask = 0X08).\r\n * A given observer can register itself with only Move and Stop (mask = 0x03), then it will only be notified when one of these two occurs and will never be for Turn Left/Right.\r\n */\r\nvar Observable = /** @class */ (function () {\r\n /**\r\n * Creates a new observable\r\n * @param onObserverAdded defines a callback to call when a new observer is added\r\n */\r\n function Observable(onObserverAdded) {\r\n this._observers = new Array();\r\n this._eventState = new EventState(0);\r\n if (onObserverAdded) {\r\n this._onObserverAdded = onObserverAdded;\r\n }\r\n }\r\n Object.defineProperty(Observable.prototype, \"observers\", {\r\n /**\r\n * Gets the list of observers\r\n */\r\n get: function () {\r\n return this._observers;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Create a new Observer with the specified callback\r\n * @param callback the callback that will be executed for that Observer\r\n * @param mask the mask used to filter observers\r\n * @param insertFirst if true the callback will be inserted at the first position, hence executed before the others ones. If false (default behavior) the callback will be inserted at the last position, executed after all the others already present.\r\n * @param scope optional scope for the callback to be called from\r\n * @param unregisterOnFirstCall defines if the observer as to be unregistered after the next notification\r\n * @returns the new observer created for the callback\r\n */\r\n Observable.prototype.add = function (callback, mask, insertFirst, scope, unregisterOnFirstCall) {\r\n if (mask === void 0) { mask = -1; }\r\n if (insertFirst === void 0) { insertFirst = false; }\r\n if (scope === void 0) { scope = null; }\r\n if (unregisterOnFirstCall === void 0) { unregisterOnFirstCall = false; }\r\n if (!callback) {\r\n return null;\r\n }\r\n var observer = new Observer(callback, mask, scope);\r\n observer.unregisterOnNextCall = unregisterOnFirstCall;\r\n if (insertFirst) {\r\n this._observers.unshift(observer);\r\n }\r\n else {\r\n this._observers.push(observer);\r\n }\r\n if (this._onObserverAdded) {\r\n this._onObserverAdded(observer);\r\n }\r\n return observer;\r\n };\r\n /**\r\n * Create a new Observer with the specified callback and unregisters after the next notification\r\n * @param callback the callback that will be executed for that Observer\r\n * @returns the new observer created for the callback\r\n */\r\n Observable.prototype.addOnce = function (callback) {\r\n return this.add(callback, undefined, undefined, undefined, true);\r\n };\r\n /**\r\n * Remove an Observer from the Observable object\r\n * @param observer the instance of the Observer to remove\r\n * @returns false if it doesn't belong to this Observable\r\n */\r\n Observable.prototype.remove = function (observer) {\r\n if (!observer) {\r\n return false;\r\n }\r\n var index = this._observers.indexOf(observer);\r\n if (index !== -1) {\r\n this._deferUnregister(observer);\r\n return true;\r\n }\r\n return false;\r\n };\r\n /**\r\n * Remove a callback from the Observable object\r\n * @param callback the callback to remove\r\n * @param scope optional scope. If used only the callbacks with this scope will be removed\r\n * @returns false if it doesn't belong to this Observable\r\n */\r\n Observable.prototype.removeCallback = function (callback, scope) {\r\n for (var index = 0; index < this._observers.length; index++) {\r\n var observer = this._observers[index];\r\n if (observer._willBeUnregistered) {\r\n continue;\r\n }\r\n if (observer.callback === callback && (!scope || scope === observer.scope)) {\r\n this._deferUnregister(observer);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Observable.prototype._deferUnregister = function (observer) {\r\n var _this = this;\r\n observer.unregisterOnNextCall = false;\r\n observer._willBeUnregistered = true;\r\n setTimeout(function () {\r\n _this._remove(observer);\r\n }, 0);\r\n };\r\n // This should only be called when not iterating over _observers to avoid callback skipping.\r\n // Removes an observer from the _observer Array.\r\n Observable.prototype._remove = function (observer) {\r\n if (!observer) {\r\n return false;\r\n }\r\n var index = this._observers.indexOf(observer);\r\n if (index !== -1) {\r\n this._observers.splice(index, 1);\r\n return true;\r\n }\r\n return false;\r\n };\r\n /**\r\n * Moves the observable to the top of the observer list making it get called first when notified\r\n * @param observer the observer to move\r\n */\r\n Observable.prototype.makeObserverTopPriority = function (observer) {\r\n this._remove(observer);\r\n this._observers.unshift(observer);\r\n };\r\n /**\r\n * Moves the observable to the bottom of the observer list making it get called last when notified\r\n * @param observer the observer to move\r\n */\r\n Observable.prototype.makeObserverBottomPriority = function (observer) {\r\n this._remove(observer);\r\n this._observers.push(observer);\r\n };\r\n /**\r\n * Notify all Observers by calling their respective callback with the given data\r\n * Will return true if all observers were executed, false if an observer set skipNextObservers to true, then prevent the subsequent ones to execute\r\n * @param eventData defines the data to send to all observers\r\n * @param mask defines the mask of the current notification (observers with incompatible mask (ie mask & observer.mask === 0) will not be notified)\r\n * @param target defines the original target of the state\r\n * @param currentTarget defines the current target of the state\r\n * @returns false if the complete observer chain was not processed (because one observer set the skipNextObservers to true)\r\n */\r\n Observable.prototype.notifyObservers = function (eventData, mask, target, currentTarget) {\r\n if (mask === void 0) { mask = -1; }\r\n if (!this._observers.length) {\r\n return true;\r\n }\r\n var state = this._eventState;\r\n state.mask = mask;\r\n state.target = target;\r\n state.currentTarget = currentTarget;\r\n state.skipNextObservers = false;\r\n state.lastReturnValue = eventData;\r\n for (var _i = 0, _a = this._observers; _i < _a.length; _i++) {\r\n var obs = _a[_i];\r\n if (obs._willBeUnregistered) {\r\n continue;\r\n }\r\n if (obs.mask & mask) {\r\n if (obs.scope) {\r\n state.lastReturnValue = obs.callback.apply(obs.scope, [eventData, state]);\r\n }\r\n else {\r\n state.lastReturnValue = obs.callback(eventData, state);\r\n }\r\n if (obs.unregisterOnNextCall) {\r\n this._deferUnregister(obs);\r\n }\r\n }\r\n if (state.skipNextObservers) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n /**\r\n * Calling this will execute each callback, expecting it to be a promise or return a value.\r\n * If at any point in the chain one function fails, the promise will fail and the execution will not continue.\r\n * This is useful when a chain of events (sometimes async events) is needed to initialize a certain object\r\n * and it is crucial that all callbacks will be executed.\r\n * The order of the callbacks is kept, callbacks are not executed parallel.\r\n *\r\n * @param eventData The data to be sent to each callback\r\n * @param mask is used to filter observers defaults to -1\r\n * @param target defines the callback target (see EventState)\r\n * @param currentTarget defines he current object in the bubbling phase\r\n * @returns {Promise<T>} will return a Promise than resolves when all callbacks executed successfully.\r\n */\r\n Observable.prototype.notifyObserversWithPromise = function (eventData, mask, target, currentTarget) {\r\n var _this = this;\r\n if (mask === void 0) { mask = -1; }\r\n // create an empty promise\r\n var p = Promise.resolve(eventData);\r\n // no observers? return this promise.\r\n if (!this._observers.length) {\r\n return p;\r\n }\r\n var state = this._eventState;\r\n state.mask = mask;\r\n state.target = target;\r\n state.currentTarget = currentTarget;\r\n state.skipNextObservers = false;\r\n // execute one callback after another (not using Promise.all, the order is important)\r\n this._observers.forEach(function (obs) {\r\n if (state.skipNextObservers) {\r\n return;\r\n }\r\n if (obs._willBeUnregistered) {\r\n return;\r\n }\r\n if (obs.mask & mask) {\r\n if (obs.scope) {\r\n p = p.then(function (lastReturnedValue) {\r\n state.lastReturnValue = lastReturnedValue;\r\n return obs.callback.apply(obs.scope, [eventData, state]);\r\n });\r\n }\r\n else {\r\n p = p.then(function (lastReturnedValue) {\r\n state.lastReturnValue = lastReturnedValue;\r\n return obs.callback(eventData, state);\r\n });\r\n }\r\n if (obs.unregisterOnNextCall) {\r\n _this._deferUnregister(obs);\r\n }\r\n }\r\n });\r\n // return the eventData\r\n return p.then(function () { return eventData; });\r\n };\r\n /**\r\n * Notify a specific observer\r\n * @param observer defines the observer to notify\r\n * @param eventData defines the data to be sent to each callback\r\n * @param mask is used to filter observers defaults to -1\r\n */\r\n Observable.prototype.notifyObserver = function (observer, eventData, mask) {\r\n if (mask === void 0) { mask = -1; }\r\n var state = this._eventState;\r\n state.mask = mask;\r\n state.skipNextObservers = false;\r\n observer.callback(eventData, state);\r\n };\r\n /**\r\n * Gets a boolean indicating if the observable has at least one observer\r\n * @returns true is the Observable has at least one Observer registered\r\n */\r\n Observable.prototype.hasObservers = function () {\r\n return this._observers.length > 0;\r\n };\r\n /**\r\n * Clear the list of observers\r\n */\r\n Observable.prototype.clear = function () {\r\n this._observers = new Array();\r\n this._onObserverAdded = null;\r\n };\r\n /**\r\n * Clone the current observable\r\n * @returns a new observable\r\n */\r\n Observable.prototype.clone = function () {\r\n var result = new Observable();\r\n result._observers = this._observers.slice(0);\r\n return result;\r\n };\r\n /**\r\n * Does this observable handles observer registered with a given mask\r\n * @param mask defines the mask to be tested\r\n * @return whether or not one observer registered with the given mask is handeled\r\n **/\r\n Observable.prototype.hasSpecificMask = function (mask) {\r\n if (mask === void 0) { mask = -1; }\r\n for (var _i = 0, _a = this._observers; _i < _a.length; _i++) {\r\n var obs = _a[_i];\r\n if (obs.mask & mask || obs.mask === mask) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n return Observable;\r\n}());\r\nexport { Observable };\r\n//# sourceMappingURL=observable.js.map"
  6600. },
  6601. {
  6602. "id": "../../.temp/packageES6Dev/core/Misc/retryStrategy.js",
  6603. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\retryStrategy.js",
  6604. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/retryStrategy.js",
  6605. "index": 22,
  6606. "index2": 17,
  6607. "size": 1030,
  6608. "cacheable": true,
  6609. "built": true,
  6610. "optional": false,
  6611. "prefetched": false,
  6612. "chunks": [
  6613. "thinEngineOnly"
  6614. ],
  6615. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6616. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6617. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6618. "issuerPath": [
  6619. {
  6620. "id": "./thinEngineOnly.ts",
  6621. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  6622. "name": "./thinEngineOnly.ts",
  6623. "profile": {
  6624. "factory": 25,
  6625. "building": 1793
  6626. }
  6627. },
  6628. {
  6629. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6630. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6631. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6632. "profile": {
  6633. "factory": 10,
  6634. "building": 63
  6635. }
  6636. },
  6637. {
  6638. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6639. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6640. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6641. "profile": {
  6642. "factory": 6,
  6643. "building": 38,
  6644. "dependencies": 28
  6645. }
  6646. }
  6647. ],
  6648. "profile": {
  6649. "factory": 33,
  6650. "building": 7,
  6651. "dependencies": 10
  6652. },
  6653. "failed": false,
  6654. "errors": 0,
  6655. "warnings": 0,
  6656. "assets": [],
  6657. "reasons": [
  6658. {
  6659. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6660. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6661. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6662. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6663. "type": "harmony side effect evaluation",
  6664. "userRequest": "./retryStrategy",
  6665. "loc": "6:0-48"
  6666. },
  6667. {
  6668. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6669. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6670. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6671. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6672. "type": "harmony import specifier",
  6673. "userRequest": "./retryStrategy",
  6674. "loc": "404:37-50"
  6675. }
  6676. ],
  6677. "providedExports": [
  6678. "RetryStrategy"
  6679. ],
  6680. "optimizationBailout": [],
  6681. "depth": 3,
  6682. "source": "/**\r\n * Class used to define a retry strategy when error happens while loading assets\r\n */\r\nvar RetryStrategy = /** @class */ (function () {\r\n function RetryStrategy() {\r\n }\r\n /**\r\n * Function used to defines an exponential back off strategy\r\n * @param maxRetries defines the maximum number of retries (3 by default)\r\n * @param baseInterval defines the interval between retries\r\n * @returns the strategy function to use\r\n */\r\n RetryStrategy.ExponentialBackoff = function (maxRetries, baseInterval) {\r\n if (maxRetries === void 0) { maxRetries = 3; }\r\n if (baseInterval === void 0) { baseInterval = 500; }\r\n return function (url, request, retryIndex) {\r\n if (request.status !== 0 || retryIndex >= maxRetries || url.indexOf(\"file:\") !== -1) {\r\n return -1;\r\n }\r\n return Math.pow(2, retryIndex) * baseInterval;\r\n };\r\n };\r\n return RetryStrategy;\r\n}());\r\nexport { RetryStrategy };\r\n//# sourceMappingURL=retryStrategy.js.map"
  6683. },
  6684. {
  6685. "id": "../../.temp/packageES6Dev/core/Misc/stringTools.js",
  6686. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\stringTools.js",
  6687. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/stringTools.js",
  6688. "index": 9,
  6689. "index2": 4,
  6690. "size": 2756,
  6691. "cacheable": true,
  6692. "built": true,
  6693. "optional": false,
  6694. "prefetched": false,
  6695. "chunks": [
  6696. "thinEngineOnly"
  6697. ],
  6698. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6699. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6700. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6701. "issuerPath": [
  6702. {
  6703. "id": "./thinEngineOnly.ts",
  6704. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  6705. "name": "./thinEngineOnly.ts",
  6706. "profile": {
  6707. "factory": 25,
  6708. "building": 1793
  6709. }
  6710. },
  6711. {
  6712. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6713. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6714. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6715. "profile": {
  6716. "factory": 10,
  6717. "building": 63
  6718. }
  6719. },
  6720. {
  6721. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6722. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6723. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6724. "profile": {
  6725. "factory": 6,
  6726. "building": 38,
  6727. "dependencies": 28
  6728. }
  6729. }
  6730. ],
  6731. "profile": {
  6732. "factory": 33,
  6733. "building": 7,
  6734. "dependencies": 10
  6735. },
  6736. "failed": false,
  6737. "errors": 0,
  6738. "warnings": 0,
  6739. "assets": [],
  6740. "reasons": [
  6741. {
  6742. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6743. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js",
  6744. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6745. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6746. "type": "harmony side effect evaluation",
  6747. "userRequest": "../../Misc/stringTools",
  6748. "loc": "1:0-53"
  6749. },
  6750. {
  6751. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6752. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js",
  6753. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6754. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6755. "type": "harmony import specifier",
  6756. "userRequest": "../../Misc/stringTools",
  6757. "loc": "20:52-63"
  6758. },
  6759. {
  6760. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6761. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js",
  6762. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6763. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6764. "type": "harmony import specifier",
  6765. "userRequest": "../../Misc/stringTools",
  6766. "loc": "23:55-66"
  6767. },
  6768. {
  6769. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6770. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeNode.js",
  6771. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6772. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeNode.js",
  6773. "type": "harmony import specifier",
  6774. "userRequest": "../../Misc/stringTools",
  6775. "loc": "26:93-104"
  6776. },
  6777. {
  6778. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6779. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6780. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6781. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6782. "type": "harmony side effect evaluation",
  6783. "userRequest": "./stringTools",
  6784. "loc": "8:0-44"
  6785. },
  6786. {
  6787. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6788. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6789. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6790. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6791. "type": "harmony import specifier",
  6792. "userRequest": "./stringTools",
  6793. "loc": "123:73-84"
  6794. }
  6795. ],
  6796. "providedExports": [
  6797. "StringTools"
  6798. ],
  6799. "optimizationBailout": [],
  6800. "depth": 3,
  6801. "source": "/**\r\n * Helper to manipulate strings\r\n */\r\nvar StringTools = /** @class */ (function () {\r\n function StringTools() {\r\n }\r\n /**\r\n * Checks for a matching suffix at the end of a string (for ES5 and lower)\r\n * @param str Source string\r\n * @param suffix Suffix to search for in the source string\r\n * @returns Boolean indicating whether the suffix was found (true) or not (false)\r\n */\r\n StringTools.EndsWith = function (str, suffix) {\r\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\r\n };\r\n /**\r\n * Checks for a matching suffix at the beginning of a string (for ES5 and lower)\r\n * @param str Source string\r\n * @param suffix Suffix to search for in the source string\r\n * @returns Boolean indicating whether the suffix was found (true) or not (false)\r\n */\r\n StringTools.StartsWith = function (str, suffix) {\r\n return str.indexOf(suffix) === 0;\r\n };\r\n /**\r\n * Decodes a buffer into a string\r\n * @param buffer The buffer to decode\r\n * @returns The decoded string\r\n */\r\n StringTools.Decode = function (buffer) {\r\n if (typeof TextDecoder !== \"undefined\") {\r\n return new TextDecoder().decode(buffer);\r\n }\r\n var result = \"\";\r\n for (var i = 0; i < buffer.byteLength; i++) {\r\n result += String.fromCharCode(buffer[i]);\r\n }\r\n return result;\r\n };\r\n /**\r\n * Encode a buffer to a base64 string\r\n * @param buffer defines the buffer to encode\r\n * @returns the encoded string\r\n */\r\n StringTools.EncodeArrayBufferToBase64 = function (buffer) {\r\n var keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\r\n var output = \"\";\r\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\r\n var i = 0;\r\n var bytes = ArrayBuffer.isView(buffer) ? new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) : new Uint8Array(buffer);\r\n while (i < bytes.length) {\r\n chr1 = bytes[i++];\r\n chr2 = i < bytes.length ? bytes[i++] : Number.NaN;\r\n chr3 = i < bytes.length ? bytes[i++] : Number.NaN;\r\n enc1 = chr1 >> 2;\r\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\r\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\r\n enc4 = chr3 & 63;\r\n if (isNaN(chr2)) {\r\n enc3 = enc4 = 64;\r\n }\r\n else if (isNaN(chr3)) {\r\n enc4 = 64;\r\n }\r\n output += keyStr.charAt(enc1) + keyStr.charAt(enc2) +\r\n keyStr.charAt(enc3) + keyStr.charAt(enc4);\r\n }\r\n return output;\r\n };\r\n return StringTools;\r\n}());\r\nexport { StringTools };\r\n//# sourceMappingURL=stringTools.js.map"
  6802. },
  6803. {
  6804. "id": "../../.temp/packageES6Dev/core/Misc/webRequest.js",
  6805. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\webRequest.js",
  6806. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/webRequest.js",
  6807. "index": 20,
  6808. "index2": 15,
  6809. "size": 5569,
  6810. "cacheable": true,
  6811. "built": true,
  6812. "optional": false,
  6813. "prefetched": false,
  6814. "chunks": [
  6815. "thinEngineOnly"
  6816. ],
  6817. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6818. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6819. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6820. "issuerPath": [
  6821. {
  6822. "id": "./thinEngineOnly.ts",
  6823. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  6824. "name": "./thinEngineOnly.ts",
  6825. "profile": {
  6826. "factory": 25,
  6827. "building": 1793
  6828. }
  6829. },
  6830. {
  6831. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6832. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6833. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6834. "profile": {
  6835. "factory": 10,
  6836. "building": 63
  6837. }
  6838. },
  6839. {
  6840. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6841. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6842. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6843. "profile": {
  6844. "factory": 6,
  6845. "building": 38,
  6846. "dependencies": 28
  6847. }
  6848. }
  6849. ],
  6850. "profile": {
  6851. "factory": 33,
  6852. "building": 7,
  6853. "dependencies": 10
  6854. },
  6855. "failed": false,
  6856. "errors": 0,
  6857. "warnings": 0,
  6858. "assets": [],
  6859. "reasons": [
  6860. {
  6861. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6862. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6863. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6864. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6865. "type": "harmony side effect evaluation",
  6866. "userRequest": "./webRequest",
  6867. "loc": "2:0-42"
  6868. },
  6869. {
  6870. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6871. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6872. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6873. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6874. "type": "harmony import specifier",
  6875. "userRequest": "./webRequest",
  6876. "loc": "22:30-40"
  6877. },
  6878. {
  6879. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6880. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6881. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6882. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6883. "type": "harmony import specifier",
  6884. "userRequest": "./webRequest",
  6885. "loc": "297:30-40"
  6886. },
  6887. {
  6888. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  6889. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  6890. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6891. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  6892. "type": "harmony import specifier",
  6893. "userRequest": "./webRequest",
  6894. "loc": "344:46-56"
  6895. }
  6896. ],
  6897. "providedExports": [
  6898. "WebRequest"
  6899. ],
  6900. "optimizationBailout": [],
  6901. "depth": 3,
  6902. "source": "/**\r\n * Extended version of XMLHttpRequest with support for customizations (headers, ...)\r\n */\r\nvar WebRequest = /** @class */ (function () {\r\n function WebRequest() {\r\n this._xhr = new XMLHttpRequest();\r\n }\r\n WebRequest.prototype._injectCustomRequestHeaders = function () {\r\n for (var key in WebRequest.CustomRequestHeaders) {\r\n var val = WebRequest.CustomRequestHeaders[key];\r\n if (val) {\r\n this._xhr.setRequestHeader(key, val);\r\n }\r\n }\r\n };\r\n Object.defineProperty(WebRequest.prototype, \"onprogress\", {\r\n /**\r\n * Gets or sets a function to be called when loading progress changes\r\n */\r\n get: function () {\r\n return this._xhr.onprogress;\r\n },\r\n set: function (value) {\r\n this._xhr.onprogress = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"readyState\", {\r\n /**\r\n * Returns client's state\r\n */\r\n get: function () {\r\n return this._xhr.readyState;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"status\", {\r\n /**\r\n * Returns client's status\r\n */\r\n get: function () {\r\n return this._xhr.status;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"statusText\", {\r\n /**\r\n * Returns client's status as a text\r\n */\r\n get: function () {\r\n return this._xhr.statusText;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"response\", {\r\n /**\r\n * Returns client's response\r\n */\r\n get: function () {\r\n return this._xhr.response;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"responseURL\", {\r\n /**\r\n * Returns client's response url\r\n */\r\n get: function () {\r\n return this._xhr.responseURL;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"responseText\", {\r\n /**\r\n * Returns client's response as text\r\n */\r\n get: function () {\r\n return this._xhr.responseText;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(WebRequest.prototype, \"responseType\", {\r\n /**\r\n * Gets or sets the expected response type\r\n */\r\n get: function () {\r\n return this._xhr.responseType;\r\n },\r\n set: function (value) {\r\n this._xhr.responseType = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n WebRequest.prototype.addEventListener = function (type, listener, options) {\r\n this._xhr.addEventListener(type, listener, options);\r\n };\r\n WebRequest.prototype.removeEventListener = function (type, listener, options) {\r\n this._xhr.removeEventListener(type, listener, options);\r\n };\r\n /**\r\n * Cancels any network activity\r\n */\r\n WebRequest.prototype.abort = function () {\r\n this._xhr.abort();\r\n };\r\n /**\r\n * Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD\r\n * @param body defines an optional request body\r\n */\r\n WebRequest.prototype.send = function (body) {\r\n if (WebRequest.CustomRequestHeaders) {\r\n this._injectCustomRequestHeaders();\r\n }\r\n this._xhr.send(body);\r\n };\r\n /**\r\n * Sets the request method, request URL\r\n * @param method defines the method to use (GET, POST, etc..)\r\n * @param url defines the url to connect with\r\n */\r\n WebRequest.prototype.open = function (method, url) {\r\n for (var _i = 0, _a = WebRequest.CustomRequestModifiers; _i < _a.length; _i++) {\r\n var update = _a[_i];\r\n update(this._xhr, url);\r\n }\r\n // Clean url\r\n url = url.replace(\"file:http:\", \"http:\");\r\n url = url.replace(\"file:https:\", \"https:\");\r\n return this._xhr.open(method, url, true);\r\n };\r\n /**\r\n * Sets the value of a request header.\r\n * @param name The name of the header whose value is to be set\r\n * @param value The value to set as the body of the header\r\n */\r\n WebRequest.prototype.setRequestHeader = function (name, value) {\r\n this._xhr.setRequestHeader(name, value);\r\n };\r\n /**\r\n * Get the string containing the text of a particular header's value.\r\n * @param name The name of the header\r\n * @returns The string containing the text of the given header name\r\n */\r\n WebRequest.prototype.getResponseHeader = function (name) {\r\n return this._xhr.getResponseHeader(name);\r\n };\r\n /**\r\n * Custom HTTP Request Headers to be sent with XMLHttpRequests\r\n * i.e. when loading files, where the server/service expects an Authorization header\r\n */\r\n WebRequest.CustomRequestHeaders = {};\r\n /**\r\n * Add callback functions in this array to update all the requests before they get sent to the network\r\n */\r\n WebRequest.CustomRequestModifiers = new Array();\r\n return WebRequest;\r\n}());\r\nexport { WebRequest };\r\n//# sourceMappingURL=webRequest.js.map"
  6903. },
  6904. {
  6905. "id": "../../.temp/packageES6Dev/core/States/alphaCullingState.js",
  6906. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\States\\alphaCullingState.js",
  6907. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/alphaCullingState.js",
  6908. "index": 27,
  6909. "index2": 25,
  6910. "size": 4862,
  6911. "cacheable": true,
  6912. "built": true,
  6913. "optional": false,
  6914. "prefetched": false,
  6915. "chunks": [
  6916. "thinEngineOnly"
  6917. ],
  6918. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6919. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6920. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6921. "issuerPath": [
  6922. {
  6923. "id": "./thinEngineOnly.ts",
  6924. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  6925. "name": "./thinEngineOnly.ts",
  6926. "profile": {
  6927. "factory": 25,
  6928. "building": 1793
  6929. }
  6930. },
  6931. {
  6932. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6933. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6934. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6935. "profile": {
  6936. "factory": 10,
  6937. "building": 63
  6938. }
  6939. }
  6940. ],
  6941. "profile": {
  6942. "factory": 6,
  6943. "building": 38,
  6944. "dependencies": 28
  6945. },
  6946. "failed": false,
  6947. "errors": 0,
  6948. "warnings": 0,
  6949. "assets": [],
  6950. "reasons": [
  6951. {
  6952. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6953. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6954. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6955. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6956. "type": "harmony side effect evaluation",
  6957. "userRequest": "../States/alphaCullingState",
  6958. "loc": "7:0-57"
  6959. },
  6960. {
  6961. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6962. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6963. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6964. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6965. "type": "harmony import specifier",
  6966. "userRequest": "../States/alphaCullingState",
  6967. "loc": "99:31-41"
  6968. }
  6969. ],
  6970. "providedExports": [
  6971. "AlphaState"
  6972. ],
  6973. "optimizationBailout": [],
  6974. "depth": 2,
  6975. "source": "/**\r\n * @hidden\r\n **/\r\nvar AlphaState = /** @class */ (function () {\r\n /**\r\n * Initializes the state.\r\n */\r\n function AlphaState() {\r\n this._isAlphaBlendDirty = false;\r\n this._isBlendFunctionParametersDirty = false;\r\n this._isBlendEquationParametersDirty = false;\r\n this._isBlendConstantsDirty = false;\r\n this._alphaBlend = false;\r\n this._blendFunctionParameters = new Array(4);\r\n this._blendEquationParameters = new Array(2);\r\n this._blendConstants = new Array(4);\r\n this.reset();\r\n }\r\n Object.defineProperty(AlphaState.prototype, \"isDirty\", {\r\n get: function () {\r\n return this._isAlphaBlendDirty || this._isBlendFunctionParametersDirty;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AlphaState.prototype, \"alphaBlend\", {\r\n get: function () {\r\n return this._alphaBlend;\r\n },\r\n set: function (value) {\r\n if (this._alphaBlend === value) {\r\n return;\r\n }\r\n this._alphaBlend = value;\r\n this._isAlphaBlendDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n AlphaState.prototype.setAlphaBlendConstants = function (r, g, b, a) {\r\n if (this._blendConstants[0] === r &&\r\n this._blendConstants[1] === g &&\r\n this._blendConstants[2] === b &&\r\n this._blendConstants[3] === a) {\r\n return;\r\n }\r\n this._blendConstants[0] = r;\r\n this._blendConstants[1] = g;\r\n this._blendConstants[2] = b;\r\n this._blendConstants[3] = a;\r\n this._isBlendConstantsDirty = true;\r\n };\r\n AlphaState.prototype.setAlphaBlendFunctionParameters = function (value0, value1, value2, value3) {\r\n if (this._blendFunctionParameters[0] === value0 &&\r\n this._blendFunctionParameters[1] === value1 &&\r\n this._blendFunctionParameters[2] === value2 &&\r\n this._blendFunctionParameters[3] === value3) {\r\n return;\r\n }\r\n this._blendFunctionParameters[0] = value0;\r\n this._blendFunctionParameters[1] = value1;\r\n this._blendFunctionParameters[2] = value2;\r\n this._blendFunctionParameters[3] = value3;\r\n this._isBlendFunctionParametersDirty = true;\r\n };\r\n AlphaState.prototype.setAlphaEquationParameters = function (rgb, alpha) {\r\n if (this._blendEquationParameters[0] === rgb &&\r\n this._blendEquationParameters[1] === alpha) {\r\n return;\r\n }\r\n this._blendEquationParameters[0] = rgb;\r\n this._blendEquationParameters[1] = alpha;\r\n this._isBlendEquationParametersDirty = true;\r\n };\r\n AlphaState.prototype.reset = function () {\r\n this._alphaBlend = false;\r\n this._blendFunctionParameters[0] = null;\r\n this._blendFunctionParameters[1] = null;\r\n this._blendFunctionParameters[2] = null;\r\n this._blendFunctionParameters[3] = null;\r\n this._blendEquationParameters[0] = null;\r\n this._blendEquationParameters[1] = null;\r\n this._blendConstants[0] = null;\r\n this._blendConstants[1] = null;\r\n this._blendConstants[2] = null;\r\n this._blendConstants[3] = null;\r\n this._isAlphaBlendDirty = true;\r\n this._isBlendFunctionParametersDirty = false;\r\n this._isBlendEquationParametersDirty = false;\r\n this._isBlendConstantsDirty = false;\r\n };\r\n AlphaState.prototype.apply = function (gl) {\r\n if (!this.isDirty) {\r\n return;\r\n }\r\n // Alpha blend\r\n if (this._isAlphaBlendDirty) {\r\n if (this._alphaBlend) {\r\n gl.enable(gl.BLEND);\r\n }\r\n else {\r\n gl.disable(gl.BLEND);\r\n }\r\n this._isAlphaBlendDirty = false;\r\n }\r\n // Alpha function\r\n if (this._isBlendFunctionParametersDirty) {\r\n gl.blendFuncSeparate(this._blendFunctionParameters[0], this._blendFunctionParameters[1], this._blendFunctionParameters[2], this._blendFunctionParameters[3]);\r\n this._isBlendFunctionParametersDirty = false;\r\n }\r\n // Alpha equation\r\n if (this._isBlendEquationParametersDirty) {\r\n gl.blendEquationSeparate(this._blendEquationParameters[0], this._blendEquationParameters[1]);\r\n this._isBlendEquationParametersDirty = false;\r\n }\r\n // Constants\r\n if (this._isBlendConstantsDirty) {\r\n gl.blendColor(this._blendConstants[0], this._blendConstants[1], this._blendConstants[2], this._blendConstants[3]);\r\n this._isBlendConstantsDirty = false;\r\n }\r\n };\r\n return AlphaState;\r\n}());\r\nexport { AlphaState };\r\n//# sourceMappingURL=alphaCullingState.js.map"
  6976. },
  6977. {
  6978. "id": "../../.temp/packageES6Dev/core/States/depthCullingState.js",
  6979. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\States\\depthCullingState.js",
  6980. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/depthCullingState.js",
  6981. "index": 25,
  6982. "index2": 23,
  6983. "size": 6119,
  6984. "cacheable": true,
  6985. "built": true,
  6986. "optional": false,
  6987. "prefetched": false,
  6988. "chunks": [
  6989. "thinEngineOnly"
  6990. ],
  6991. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  6992. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  6993. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  6994. "issuerPath": [
  6995. {
  6996. "id": "./thinEngineOnly.ts",
  6997. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  6998. "name": "./thinEngineOnly.ts",
  6999. "profile": {
  7000. "factory": 25,
  7001. "building": 1793
  7002. }
  7003. },
  7004. {
  7005. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  7006. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  7007. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7008. "profile": {
  7009. "factory": 10,
  7010. "building": 63
  7011. }
  7012. }
  7013. ],
  7014. "profile": {
  7015. "factory": 6,
  7016. "building": 38,
  7017. "dependencies": 28
  7018. },
  7019. "failed": false,
  7020. "errors": 0,
  7021. "warnings": 0,
  7022. "assets": [],
  7023. "reasons": [
  7024. {
  7025. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  7026. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  7027. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7028. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7029. "type": "harmony side effect evaluation",
  7030. "userRequest": "../States/depthCullingState",
  7031. "loc": "5:0-64"
  7032. },
  7033. {
  7034. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  7035. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  7036. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7037. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7038. "type": "harmony import specifier",
  7039. "userRequest": "../States/depthCullingState",
  7040. "loc": "95:38-55"
  7041. }
  7042. ],
  7043. "providedExports": [
  7044. "DepthCullingState"
  7045. ],
  7046. "optimizationBailout": [],
  7047. "depth": 2,
  7048. "source": "/**\r\n * @hidden\r\n **/\r\nvar DepthCullingState = /** @class */ (function () {\r\n /**\r\n * Initializes the state.\r\n */\r\n function DepthCullingState() {\r\n this._isDepthTestDirty = false;\r\n this._isDepthMaskDirty = false;\r\n this._isDepthFuncDirty = false;\r\n this._isCullFaceDirty = false;\r\n this._isCullDirty = false;\r\n this._isZOffsetDirty = false;\r\n this._isFrontFaceDirty = false;\r\n this.reset();\r\n }\r\n Object.defineProperty(DepthCullingState.prototype, \"isDirty\", {\r\n get: function () {\r\n return this._isDepthFuncDirty || this._isDepthTestDirty || this._isDepthMaskDirty || this._isCullFaceDirty || this._isCullDirty || this._isZOffsetDirty || this._isFrontFaceDirty;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"zOffset\", {\r\n get: function () {\r\n return this._zOffset;\r\n },\r\n set: function (value) {\r\n if (this._zOffset === value) {\r\n return;\r\n }\r\n this._zOffset = value;\r\n this._isZOffsetDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"cullFace\", {\r\n get: function () {\r\n return this._cullFace;\r\n },\r\n set: function (value) {\r\n if (this._cullFace === value) {\r\n return;\r\n }\r\n this._cullFace = value;\r\n this._isCullFaceDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"cull\", {\r\n get: function () {\r\n return this._cull;\r\n },\r\n set: function (value) {\r\n if (this._cull === value) {\r\n return;\r\n }\r\n this._cull = value;\r\n this._isCullDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"depthFunc\", {\r\n get: function () {\r\n return this._depthFunc;\r\n },\r\n set: function (value) {\r\n if (this._depthFunc === value) {\r\n return;\r\n }\r\n this._depthFunc = value;\r\n this._isDepthFuncDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"depthMask\", {\r\n get: function () {\r\n return this._depthMask;\r\n },\r\n set: function (value) {\r\n if (this._depthMask === value) {\r\n return;\r\n }\r\n this._depthMask = value;\r\n this._isDepthMaskDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"depthTest\", {\r\n get: function () {\r\n return this._depthTest;\r\n },\r\n set: function (value) {\r\n if (this._depthTest === value) {\r\n return;\r\n }\r\n this._depthTest = value;\r\n this._isDepthTestDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DepthCullingState.prototype, \"frontFace\", {\r\n get: function () {\r\n return this._frontFace;\r\n },\r\n set: function (value) {\r\n if (this._frontFace === value) {\r\n return;\r\n }\r\n this._frontFace = value;\r\n this._isFrontFaceDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n DepthCullingState.prototype.reset = function () {\r\n this._depthMask = true;\r\n this._depthTest = true;\r\n this._depthFunc = null;\r\n this._cullFace = null;\r\n this._cull = null;\r\n this._zOffset = 0;\r\n this._frontFace = null;\r\n this._isDepthTestDirty = true;\r\n this._isDepthMaskDirty = true;\r\n this._isDepthFuncDirty = false;\r\n this._isCullFaceDirty = false;\r\n this._isCullDirty = false;\r\n this._isZOffsetDirty = false;\r\n this._isFrontFaceDirty = false;\r\n };\r\n DepthCullingState.prototype.apply = function (gl) {\r\n if (!this.isDirty) {\r\n return;\r\n }\r\n // Cull\r\n if (this._isCullDirty) {\r\n if (this.cull) {\r\n gl.enable(gl.CULL_FACE);\r\n }\r\n else {\r\n gl.disable(gl.CULL_FACE);\r\n }\r\n this._isCullDirty = false;\r\n }\r\n // Cull face\r\n if (this._isCullFaceDirty) {\r\n gl.cullFace(this.cullFace);\r\n this._isCullFaceDirty = false;\r\n }\r\n // Depth mask\r\n if (this._isDepthMaskDirty) {\r\n gl.depthMask(this.depthMask);\r\n this._isDepthMaskDirty = false;\r\n }\r\n // Depth test\r\n if (this._isDepthTestDirty) {\r\n if (this.depthTest) {\r\n gl.enable(gl.DEPTH_TEST);\r\n }\r\n else {\r\n gl.disable(gl.DEPTH_TEST);\r\n }\r\n this._isDepthTestDirty = false;\r\n }\r\n // Depth func\r\n if (this._isDepthFuncDirty) {\r\n gl.depthFunc(this.depthFunc);\r\n this._isDepthFuncDirty = false;\r\n }\r\n // zOffset\r\n if (this._isZOffsetDirty) {\r\n if (this.zOffset) {\r\n gl.enable(gl.POLYGON_OFFSET_FILL);\r\n gl.polygonOffset(this.zOffset, 0);\r\n }\r\n else {\r\n gl.disable(gl.POLYGON_OFFSET_FILL);\r\n }\r\n this._isZOffsetDirty = false;\r\n }\r\n // Front face\r\n if (this._isFrontFaceDirty) {\r\n gl.frontFace(this.frontFace);\r\n this._isFrontFaceDirty = false;\r\n }\r\n };\r\n return DepthCullingState;\r\n}());\r\nexport { DepthCullingState };\r\n//# sourceMappingURL=depthCullingState.js.map"
  7049. },
  7050. {
  7051. "id": "../../.temp/packageES6Dev/core/States/stencilState.js",
  7052. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\States\\stencilState.js",
  7053. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/States/stencilState.js",
  7054. "index": 26,
  7055. "index2": 24,
  7056. "size": 6340,
  7057. "cacheable": true,
  7058. "built": true,
  7059. "optional": false,
  7060. "prefetched": false,
  7061. "chunks": [
  7062. "thinEngineOnly"
  7063. ],
  7064. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  7065. "issuerId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  7066. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7067. "issuerPath": [
  7068. {
  7069. "id": "./thinEngineOnly.ts",
  7070. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  7071. "name": "./thinEngineOnly.ts",
  7072. "profile": {
  7073. "factory": 25,
  7074. "building": 1793
  7075. }
  7076. },
  7077. {
  7078. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  7079. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  7080. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7081. "profile": {
  7082. "factory": 10,
  7083. "building": 63
  7084. }
  7085. }
  7086. ],
  7087. "profile": {
  7088. "factory": 6,
  7089. "building": 38,
  7090. "dependencies": 28
  7091. },
  7092. "failed": false,
  7093. "errors": 0,
  7094. "warnings": 0,
  7095. "assets": [],
  7096. "reasons": [
  7097. {
  7098. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  7099. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  7100. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7101. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7102. "type": "harmony side effect evaluation",
  7103. "userRequest": "../States/stencilState",
  7104. "loc": "6:0-54"
  7105. },
  7106. {
  7107. "moduleId": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  7108. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  7109. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7110. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7111. "type": "harmony import specifier",
  7112. "userRequest": "../States/stencilState",
  7113. "loc": "97:33-45"
  7114. }
  7115. ],
  7116. "providedExports": [
  7117. "StencilState"
  7118. ],
  7119. "optimizationBailout": [],
  7120. "depth": 2,
  7121. "source": "/**\r\n * @hidden\r\n **/\r\nvar StencilState = /** @class */ (function () {\r\n function StencilState() {\r\n this._isStencilTestDirty = false;\r\n this._isStencilMaskDirty = false;\r\n this._isStencilFuncDirty = false;\r\n this._isStencilOpDirty = false;\r\n this.reset();\r\n }\r\n Object.defineProperty(StencilState.prototype, \"isDirty\", {\r\n get: function () {\r\n return this._isStencilTestDirty || this._isStencilMaskDirty || this._isStencilFuncDirty || this._isStencilOpDirty;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilFunc\", {\r\n get: function () {\r\n return this._stencilFunc;\r\n },\r\n set: function (value) {\r\n if (this._stencilFunc === value) {\r\n return;\r\n }\r\n this._stencilFunc = value;\r\n this._isStencilFuncDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilFuncRef\", {\r\n get: function () {\r\n return this._stencilFuncRef;\r\n },\r\n set: function (value) {\r\n if (this._stencilFuncRef === value) {\r\n return;\r\n }\r\n this._stencilFuncRef = value;\r\n this._isStencilFuncDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilFuncMask\", {\r\n get: function () {\r\n return this._stencilFuncMask;\r\n },\r\n set: function (value) {\r\n if (this._stencilFuncMask === value) {\r\n return;\r\n }\r\n this._stencilFuncMask = value;\r\n this._isStencilFuncDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilOpStencilFail\", {\r\n get: function () {\r\n return this._stencilOpStencilFail;\r\n },\r\n set: function (value) {\r\n if (this._stencilOpStencilFail === value) {\r\n return;\r\n }\r\n this._stencilOpStencilFail = value;\r\n this._isStencilOpDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilOpDepthFail\", {\r\n get: function () {\r\n return this._stencilOpDepthFail;\r\n },\r\n set: function (value) {\r\n if (this._stencilOpDepthFail === value) {\r\n return;\r\n }\r\n this._stencilOpDepthFail = value;\r\n this._isStencilOpDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilOpStencilDepthPass\", {\r\n get: function () {\r\n return this._stencilOpStencilDepthPass;\r\n },\r\n set: function (value) {\r\n if (this._stencilOpStencilDepthPass === value) {\r\n return;\r\n }\r\n this._stencilOpStencilDepthPass = value;\r\n this._isStencilOpDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilMask\", {\r\n get: function () {\r\n return this._stencilMask;\r\n },\r\n set: function (value) {\r\n if (this._stencilMask === value) {\r\n return;\r\n }\r\n this._stencilMask = value;\r\n this._isStencilMaskDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(StencilState.prototype, \"stencilTest\", {\r\n get: function () {\r\n return this._stencilTest;\r\n },\r\n set: function (value) {\r\n if (this._stencilTest === value) {\r\n return;\r\n }\r\n this._stencilTest = value;\r\n this._isStencilTestDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n StencilState.prototype.reset = function () {\r\n this._stencilTest = false;\r\n this._stencilMask = 0xFF;\r\n this._stencilFunc = StencilState.ALWAYS;\r\n this._stencilFuncRef = 1;\r\n this._stencilFuncMask = 0xFF;\r\n this._stencilOpStencilFail = StencilState.KEEP;\r\n this._stencilOpDepthFail = StencilState.KEEP;\r\n this._stencilOpStencilDepthPass = StencilState.REPLACE;\r\n this._isStencilTestDirty = true;\r\n this._isStencilMaskDirty = true;\r\n this._isStencilFuncDirty = true;\r\n this._isStencilOpDirty = true;\r\n };\r\n StencilState.prototype.apply = function (gl) {\r\n if (!this.isDirty) {\r\n return;\r\n }\r\n // Stencil test\r\n if (this._isStencilTestDirty) {\r\n if (this.stencilTest) {\r\n gl.enable(gl.STENCIL_TEST);\r\n }\r\n else {\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n this._isStencilTestDirty = false;\r\n }\r\n // Stencil mask\r\n if (this._isStencilMaskDirty) {\r\n gl.stencilMask(this.stencilMask);\r\n this._isStencilMaskDirty = false;\r\n }\r\n // Stencil func\r\n if (this._isStencilFuncDirty) {\r\n gl.stencilFunc(this.stencilFunc, this.stencilFuncRef, this.stencilFuncMask);\r\n this._isStencilFuncDirty = false;\r\n }\r\n // Stencil op\r\n if (this._isStencilOpDirty) {\r\n gl.stencilOp(this.stencilOpStencilFail, this.stencilOpDepthFail, this.stencilOpStencilDepthPass);\r\n this._isStencilOpDirty = false;\r\n }\r\n };\r\n /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */\r\n StencilState.ALWAYS = 519;\r\n /** Passed to stencilOperation to specify that stencil value must be kept */\r\n StencilState.KEEP = 7680;\r\n /** Passed to stencilOperation to specify that stencil value must be replaced */\r\n StencilState.REPLACE = 7681;\r\n return StencilState;\r\n}());\r\nexport { StencilState };\r\n//# sourceMappingURL=stencilState.js.map"
  7122. },
  7123. {
  7124. "id": "../../.temp/packageES6Dev/core/node_modules/tslib/tslib.es6.js",
  7125. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\node_modules\\tslib\\tslib.es6.js",
  7126. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/node_modules/tslib/tslib.es6.js",
  7127. "index": 12,
  7128. "index2": 7,
  7129. "size": 9436,
  7130. "cacheable": true,
  7131. "built": true,
  7132. "optional": false,
  7133. "prefetched": false,
  7134. "chunks": [
  7135. "thinEngineOnly"
  7136. ],
  7137. "issuer": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  7138. "issuerId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  7139. "issuerName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  7140. "issuerPath": [
  7141. {
  7142. "id": "./thinEngineOnly.ts",
  7143. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  7144. "name": "./thinEngineOnly.ts",
  7145. "profile": {
  7146. "factory": 25,
  7147. "building": 1793
  7148. }
  7149. },
  7150. {
  7151. "id": "../../.temp/packageES6Dev/core/Engines/thinEngine.js",
  7152. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\thinEngine.js",
  7153. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/thinEngine.js",
  7154. "profile": {
  7155. "factory": 10,
  7156. "building": 63
  7157. }
  7158. },
  7159. {
  7160. "id": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  7161. "identifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  7162. "name": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  7163. "profile": {
  7164. "factory": 6,
  7165. "building": 38,
  7166. "dependencies": 28
  7167. }
  7168. }
  7169. ],
  7170. "profile": {
  7171. "factory": 33,
  7172. "building": 7,
  7173. "dependencies": 10
  7174. },
  7175. "failed": false,
  7176. "errors": 0,
  7177. "warnings": 0,
  7178. "assets": [],
  7179. "reasons": [
  7180. {
  7181. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  7182. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js",
  7183. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  7184. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  7185. "type": "harmony side effect evaluation",
  7186. "userRequest": "tslib",
  7187. "loc": "1:0-34"
  7188. },
  7189. {
  7190. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  7191. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineAndOperator.js",
  7192. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  7193. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js",
  7194. "type": "harmony import specifier",
  7195. "userRequest": "tslib",
  7196. "loc": "5:4-13"
  7197. },
  7198. {
  7199. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  7200. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js",
  7201. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  7202. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  7203. "type": "harmony side effect evaluation",
  7204. "userRequest": "tslib",
  7205. "loc": "1:0-34"
  7206. },
  7207. {
  7208. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  7209. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineArithmeticOperator.js",
  7210. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  7211. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js",
  7212. "type": "harmony import specifier",
  7213. "userRequest": "tslib",
  7214. "loc": "5:4-13"
  7215. },
  7216. {
  7217. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  7218. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  7219. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  7220. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  7221. "type": "harmony side effect evaluation",
  7222. "userRequest": "tslib",
  7223. "loc": "1:0-34"
  7224. },
  7225. {
  7226. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  7227. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineIsDefinedOperator.js",
  7228. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  7229. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js",
  7230. "type": "harmony import specifier",
  7231. "userRequest": "tslib",
  7232. "loc": "5:4-13"
  7233. },
  7234. {
  7235. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  7236. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js",
  7237. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  7238. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  7239. "type": "harmony side effect evaluation",
  7240. "userRequest": "tslib",
  7241. "loc": "1:0-34"
  7242. },
  7243. {
  7244. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  7245. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\Expressions\\Operators\\shaderDefineOrOperator.js",
  7246. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  7247. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js",
  7248. "type": "harmony import specifier",
  7249. "userRequest": "tslib",
  7250. "loc": "5:4-13"
  7251. },
  7252. {
  7253. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  7254. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js",
  7255. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  7256. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  7257. "type": "harmony side effect evaluation",
  7258. "userRequest": "tslib",
  7259. "loc": "1:0-34"
  7260. },
  7261. {
  7262. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  7263. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeConditionNode.js",
  7264. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  7265. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeConditionNode.js",
  7266. "type": "harmony import specifier",
  7267. "userRequest": "tslib",
  7268. "loc": "5:4-13"
  7269. },
  7270. {
  7271. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  7272. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js",
  7273. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  7274. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  7275. "type": "harmony side effect evaluation",
  7276. "userRequest": "tslib",
  7277. "loc": "1:0-34"
  7278. },
  7279. {
  7280. "moduleId": "../../.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  7281. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Engines\\Processors\\shaderCodeTestNode.js",
  7282. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  7283. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Engines/Processors/shaderCodeTestNode.js",
  7284. "type": "harmony import specifier",
  7285. "userRequest": "tslib",
  7286. "loc": "5:4-13"
  7287. },
  7288. {
  7289. "moduleId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  7290. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  7291. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  7292. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  7293. "type": "harmony side effect evaluation",
  7294. "userRequest": "tslib",
  7295. "loc": "1:0-34"
  7296. },
  7297. {
  7298. "moduleId": "../../.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  7299. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Meshes\\WebGL\\webGLDataBuffer.js",
  7300. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  7301. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Meshes/WebGL/webGLDataBuffer.js",
  7302. "type": "harmony import specifier",
  7303. "userRequest": "tslib",
  7304. "loc": "5:4-13"
  7305. },
  7306. {
  7307. "moduleId": "../../.temp/packageES6Dev/core/Misc/baseError.js",
  7308. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\baseError.js",
  7309. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/baseError.js",
  7310. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/baseError.js",
  7311. "type": "harmony side effect evaluation",
  7312. "userRequest": "tslib",
  7313. "loc": "1:0-34"
  7314. },
  7315. {
  7316. "moduleId": "../../.temp/packageES6Dev/core/Misc/baseError.js",
  7317. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\baseError.js",
  7318. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/baseError.js",
  7319. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/baseError.js",
  7320. "type": "harmony import specifier",
  7321. "userRequest": "tslib",
  7322. "loc": "7:4-13"
  7323. },
  7324. {
  7325. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  7326. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  7327. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  7328. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  7329. "type": "harmony side effect evaluation",
  7330. "userRequest": "tslib",
  7331. "loc": "1:0-34"
  7332. },
  7333. {
  7334. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  7335. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  7336. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  7337. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  7338. "type": "harmony import specifier",
  7339. "userRequest": "tslib",
  7340. "loc": "11:4-13"
  7341. },
  7342. {
  7343. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  7344. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  7345. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  7346. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  7347. "type": "harmony import specifier",
  7348. "userRequest": "tslib",
  7349. "loc": "35:4-13"
  7350. },
  7351. {
  7352. "moduleId": "../../.temp/packageES6Dev/core/Misc/fileTools.js",
  7353. "moduleIdentifier": "C:\\Repos\\Babylon.js\\.temp\\packageES6Dev\\core\\Misc\\fileTools.js",
  7354. "module": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  7355. "moduleName": "C:/Repos/Babylon.js/.temp/packageES6Dev/core/Misc/fileTools.js",
  7356. "type": "harmony import specifier",
  7357. "userRequest": "tslib",
  7358. "loc": "53:4-13"
  7359. }
  7360. ],
  7361. "providedExports": [
  7362. "__extends",
  7363. "__assign",
  7364. "__rest",
  7365. "__decorate",
  7366. "__param",
  7367. "__metadata",
  7368. "__awaiter",
  7369. "__generator",
  7370. "__exportStar",
  7371. "__values",
  7372. "__read",
  7373. "__spread",
  7374. "__spreadArrays",
  7375. "__await",
  7376. "__asyncGenerator",
  7377. "__asyncDelegator",
  7378. "__asyncValues",
  7379. "__makeTemplateObject",
  7380. "__importStar",
  7381. "__importDefault"
  7382. ],
  7383. "optimizationBailout": [],
  7384. "depth": 3,
  7385. "source": "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n"
  7386. },
  7387. {
  7388. "id": "./thinEngineOnly.ts",
  7389. "identifier": "C:\\Repos\\Babylon.js\\node_modules\\ts-loader\\index.js!C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  7390. "name": "./thinEngineOnly.ts",
  7391. "index": 0,
  7392. "index2": 34,
  7393. "size": 146,
  7394. "cacheable": true,
  7395. "built": true,
  7396. "optional": false,
  7397. "prefetched": false,
  7398. "chunks": [
  7399. "thinEngineOnly"
  7400. ],
  7401. "issuer": null,
  7402. "issuerId": null,
  7403. "issuerName": null,
  7404. "issuerPath": null,
  7405. "profile": {
  7406. "factory": 25,
  7407. "building": 1793
  7408. },
  7409. "failed": false,
  7410. "errors": 0,
  7411. "warnings": 0,
  7412. "assets": [],
  7413. "reasons": [
  7414. {
  7415. "moduleId": null,
  7416. "moduleIdentifier": null,
  7417. "module": null,
  7418. "moduleName": null,
  7419. "type": "single entry",
  7420. "userRequest": "C:\\Repos\\Babylon.js\\tests\\es6Modules\\thinEngineOnly.ts",
  7421. "loc": "thinEngineOnly"
  7422. }
  7423. ],
  7424. "providedExports": [],
  7425. "optimizationBailout": [],
  7426. "depth": 0,
  7427. "source": "import { ThinEngine } from \"@babylonjs/core/Engines/thinEngine\";\r\nvar canvas = document.getElementById(\"renderCanvas\");\r\nnew ThinEngine(canvas);\r\n"
  7428. }
  7429. ],
  7430. "filteredModules": 0,
  7431. "children": []
  7432. }