....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 185.95.0.122  /  Your IP : 216.73.216.151
Web Server : Microsoft-IIS/10.0
System : Windows NT CALION 10.0 build 14393 (Windows Server 2016) AMD64
User : IWPD_83(serin.com.t) ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Inetpub/vhosts/serin.com.tr/httpdocs/Ebook/assets/js/libs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Inetpub/vhosts/serin.com.tr/httpdocs/Ebook/assets/js/libs/mockup.js
/**
 * @preserve Mockup 1.01 | Copyright 2016, Deepak Ghimire.  All rights reserved.
 */
"use strict";var __extends=window&&window.__extends||function(e,t){for(var i in t)if(t.hasOwnProperty(i))e[i]=t[i];function a(){this.constructor=e}a.prototype=t.prototype;e.prototype=new a;e.__super=t.prototype;return e};var MOCKUP={VERSION:"1",REVISION:"01"};MOCKUP.demolink="http://mockup.deipgroup.com/";MOCKUP.purchaselink="http://codecanyon.net/item/mockup-studio-web-version/13107998";MOCKUP.extensionlink="https://chrome.google.com/webstore/detail/mockup-studio-psd-free-so/gcmmimgfjaeohjmmdpmaimonepmlfbfi";(function(e){e.MODE={PLUGIN:0,BUILDER:1};e.GEOMETRY_TYPE={PLANE:0,BOX:1,MODEL:2};e.MATERIAL_FACE={FRONT:4,BACK:5};e.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};e.Vector3=THREE.Vector3;e.Vector2=THREE.Vector2;e.defaults={anisotropy:8,maxTextureSize:2048,groundTexture:"images/textures/ground-grid.png",textureLoadFallback:"blank"};e.overrideAsTemplate=false;e.enableLog=false;e.log=function(){console.log.apply(console,arguments)};e.error=function(){console.error.apply(console,arguments)};e.autoSave=function(){};e.libType="THREE";e.checkFile=function(e,t,i){var a;if(deip.isApp||deip.isOnlineDemo){i()}else if(deip.isExtension){i();return}else{i()}};e.paperDefaults={geometryType:e.GEOMETRY_TYPE.PLANE,width:210,height:297,depth:.2,segments:150,widthScale:1,heightScale:1,folds:1,angles:[],backImage:void 0,frontImage:void 0,frontBump:void 0,backBump:void 0,mipmap:false,shininess:15,bumpScale:.4,stiffness:.02,color:16777215,skipMaterials:false,repeat:100,defaultImage:[,,,,"blank","blank"]};e.Paper=function(t){__extends(i,t);function i(t,i){t=jQuery.extend({},e.paperDefaults,t);this.geometryType=t.geometryType;this.width=t.width;this.widthScale=t.widthScale;this.height=t.height;this.depth=t.depth;this.segments=t.segments;this.folds=t.folds;this.angles=t.angles;this._shininess=t.shininess;this._bumpScale=t.bumpScale;this.stiffness=t.stiffness;this.color=t.color;this.heightScale=t.heightScale;this.defaultImage=t.defaultImage;this.baseType="Paper";this.type="Paper";this.subType=t.subType;if(t.cloneParent!==void 0)this.cloneParent=t.cloneParent;this.createGeometry();this.updateGeometry();if(!t.skipMaterials){if(!(t.skipLoad==true&&t.cloneParent!==void 0)){if(this.frontImage!==void 0&&t.defaultImage!==void 0)this.frontImage(t.frontImage!==void 0?t.frontImage:t.defaultImage[e.MATERIAL_FACE.FRONT]);if(this.backImage!==void 0&&t.defaultImage!==void 0)this.backImage(t.backImage!==void 0?t.backImage:t.defaultImage[e.MATERIAL_FACE.BACK]);if(this.frontBump!==void 0)this.frontBump(t.frontBump);if(this.backBump!==void 0)this.backBump(t.backBump)}}if(this.bumpScale!==void 0)this.bumpScale(t.bumpScale);if(i!==void 0)if(i.add!==void 0)i.add(this)}var a=function(t,i,a,s){if(t){var n=t.image;t.naturalWidth=n.naturalWidth;t.naturalHeight=n.naturalHeight;t.needsUpdate=true}if(t!==null&&a=="map"){t.anisotropy=0;if(e.defaults.anisotropy>0)t.anisotropy=e.defaults.anisotropy;if(THREE.skipPowerOfTwo==true){t.minFilter=THREE.LinearFilter;t.magFilter=THREE.LinearFilter}t.name=(new Date).toTimeString();if(i.textureRepeat!==void 0){t.wrapS=THREE.RepeatWrapping;t.wrapT=THREE.RepeatWrapping;if(e.defaults.anisotropy>0)t.anisotropy=e.defaults.anisotropy;t.repeat.set(i._textureRepeat,i._textureRepeat);if(i instanceof e.Ground){i.material.bumpMap=t;i.material.bumpScale=i.bumpScale();i.material.needsUpdate=true}}}if(i.geometryType==e.GEOMETRY_TYPE.PLANE){r(i.material[a]);i.material[a]=t;if(a=="bumpMap")i.material.bumpScale=i.bumpScale()}else{r(i.material.materials[s][a]);i.material.materials[s][a]=t;if(a=="bumpMap")i.material.materials[s].bumpScale=i.bumpScale();i.material.materials[s].needsUpdate=true}e.autoSave()};var s=function(e,t){return null};var r=function(e){if(e){if(e.image){if(e.image.nodeName=="CANVAS"){if(e.image.remove)e.image.remove();delete e.image}}if(e.dispose){e.dispose()}e=null}};var n=function(t,i,a){if(t.geometryType==e.GEOMETRY_TYPE.PLANE){r(t.material[i])}else{r(t.material.materials[a][i])}};var o=function(e){if(!(e instanceof THREE.Object3D)||!(e.parent instanceof THREE.Object3D))return void 0;if(e.parent instanceof THREE.Scene)return e.parent;return o(e.parent)};e.loadImage=function(t,i,r,n,h){if(i===void 0){var c=t.geometryType==e.GEOMETRY_TYPE.PLANE?t.material[n]!==null?t.material[n].sourceFile:void 0:t.material.materials[r]==void 0?void 0:t.material.materials[r][n]?t.material.materials[r][n].sourceFile:void 0;return c==void 0?void 0:c.indexOf("data:image")>-1?void 0:c}else{if(e.enableLog==true)console.log(i);var l=null;if(i.nodeName=="CANVAS"||i.nodeName=="IMG"){l=new THREE.Texture(i);l.needsUpdate=true;a(l,t,n,r);if(h!==void 0)h(t);var d=o(t);if(d!==void 0)d.renderRequestPending=true}else{if(i!="blank"){l=i==null?null:THREE.ImageUtils.loadTexture(i,THREE.UVMapping,function(e){e.sourceFile=i;a(e,t,n,r);if(h!==void 0)h(t);var s=o(t);if(s!==void 0)s.renderRequestPending=true},function(a){if(l.image==void 0){if(t.defaultImage!==void 0){var o=t.geometryType==e.GEOMETRY_TYPE.PLANE?t.defaultImage[e.MATERIAL_FACE.FRONT]:t.defaultImage[r];if(i!==o&&o!==void 0){e.loadImage(t,o,r,n)}else if(i!==e.defaults.textureLoadFallback||o==void 0){e.loadImage(t,e.defaults.textureLoadFallback,r,n)}}else if(i!==e.defaults.textureLoadFallback){e.loadImage(t,e.defaults.textureLoadFallback,r,n)}}s(a,i)})}else{a(null,t,n,r)}}return 0}};i.prototype.loadImage=function(t,i,a,s){return e.loadImage(this,t,i,a,s)};i.prototype.frontImage=function(t,i){return this.loadImage(t,e.MATERIAL_FACE.FRONT,"map",i)};i.prototype.backImage=function(t,i){return this.loadImage(t,e.MATERIAL_FACE.BACK,"map",i)};i.prototype.frontBump=function(t,i){return this.loadImage(t,e.MATERIAL_FACE.FRONT,"bumpMap",i)};i.prototype.backBump=function(t,i){return this.loadImage(t,e.MATERIAL_FACE.BACK,"bumpMap",i)};i.prototype.bumpScale=function(t){if(t===void 0){return this._bumpScale}else{this._bumpScale=t;if(this.geometryType==e.GEOMETRY_TYPE.PLANE){this.material.bumpScale=t}else if(this.geometryType==e.GEOMETRY_TYPE.BOX){this.material.materials[e.MATERIAL_FACE.FRONT].bumpScale=t;this.material.materials[e.MATERIAL_FACE.BACK].bumpScale=t}}};i.prototype.shininess=function(t){if(t===void 0){return this._shininess}else{this._shininess=t;if(this.geometryType==e.GEOMETRY_TYPE.PLANE){this.material.shininess=t}else if(this.geometryType==e.GEOMETRY_TYPE.BOX){this.material.materials[e.MATERIAL_FACE.FRONT].shininess=t;this.material.materials[e.MATERIAL_FACE.BACK].shininess=t}}};i.prototype.bumpImage=function(t){return this.loadImage(t,e.MATERIAL_FACE.FRONT,"bumpMap")};i.prototype.createCopy=function(t){if(t==void 0){t={};e.getParameter(this,t)}t.type=this.type;var i=e.createObject(t);i.cloneParent=void 0;i.copy(this,void 0);return i};i.prototype.createClone=function(t){if(t==void 0){t={};e.getParameter(this,t)}t.type=this.type;var i=e.createObject(t);i.material=this.material;i.cloneParent=i.cloneParent!==void 0?i.cloneParent:this.uuid;i.copy(this,void 0);return i};i.prototype.createGeometry=function(){var i={color:this.color,shading:THREE.SmoothShading,shininess:this._shininess};var a=new THREE.MeshPhongMaterial(i);if(this.geometryType==e.GEOMETRY_TYPE.BOX){var s=[a,a,a,a,new THREE.MeshPhongMaterial(i),new THREE.MeshPhongMaterial(i)];t.call(this,new THREE.BoxGeometry(this.width,this.height,this.depth,this.segments*this.folds,1,1),new THREE.MeshFaceMaterial(s))}else if(this.geometryType==e.GEOMETRY_TYPE.PLANE){t.call(this,new THREE.PlaneBufferGeometry(this.width,this.height),a)}};i.prototype.updateGeometry=function(){};return i}(THREE.Mesh)})(MOCKUP||(MOCKUP={}));(function(e){e.selected=void 0;e.Stage=function(t){__extends(i,t);function i(i){i=i||{};var a=this;a.postRender=void 0;t.call(a);if(i.skipLoad!==true){a.canvas=i.canvas||document.createElement("canvas");a.canvas=jQuery(this.canvas);a.camera=new THREE.PerspectiveCamera(30,a.width/a.height,4,5e4);a.renderer=new THREE.WebGLRenderer({canvas:a.canvas.context,antialias:true});a.renderer.setSize(a.width,a.height);a.renderer.setClearColor(16777215);var s=a.orbitControl=new THREE.OrbitControls(a.camera,a.renderer.domElement);s.maxPolarAngle=Math.PI;if(e.mode!==e.MODE.PLUGIN){a.renderer.shadowMap.enabled=true;a.ground=new e.Ground({color:15658734,height:a.camera.far,width:a.camera.far},a)}a.ambientLight=new THREE.AmbientLight(4473924);a.add(a.ambientLight);var r=a.spotLight=new THREE.SpotLight(16777215);r.radius=1e3;r.position.set(r.radius,r.radius,r.radius);r.intensity=.6;r.castShadow=true;r.shadowCameraNear=25;r.shadowCameraFar=r.radius*5;r.shadowCameraFov=45;r.distance=r.radius*5;r.shadowDarkness=.1;var n=a.spotLightHelper=new THREE.CameraHelper(r.shadow.camera);n.visible=false;a.add(r);a.add(n);if(i.stats==true){var o=a.stats=new Stats;o.domElement.style.position="absolute";o.domElement.style.top="60px";a.canvas.parent().append(jQuery(o.domElement))}a.enableSoftShadow(false);a.animateCount=0;a.renderCount=0;a.camera.position.set(-300,300,300);a.camera.lookAt(new THREE.Vector3(0,0,0));a.orbitControl.center.set(0,0,0);a.orbitControl.update();a.selectiveRendering=false;a.renderRequestPending=false;h()}this.type="Stage";a.cancelRAF=function(){cancelAnimationFrame(h);h=null};function h(){if(h)requestAnimationFrame(h);if(a.selectiveRendering!=true||a.selectiveRendering==true&&a.renderRequestPending==true){a.render()}}}i.prototype.enableSoftShadow=function(e){e=e!==void 0?e:false;var t=this.renderer.shadowMap.type;this.renderer.shadowMap.type=e?THREE.PCFSoftShadowMap:THREE.PCFShadowMap;var i=this.spotLight;if(i.shadow.map){if(t==this.renderer.shadowMap.type)return;i.shadow.map.dispose();i.shadow.map=null}var a=e?4096:1024;i.shadowMapWidth=a;i.shadowMapHeight=a;i.shadowBias=e?-875e-8:-5e-5;this.clearMaterials();this.renderRequestPending=true};i.prototype.clearMaterials=function(){var e=this.children.length;for(var t=e-1;t>=0;t--){var i=this.children[t];if(i.baseType&&i.baseType=="Paper"){if(i.material){if(i.material.materials!==void 0){for(var a=0;a<i.material.materials.length;a++)i.material.materials[a].needsUpdate=true}else{i.material.needsUpdate=true}}}}};i.prototype.clearChild=function(){if(this.spotLight.shadow.map){this.spotLight.shadow.map.dispose();this.spotLight.shadow.map=null}this.spotLight.castShadow=false;this.clearMaterials();var t=this.children.length;for(var i=t-1;i>=0;i--){var a=this.children[i];if(a instanceof e.Bundle){for(var s=a.children.length-1;s>=0;s--){e.clearChild(a.children[s])}}e.clearChild(a);a=null}this.render()};i.prototype.resizeAuto=function(){this.resizeCanvas(this.canvas.parent().width(),this.canvas.parent().height())};i.prototype.resizeCanvas=function(e,t){this.renderer.setSize(e,t);this.camera.aspect=e/t;this.camera.updateProjectionMatrix();this.renderRequestPending=true;if(this.resizeCallback!==void 0)this.resizeCallback()};i.prototype.render=function(){this.animateCount++;this.renderer.render(this,this.camera);if(this.stats!=void 0)this.stats.update();this.renderRequestPending=false;if(this.renderCallback!==void 0)this.renderCallback()};i.prototype.toJSON=function(){var t={metadata:{version:4.3,type:"Object",generator:"ObjectExporter"}};var i={};var a=function(e){if(t.geometries===void 0){t.geometries=[]}if(i[e.uuid]===void 0){var a=e.toJSON();delete a.metadata;i[e.uuid]=a;t.geometries.push(a)}return e.uuid};var s={};var r=function(e){if(t.materials===void 0){t.materials=[]}if(s[e.uuid]===void 0){var i=e.toJSON();delete i.metadata;s[e.uuid]=i;t.materials.push(i)}return e.uuid};var n=function(t){var i={};i.uuid=t.uuid;i.type=t.type;if(t.name!=="")i.name=t.name;if(JSON.stringify(t.userData)!=="{}")i.userData=t.userData;if(t.visible!==true)i.visible=t.visible;e.getParameter(t,i);if(t instanceof THREE.PerspectiveCamera){i.fov=t.fov;i.aspect=t.aspect;i.near=t.near;i.far=t.far}else if(t instanceof THREE.OrthographicCamera){i.left=t.left;i.right=t.right;i.top=t.top;i.bottom=t.bottom;i.near=t.near;i.far=t.far}else if(t instanceof THREE.AmbientLight){i.color=t.color.getHex()}else if(t instanceof THREE.DirectionalLight){i.color=t.color.getHex();i.intensity=t.intensity}else if(t instanceof THREE.PointLight){i.color=t.color.getHex();i.intensity=t.intensity;i.distance=t.distance;i.decay=t.decay}else if(t instanceof THREE.SpotLight){i.radius=t.radius;i.color=t.color.getHex();i.intensity=t.intensity;i.distance=t.distance;i.angle=t.angle;i.exponent=t.exponent;i.decay=t.decay}else if(t instanceof THREE.Mesh||t instanceof THREE.Line||t instanceof THREE.PointCloud){if(t instanceof e.Iphone){}else{i.geometry=a(t.geometry);i.material=r(t.material);if(t instanceof THREE.Line)i.mode=t.mode}}else if(t instanceof THREE.Sprite){i.material=r(t.material)}i.matrix=t.matrix.toArray();if(t.children.length>0){i.children=[];for(var s=0;s<t.children.length;s++){var o=t.children[s];if(o instanceof THREE.TransformControls||o instanceof THREE.BoxHelper){}else{if(!(t instanceof e.Bundle))i.children.push(n(t.children[s]))}}}return i};t.object=n(this);return t};i.prototype.hasChild=function(){var e=this.children;var t=false;for(var i=0;i<this.children.length;i++){if(e[i].baseType=="Paper"&&e[i].type!=="Ground"){t=true;break}}return t};return i}(THREE.Scene);e.CloneBoxHelper=function(e){__extends(t,e);function t(e){this.stage=e;this.cloneHelpers=[];this.type="BoxHelper"}t.prototype.selectClones=function(e){var t=e.cloneParent==void 0?e.uuid:e.cloneParent;var i=this.stage.getIndexesByProperty("cloneParent",t);var a;for(var s=0;s<i.length;s++){if(this.cloneHelpers[s]==void 0){a=new THREE.BoxHelper;a.material=new THREE.LineDashedMaterial({color:16755200,dashSize:3,gapSize:1,opacity:.4,transparent:true,linewidth:2});this.stage.add(a);this.cloneHelpers.push(a.uuid)}else a=this.stage.getObjectByUuid(this.cloneHelpers[s]);a.visible=true;var r=this.stage.children[i[s]];if(r===e){r=this.stage.getObjectByUuid(t)}if(r!==void 0)a.update(r)}for(var n=i.length;n<this.cloneHelpers.length;n++){a=this.stage.getObjectByUuid(this.cloneHelpers[n]);a.visible=false}};return t}({});e.getParameter=function(t,i){if(t.subType!==void 0)i.subType=t.subType;if(t.height!==void 0)i.height=t.height;if(t.width!==void 0)i.width=t.width;if(t.depth!==void 0)i.depth=t.depth;if(t.radius!==void 0)i.radius=t.radius;if(t.segments!==void 0)i.segments=t.segments;if(t.folds!==void 0)i.folds=t.folds;if(t.angles!==void 0)i.angles=t.angles;if(t.shininess!==void 0)i.shininess=t.shininess();if(t.bumpScale!==void 0)i.bumpScale=t.bumpScale();if(t.stiffness!==void 0)i.stiffness=t.stiffness;if(t.heightScale!==void 0)i.heightScale=t.heightScale;if(t.widthScale!==void 0)i.widthScale=t.widthScale;if(t.frontImage!==void 0)i.frontImage=t.frontImage();if(t.backImage!==void 0)i.backImage=t.backImage();if(t.backBump!==void 0)i.backBump=t.backBump();if(t.frontBump!==void 0)i.frontBump=t.frontBump();if(t.cloneParent!==void 0)i.cloneParent=t.cloneParent;if(t.textureRepeat!==void 0)i.textureRepeat=t.textureRepeat();if(t.resolutionHeight!==void 0)i.resolutionHeight=t.resolutionHeight;if(t.resolutionWidth!==void 0)i.resolutionWidth=t.resolutionWidth;if(t.screenSize!==void 0)i.screenSize=t.screenSize;if(e.overrideAsTemplate==true){e.getDefaultImage(i);if(i.defaultImage!==void 0){if(t.frontImage!==void 0)i.frontImage=i.defaultImage[4];if(t.backImage!==void 0)i.backImage=i.defaultImage[5]}}};e.getDefaultImage=function(t){if(t.defaultImage==void 0&&e.presets[t.type]!==void 0&&e.presets[t.type].options!==void 0){t.defaultImage=e.presets[t.type].options.defaultImage;if(t.subType!==void 0&&e.presets[t.type].menu!==void 0&&e.presets[t.type].menu.subMenu!==void 0&&e.presets[t.type].menu.subMenu[t.subType]!==void 0&&e.presets[t.type].menu.subMenu[t.subType].options.defaultImage!==void 0){t.defaultImage=e.presets[t.type].menu.subMenu[t.subType].options.defaultImage}}};e.createObject=function(t){if(t.defaultImage==void 0&&e.presets!==void 0&&e.presets[t.type]!==void 0&&e.presets[t.type].options!==void 0){t.defaultImage=e.presets[t.type].options.defaultImage;if(t.subType!==void 0&&e.presets[t.type].menu!==void 0&&e.presets[t.type].menu.subMenu!==void 0&&e.presets[t.type].menu.subMenu[t.subType]!==void 0&&e.presets[t.type].menu.subMenu[t.subType].options.defaultImage!==void 0){t.defaultImage=e.presets[t.type].menu.subMenu[t.subType].options.defaultImage}}var i=new e[t.type](t);if(t.cloneParent!==void 0)i.cloneParent=t.cloneParent;return i}})(MOCKUP||(MOCKUP={}));(function(e){var t=function(t){__extends(i,t);function i(i,a){i=i||{};i.geometryType=e.GEOMETRY_TYPE.PLANE;t.call(this,i,a);this.type="PlanePaper"}i.prototype.backImage=void 0;i.prototype.backBump=void 0;return i}(e.Paper);e.PlanePaper=t;var i=function(i){__extends(a,i);function a(t,a){t=t||{};var s=this;s._textureRepeat=t.textureRepeat==void 0?e.paperDefaults.repeat:t.textureRepeat;t.skipMaterials=true;t.bumpScale=t.bumpScale==void 0?e.paperDefaults.bumpScale:t.bumpScale;t.shininess=t.shininess==void 0?e.paperDefaults.shininess:t.shininess;i.call(this,t,a);s.type="Ground";this.receiveShadow=true;this.angles=void 0}a.prototype.frontImage=function(e){if(e===void 0)return a.__super.frontImage.call(this,e);else{a.__super.frontImage.call(this,e)}};t.prototype.frontBump=void 0;a.prototype.textureRepeat=function(e){if(e===void 0){return this._textureRepeat}else{this._textureRepeat=e;if(this.material.map!==null)this.material.map.repeat.set(e,e)}};return a}(e.PlanePaper);e.Ground=i;var a=function(t){__extends(i,t);function i(i,a){i=i||{};i.geometryType=e.GEOMETRY_TYPE.BOX;t.call(this,i,a);this.type="BoxPaper";this.castShadow=true;this.receiveShadow=true}i.prototype.updateGeometry=function(){};return i}(e.Paper);e.BoxPaper=a;var s=function(e){__extends(t,e);function t(t,i){t=t||{};e.call(this,t,i);var a=6;for(var s=0;s<a;s++){this.angles[s]=this.angles[s]!=void 0?this.angles[s]:0}this.updateAngle();this.type="FoldBoxPaper"}t.prototype.updateGeometry=function(){};t.prototype.updateAngle=function(){var e=performance.now();var t=this.width*(1-Math.sin(this.stiffness/2*(this.stiffness/2))/2)-this.width*this.stiffness/20;var i=this.height;var a=this.segments;var s=this.folds;var r=this.stiffness;var n=t/2;var o=i/2;var h=t/s;var c=h*r;var l=h*100/100.5;var d=[];var u=[];var p=[];var f=[];var m=[];var v=[];var E=0;var g=this.depth;var y=Math.PI/2;var T=s==3?l/200:0;var b=0;if(this.folds>=1){m[0]=[];v[s-1]=[];E=this.angles[1]*Math.PI/180;m[0][0]=m[0][1]=this.folds==1?new THREE.Vector3(-this.width*Math.cos(E),0,Math.sin(E)*l):new THREE.Vector3(l-n-l*Math.cos(E),0,Math.sin(E)*l);b=(this.angles[1]-90)*Math.PI/180;E=b;v[s-1][2]=v[s-1][3]=new THREE.Vector3(m[0][0].x-Math.cos(E)*g,0,m[0][0].z+Math.sin(E)*g);E=(45+this.angles[1]/4)*Math.PI/180;if(this.folds>1){if(this.folds==2){E=(45+this.angles[1]/4-this.angles[4]/2)*Math.PI/180}else E=(45+this.angles[1]/4)*Math.PI/180}m[0][2]=this.folds==1?new THREE.Vector3(-Math.cos(E)*c/2,0,Math.sin(E)*c):new THREE.Vector3(l-n-T-Math.cos(E)*c/2,0,Math.sin(E)*c);v[s-1][1]=this.folds==1?new THREE.Vector3(m[0][2].x-Math.cos(b)*g,0,m[0][2].z+Math.sin(b)*g):m[0][2];m[0][3]=this.folds==1?new THREE.Vector3(0,0,0):new THREE.Vector3(l-n-T,0,0);if(this.folds==2){E=(this.angles[1]/2-this.angles[4]/2-90)*Math.PI/180}else if(this.folds==1){E=(this.angles[1]-90)*Math.PI/180}else{E=(this.angles[1]/2-90)*Math.PI/180}v[s-1][0]=new THREE.Vector3(m[0][3].x-Math.cos(E)*g,0,m[0][3].z+Math.sin(E)*g)}if(this.folds>=2){m[1]=[];v[s-2]=[];m[1][0]=m[0][3];v[s-2][3]=v[s-1][0];E=(135+this.angles[1]*3/4)*Math.PI/180;m[1][1]=new THREE.Vector3(l-n-Math.cos(E)*c,0,Math.sin(E)*c);v[s-2][2]=m[1][1];E=0;if(this.folds>2){E=(45-this.angles[4]*3/4)*Math.PI/180;m[1][2]=new THREE.Vector3(l*2-n+T-Math.cos(E)*c,0,Math.sin(E)*c);v[s-2][1]=m[1][2];m[1][3]=new THREE.Vector3(l*2-n+T,0,0);E=(this.angles[4]/2-90)*Math.PI/180;v[s-2][0]=new THREE.Vector3(m[1][3].x+Math.cos(E)*g*1.25,0,m[1][3].z+Math.sin(E)*g*1.25)}else{E=(135-this.angles[4]/4+this.angles[1]/2)*Math.PI/180;m[1][1]=new THREE.Vector3(l-n-Math.cos(E)*c/2,0,Math.sin(E)*c);v[0][2]=m[1][1];E=(180-this.angles[4])*Math.PI/180;m[1][2]=m[1][3]=new THREE.Vector3(l-n-Math.cos(E)*l,0,Math.sin(E)*l);E=(this.angles[4]-90)*Math.PI/180;v[0][0]=v[0][1]=new THREE.Vector3(m[1][3].x+Math.cos(E)*g,0,m[1][3].z+Math.sin(E)*g)}}if(this.folds>2){m[2]=[];v[0]=[];m[2][0]=m[1][3];v[0][3]=v[1][0];E=(135-this.angles[4]*1/4)*Math.PI/180;m[2][1]=new THREE.Vector3(l*2-n-Math.cos(E)*0,0,Math.sin(E)*c);v[0][2]=m[2][1];E=(180-this.angles[4])*Math.PI/180;m[2][2]=m[2][3]=new THREE.Vector3(l*2-n-Math.cos(E)*l,0,Math.sin(E)*l);E=(this.angles[4]-90)*Math.PI/180;v[0][0]=v[0][1]=new THREE.Vector3(m[2][3].x+Math.cos(E)*g,0,m[2][3].z+Math.sin(E)*g)}for(var M=0;M<this.folds;M++){d[M]=new THREE.CubicBezierCurve3(m[M][0],m[M][1],m[M][2],m[M][3]);p[M]=d[M].getSpacedPoints(this.segments);u[M]=new THREE.CubicBezierCurve3(v[M][0],v[M][1],v[M][2],v[M][3]);f[M]=u[M].getSpacedPoints(this.segments)}var x=this.geometry;var R=s*a+1;var P=7,w=8;x.vertices[0].z=x.vertices[2].z=x.vertices[w+R*2-1].z=x.vertices[w+R*3-1].z=x.vertices[w+R*5-1].z=x.vertices[w+R*6-1].z=p[s-1][a].z;x.vertices[0].x=x.vertices[2].x=x.vertices[w+R*2-1].x=x.vertices[w+R*3-1].x=x.vertices[w+R*5-1].x=x.vertices[w+R*6-1].x=p[s-1][a].x;x.vertices[1].z=x.vertices[3].z=x.vertices[w+R-1].z=x.vertices[w+R*4-1].z=x.vertices[w+R*6].z=x.vertices[w+R*7].z=f[0][0].z;x.vertices[1].x=x.vertices[3].x=x.vertices[w+R-1].x=x.vertices[w+R*4-1].x=x.vertices[w+R*6].x=x.vertices[w+R*7].x=f[0][0].x;x.vertices[5].z=x.vertices[7].z=x.vertices[w+R].z=x.vertices[w+R*2].z=x.vertices[w+R*4].z=x.vertices[w+R*5].z=p[0][0].z;x.vertices[5].x=x.vertices[7].x=x.vertices[w+R].x=x.vertices[w+R*2].x=x.vertices[w+R*4].x=x.vertices[w+R*5].x=p[0][0].x;x.vertices[4].z=x.vertices[6].z=x.vertices[w].z=x.vertices[w+R*3].z=x.vertices[w+R*7-1].z=x.vertices[w+R*8-1].z=f[s-1][a].z;x.vertices[4].x=x.vertices[6].x=x.vertices[w].x=x.vertices[w+R*3].x=x.vertices[w+R*7-1].x=x.vertices[w+R*8-1].x=f[s-1][a].x;var H=x.vertices.length;w++;for(var I=0;I<s;I++){var O=I==0;var S=O?a-1:a;for(var C=0;C<S;C++){x.vertices[w].z=x.vertices[w+R*3].z=x.vertices[H-w+P-R].z=x.vertices[H-w+P].z=f[s-1-I][S-C].z;x.vertices[w].x=x.vertices[w+R*3].x=x.vertices[H-w+P-R].x=x.vertices[H-w+P].x=f[s-1-I][S-C].x;x.vertices[w+R].z=x.vertices[w+R*2].z=x.vertices[w+R*4].z=x.vertices[w+R*5].z=p[I][C+O].z;x.vertices[w+R].x=x.vertices[w+R*2].x=x.vertices[w+R*4].x=x.vertices[w+R*5].x=p[I][C+O].x;w++}}x.computeBoundingBox();x.computeBoundingSphere();x.verticesNeedUpdate=true;x.computeFaceNormals();x.computeVertexNormals();x.normalsNeedUpdate=true;console.log("FoldBoxPaper UpdateAngle: "+(performance.now()-e).toFixed(2)+"ms")};return t}(e.BoxPaper);e.FoldBoxPaper=s;var r=function(t){__extends(i,t);function i(e,i){e=e||{};t.call(this,e,i);var a=6;for(var s=0;s<a;s++){this.angles[s]=this.angles[s]!=void 0?this.angles[s]:0}this.updateAngle();this.type="FoldBoxPaper"}i.prototype.updateGeometry=function(){};i.prototype.updateAngle=function(t){var i=this;var a=performance.now();var s=i.width*(1-Math.sin(i.stiffness/2*(i.stiffness/2))/2)-i.width*i.stiffness/20;var r=i.height;var n=i.segments;var o=i.folds;var h=i.stiffness;var c=s/2;var l=r/2;var d=s/o;var u=d*h;var p=d;var f=[];var m=[];var v=[];var E=[];var g=[];var y=[];var T=0;var b=i.depth;var M=Math.PI/2;var x=i.angles[4]||0;var R=o==3?p/200:0;var P=0;var w=0,H=[];H.push(w);var I=false;function O(){if(i.folds>=1){g[0]=[];y[o-1]=[];T=i.angles[1]*Math.PI/180;x=i.angles[4]*Math.PI/180;var e=Math.sin(x)*p;g[0][0]=g[0][1]=i.folds==1?new THREE.Vector3(-p*Math.cos(T),0,Math.sin(T)*p):new THREE.Vector3(p-c-p*Math.cos(T),0,Math.sin(T)*p);P=(i.angles[1]-90)*Math.PI/180;T=P;y[o-1][2]=y[o-1][3]=new THREE.Vector3(g[0][0].x-Math.cos(T)*b,0,g[0][0].z+Math.sin(T)*b);if(i.folds==1){g[0][1]=new THREE.Vector3(-p/2*Math.cos(x),0,p/2*Math.sin(x));y[o-1][2]=new THREE.Vector3(g[0][1].x-Math.cos(P)*b,0,g[0][1].z+Math.sin(P)*b)}T=(45+i.angles[1]/2)*Math.PI/180;if(i.folds>1){if(i.folds==2){T=(45+i.angles[1]/4-i.angles[4]/2)*Math.PI/180}else T=(45+i.angles[1]/4)*Math.PI/180}g[0][2]=i.folds==1?new THREE.Vector3(-Math.cos(T)*u/2,0,Math.sin(T)*u):new THREE.Vector3(p-c-R-Math.cos(T)*u/2,0,Math.sin(T)*u);y[o-1][1]=i.folds==1?new THREE.Vector3(g[0][2].x-Math.cos(P)*b,0,g[0][2].z+Math.sin(P)*b):g[0][2];g[0][3]=i.folds==1?new THREE.Vector3(0,0,0):new THREE.Vector3(p-c-R,0,0);if(i.folds==2){T=(i.angles[1]/2-i.angles[4]/2-90)*Math.PI/180}else if(i.folds==1){T=(i.angles[1]-90)*Math.PI/180}else{T=(i.angles[1]/2-90)*Math.PI/180}y[o-1][0]=new THREE.Vector3(g[0][3].x-Math.cos(T)*b,0,g[0][3].z+Math.sin(T)*b)}if(i.folds>=2){g[1]=[];y[o-2]=[];g[1][0]=g[0][3];y[o-2][3]=y[o-1][0];T=(135+i.angles[1]*3/4)*Math.PI/180;g[1][1]=new THREE.Vector3(p-c-Math.cos(T)*u,0,Math.sin(T)*u);y[o-2][2]=g[1][1];T=0;if(i.folds>2){T=(45-i.angles[4]*3/4)*Math.PI/180;g[1][2]=new THREE.Vector3(p*2-c+R-Math.cos(T)*u,0,Math.sin(T)*u);y[o-2][1]=g[1][2];g[1][3]=new THREE.Vector3(p*2-c+R,0,0);T=(i.angles[4]/2-90)*Math.PI/180;y[o-2][0]=new THREE.Vector3(g[1][3].x+Math.cos(T)*b*1.25,0,g[1][3].z+Math.sin(T)*b*1.25)}else{T=(135-i.angles[4]/4+i.angles[1]/2)*Math.PI/180;g[1][1]=new THREE.Vector3(p-c-Math.cos(T)*u/2,0,Math.sin(T)*u);y[0][2]=g[1][1];T=(180-i.angles[4])*Math.PI/180;g[1][2]=g[1][3]=new THREE.Vector3(p-c-Math.cos(T)*p,0,Math.sin(T)*p);T=(i.angles[4]-90)*Math.PI/180;y[0][0]=y[0][1]=new THREE.Vector3(g[1][3].x+Math.cos(T)*b,0,g[1][3].z+Math.sin(T)*b)}}if(i.folds>2){g[2]=[];y[0]=[];g[2][0]=g[1][3];y[0][3]=y[1][0];T=(135-i.angles[4]*1/4)*Math.PI/180;g[2][1]=new THREE.Vector3(p*2-c-Math.cos(T)*0,0,Math.sin(T)*u);y[0][2]=g[2][1];T=(180-i.angles[4])*Math.PI/180;g[2][2]=g[2][3]=new THREE.Vector3(p*2-c-Math.cos(T)*p,0,Math.sin(T)*p);T=(i.angles[4]-90)*Math.PI/180;y[0][0]=y[0][1]=new THREE.Vector3(g[2][3].x+Math.cos(T)*b,0,g[2][3].z+Math.sin(T)*b)}for(var t=0;t<i.folds;t++){f[t]=new THREE.CubicBezierCurve3(g[t][0],g[t][1],g[t][2],g[t][3]);v[t]=f[t].getPoints(i.segments);var a,s=v[t][0];for(var r=1;r<v[t].length;r++){a=v[t][r];w+=a.distanceTo(s);H.push(w);s=a}m[t]=new THREE.CubicBezierCurve3(y[t][0],y[t][1],y[t][2],y[t][3]);E[t]=m[t].getPoints(i.segments)}}O();var S=w;var C=i.geometry;var z=o*n+1;var A=7,L=8;C.vertices[0].z=C.vertices[2].z=C.vertices[L+z*2-1].z=C.vertices[L+z*3-1].z=C.vertices[L+z*5-1].z=C.vertices[L+z*6-1].z=v[o-1][n].z;C.vertices[0].x=C.vertices[2].x=C.vertices[L+z*2-1].x=C.vertices[L+z*3-1].x=C.vertices[L+z*5-1].x=C.vertices[L+z*6-1].x=v[o-1][n].x;C.vertices[1].z=C.vertices[3].z=C.vertices[L+z-1].z=C.vertices[L+z*4-1].z=C.vertices[L+z*6].z=C.vertices[L+z*7].z=E[0][0].z;C.vertices[1].x=C.vertices[3].x=C.vertices[L+z-1].x=C.vertices[L+z*4-1].x=C.vertices[L+z*6].x=C.vertices[L+z*7].x=E[0][0].x;C.vertices[5].z=C.vertices[7].z=C.vertices[L+z].z=C.vertices[L+z*2].z=C.vertices[L+z*4].z=C.vertices[L+z*5].z=v[0][0].z;C.vertices[5].x=C.vertices[7].x=C.vertices[L+z].x=C.vertices[L+z*2].x=C.vertices[L+z*4].x=C.vertices[L+z*5].x=v[0][0].x;C.vertices[4].z=C.vertices[6].z=C.vertices[L].z=C.vertices[L+z*3].z=C.vertices[L+z*7-1].z=C.vertices[L+z*8-1].z=E[o-1][n].z;C.vertices[4].x=C.vertices[6].x=C.vertices[L].x=C.vertices[L+z*3].x=C.vertices[L+z*7-1].x=C.vertices[L+z*8-1].x=E[o-1][n].x;var _=C.vertices.length;L++;for(var k=0;k<o;k++){var B=k==0;var j=B?n-1:n;for(var N=0;N<j;N++){C.vertices[L].z=C.vertices[L+z*3].z=C.vertices[_-L+A-z].z=C.vertices[_-L+A].z=E[o-1-k][j-N].z;C.vertices[L].x=C.vertices[L+z*3].x=C.vertices[_-L+A-z].x=C.vertices[_-L+A].x=E[o-1-k][j-N].x;C.vertices[L+z].z=C.vertices[L+z*2].z=C.vertices[L+z*4].z=C.vertices[L+z*5].z=v[k][N+B].z;C.vertices[L+z].x=C.vertices[L+z*2].x=C.vertices[L+z*4].x=C.vertices[L+z*5].x=v[k][N+B].x;L++}}var F=C.faceVertexUvs[0];var V=C.faces;var U=0,D=0;for(var N=0;N<F.length;N++){if(V[N].materialIndex==e.MATERIAL_FACE.FRONT){var Y=H[D]/w;if(N%2==0){F[N][0].x=F[N][1].x=F[N+1][0].x=Y;D++}else{F[N-1][2].x=F[N][1].x=F[N][2].x=Y}}else if(V[N].materialIndex==e.MATERIAL_FACE.BACK){var Y=1-H[D]/w;if(N%2==0){F[N][0].x=F[N][1].x=F[N+1][0].x=Y;D--}else{F[N-1][2].x=F[N][1].x=F[N][2].x=Y}}}C.computeBoundingBox();var G=Math.abs(C.boundingBox.min.x-C.boundingBox.max.x);var K=Math.abs(C.boundingBox.min.z-C.boundingBox.max.z);var W=Math.sqrt(G*G+K*K);i.scale.x=i.scale.z=p*i.folds/w;C.computeBoundingSphere();C.verticesNeedUpdate=true;C.computeFaceNormals();C.computeVertexNormals();C.uvsNeedUpdate=true;C.normalsNeedUpdate=true};return i}(e.BoxPaper);e.FlexBoxPaper=r;var n=function(e){__extends(t,e);function t(t,i){t=t||{};t.folds=2;e.call(this,t,i);this.type="BiFold"}return t}(e.FlexBoxPaper);e.BiFold=n;var o=function(e){__extends(t,e);function t(t,i){t=t||{};t.folds=3;e.call(this,t,i);this.type="TriFold"}return t}(e.FlexBoxPaper);e.TriFold=o;var h=function(e){__extends(t,e);function t(t,i){t=t||{};t.segments=1;e.call(this,t,i);this.type="BusinessCard"}return t}(e.BoxPaper);e.BusinessCard=h;var c=function(e){__extends(t,e);function t(t,i){t=t||{};e.call(this);this.type="Bundle";if(i!==void 0)i.add(this)}return t}(THREE.Group);e.Bundle=c;var l=function(t){__extends(a,t);function i(e,t,i){var a=2;var s=i.position;var r=1;var n=1;for(var o=1;o<e;o++){var h=i.createClone();t.add(h);h.position.x=s.x+(.05-Math.random(1)*.1)*r*4;h.position.y=s.y+(.05-Math.random(1)*.1)*n*4;h.position.z=o*(i.depth*1.2);s=h.position;if(h.position.x-i.position.x>a)r=1;if(h.position.x-i.position.x<-a)r=-1;if(h.position.y-i.position.y>a)n=1;if(h.position.y-i.position.y<-a)n=-1}}function a(a,s){a=a||{};a.segments=1;a.stackCount=50;t.call(this,a,s);this.mainObject=new e.BusinessCard(a);this.widthScale=this.mainObject.widthScale;this.heightScale=this.mainObject.heightScale;this.width=this.mainObject.width;this.height=this.mainObject.height;this.add(this.mainObject);i(a.stackCount,this,this.mainObject);this.type="PaperStack"}a.prototype.shininess=function(e){if(e==void 0){return this.mainObject.shininess()}else{this.mainObject.shininess(e)}};a.prototype.bumpScale=function(e){if(e==void 0){return this.mainObject.bumpScale()}else{this.mainObject.bumpScale(e)}};a.prototype.frontImage=function(e){if(e==void 0){return this.mainObject.frontImage()}else{this.mainObject.frontImage(e)}};a.prototype.backImage=function(e){if(e==void 0){return this.mainObject.backImage()}else{this.mainObject.backImage(e)}};return a}(e.Bundle);e.PaperStack=l;var d=function(t){__extends(i,t);function i(e,i){e=e||{};e.segments=150;this.stackCount=e.stackCount=6;t.call(this,e,i);this.angles=[0,0,0,0,0,0];this.stiffness=.02;this._activePage=e.activePage||0;this.createStack(e);this.createCover(e);this.updateAngle();this.type="BiFoldBook"}i.prototype.activePage=function(e){if(e==void 0){return this._activePage}else{this._activePage=e}};i.prototype.updateAngle=function(){var e=this.cover;e.width=this.width;e.angles[1]=this.angles[1];e.angles[4]=this.angles[4];e.stiffness=this.stiffness;e.updateAngle();var t=this.angles[1];var i=this.angles[4];var a=i-t;var s=this.stackCount;var r=this.mainObject.depth*3/(2*Math.PI*this.width*this.widthScale/360);for(var n=0;n<s;n++){var o=this.children[n];o.width=this.width;o.angles[1]=t+n*r;o.angles[4]=i+n*r;o.stiffness=this.stiffness;o.updateAngle();o.position.z=-1*n*this.mainObject.depth}};i.prototype.updatePage=function(e){};i.prototype.createCover=function(t){this.cover=new e.BiFold(t);this.add(this.cover)};i.prototype.createStack=function(t){this.mainObject=new e.BiFold(t);this.mainObject.angles[1]=this.stackCount/5;this.mainObject.stiffness=this.stackCount/100;this.widthScale=this.mainObject.widthScale;this.heightScale=this.mainObject.heightScale;this.width=this.mainObject.width;this.height=this.mainObject.height;this.add(this.mainObject);var i=2;var a=this.mainObject.position;var s=1;var r=1;var n={};e.getParameter(this.mainObject,n);for(var o=1;o<this.stackCount;o++){n.angles[1]=(this.stackCount-o)/5;n.stiffness=(this.stackCount-o)/100;var h=this.mainObject.createClone(n);this.add(h);h.position.z=-1*o*(this.mainObject.depth*2);a=h.position}};i.prototype.shininess=function(e){if(e==void 0){return this.mainObject.shininess()}else{this.mainObject.shininess(e)}};i.prototype.bumpScale=function(e){if(e==void 0){return this.mainObject.bumpScale()}else{this.mainObject.bumpScale(e)}};i.prototype.frontImage=function(e){if(e==void 0){return this.mainObject.frontImage();
}else{this.mainObject.frontImage(e)}};i.prototype.backImage=function(e){if(e==void 0){return this.mainObject.backImage()}else{this.mainObject.backImage(e)}};return i}(e.Bundle);e.BiFoldBook=d;var u=function(e){__extends(t,e);function t(t,i){t=t||{};t.segments=1;e.call(this,t,i);this.type="BusinessCard"}t.prototype.frontImage=function(e){if(e===void 0)return t.__super.frontImage.call(this,e);else{t.__super.frontImage.call(this,e);var i=this.material.map;this.frontBump(e)}};return t}(e.BoxPaper);e.LogoCard=u;var p=function(e){__extends(t,e);function t(t,i){t=t||{};t.segments=1;e.call(this,t,i);this.type="LetterHead"}return t}(e.BoxPaper);e.LetterHead=p;var f=function(t){__extends(i,t);function i(e,i){e=e||{};e.segments=50;this._textureRepeat=e.textureRepeat==void 0?1:e.textureRepeat;t.call(this,e,i);this.type="Flyer"}i.prototype.textureRepeat=function(t){if(t===void 0){return this._textureRepeat}else{this._textureRepeat=t;if(this.material.materials[e.MATERIAL_FACE.FRONT].map!==null)this.material.materials[e.MATERIAL_FACE.BACK].map.repeat.set(t,t);if(this.material.materials[e.MATERIAL_FACE.BACK].map!==null)this.material.materials[e.MATERIAL_FACE.BACK].map.repeat.set(t,t)}};return i}(e.FlexBoxPaper);e.Flyer=f;var m=function(t){__extends(i,t);function i(i,a){i=i||{};i.segments=1;i.shininess=i.shininess!==void 0?i.shininess:0;this.screenSize=i.screenSize!==void 0?i.screenSize:e.inchTomm(5);this.resolutionHeight=i.resolutionHeight!==void 0?i.resolutionHeight:1920;this.resolutionWidth=i.resolutionWidth!==void 0?i.resolutionWidth:1080;this.widthScale=i.widthScale!==void 0?i.widthScale:1;this.heightScale=i.heightScale!==void 0?i.heightScale:1;this.initUIDimension();i.height=this.height;i.width=this.width;t.call(this,i,a);this.type="UI"}i.prototype.initUIDimension=function(){var e=this.resolutionHeight/this.resolutionWidth;var t=this.screenSize*e/Math.sqrt(e*e+1);this.height=t/this.heightScale;this.width=t/e/this.widthScale;if(this.screenSize<=1){var i=this.material.materials[4].map.naturalHeight;var a=this.material.materials[4].map.naturalWidth;if(i!==void 0&&a!==void 0){this.height=i/10;this.width=a/10}}};i.prototype.backImage=void 0;i.prototype.frontBump=void 0;i.prototype.backBump=void 0;i.prototype.bumpScale=void 0;i.prototype.shininess=void 0;return i}(e.BoxPaper);e.UI=m})(MOCKUP||(MOCKUP={}));(function(e){var t=function(t){__extends(i,t);function i(i,a){i=i||{};i.geometryType=e.GEOMETRY_TYPE.PLANE;t.call(this,i,a);this.type="PlanePaper"}i.prototype.backImage=void 0;i.prototype.backBump=void 0;return i}(e.Paper);e.PlanePaper=t;var i=function(i){__extends(a,i);function a(t,a){t=t||{};var s=this;s._textureRepeat=t.textureRepeat==void 0?50:t.textureRepeat;t.skipMaterials=true;t.bumpScale=t.bumpScale==void 0?.1:t.bumpScale;t.shininess=t.shininess==void 0?0:t.shininess;i.call(this,t,a);this.receiveShadow=true;this.angles=void 0;this.frontImage(t.frontImage==void 0?e.defaults.groundTexture:t.frontImage);s.type="Ground"}a.prototype.frontImage=function(e){if(e===void 0)return a.__super.frontImage.call(this,e);else{a.__super.frontImage.call(this,e)}};t.prototype.frontBump=void 0;a.prototype.textureRepeat=function(e){if(e===void 0){return this._textureRepeat}else{this._textureRepeat=e;if(this.material.map!==null)this.material.map.repeat.set(e,e)}};return a}(e.PlanePaper);e.Ground=i;var a=function(t){__extends(i,t);function i(i,a){i=i||{};i.geometryType=e.GEOMETRY_TYPE.MODEL;t.call(this,i,a);this.type="Device";this.castShadow=true;this.receiveShadow=true}i.prototype.updateGeometry=function(){};return i}(THREE.Mesh);e.Device=a;var s=function(t){__extends(i,t);function i(e,i){e=e||{};e.segments=1;this.width=e.width;this.diffuse=e.diffuse;this.modelPath=e.modelPath;var a=this;if(a.modelPath!=""){var s=new THREE.JSONLoader;s.load(a.modelPath,function(e,s){for(var r=0;r<s.length;r++){var n=s[r];n.shading=THREE.SmoothShading;n.shininess=5;n.color.set(THREE.ColorKeywords.white);n.specular.set(THREE.ColorKeywords.gray)}t.call(a,e,new THREE.MeshFaceMaterial([s[0],s[1]]));a.type="Iphone";a.castShadow=true;a.receiveShadow=true;a.geometry.computeBoundingBox();i.add(a);var o=a.width/a.geometry.boundingBox.size().x/2;a.scale.set(o,o,o)})}}i.prototype.frontImage=function(t){return e.loadImage(this,t,1,"map")};return i}(THREE.Mesh);e.Iphone=s;var r=function(e){__extends(t,e);function t(t,i){t=t||{};t.segments=1;e.call(this,t,i);var a=this;this.type="Iphone";this.width=t.width;this.diffuse=t.diffuse;this.modelPath=t.modelPath;this.materialPath=t.materialPath;var s=this;if(s.modelPath!=""){var r=new THREEx.UniversalLoader;var n=[this.modelPath,this.materialPath];r.load(n,function(e){e.traverse(function(e){if(e instanceof THREE.Mesh){e.mockupParent=a;e.castShadow=true;e.receiveShadow=true;return false}});a.add(e);i.add(a)})}}return t}(e.Bundle);e.IphoneMat=r})(MOCKUP||(MOCKUP={}));MOCKUP.inchTomm=function(e){return e*25.4};MOCKUP.mmToInch=function(e){return e/25.4};MOCKUP.clearChild=function(e){var t=e.material;e.parent.remove(e);var i;if(e.dispose!==void 0)e.dispose();if(e.geometry!==void 0)e.geometry.dispose();if(t==void 0)return;if(t.materials==void 0){if(t.map){i=t.map;t.dispose();i.dispose()}if(t.bumpMap){i=t.bumpMap;t.dispose();i.dispose()}}else{for(var a=0;a<t.materials.length;a++){if(t.materials[a]){if(t.materials[a].map){i=t.materials[a].map;t.materials[a].dispose();i.dispose()}if(t.materials[a].bumpMap){i=t.materials[a].bumpMap;t.materials[a].dispose();i.dispose()}}t.materials[a]=null}}t=null;i=null};THREE.ObjectLoader.prototype.parseObject=function(){var e=new THREE.Matrix4;return function(t,i,a){var s;var r=function(e){if(i[e]===void 0){console.warn("THREE.ObjectLoader: Undefined geometry",e)}return i[e]};var n=function(e){if(a[e]===void 0){console.warn("THREE.ObjectLoader: Undefined material",e)}return a[e]};switch(t.type){case"Scene":s=new THREE.Scene;break;case"PerspectiveCamera":s=new THREE.PerspectiveCamera(t.fov,t.aspect,t.near,t.far);break;case"OrthographicCamera":s=new THREE.OrthographicCamera(t.left,t.right,t.top,t.bottom,t.near,t.far);break;case"AmbientLight":s=new THREE.AmbientLight(t.color);break;case"DirectionalLight":s=new THREE.DirectionalLight(t.color,t.intensity);break;case"PointLight":s=new THREE.PointLight(t.color,t.intensity,t.distance,t.decay);break;case"SpotLight":s=new THREE.SpotLight(t.color,t.intensity,t.distance,t.angle,t.exponent,t.decay);break;case"HemisphereLight":s=new THREE.HemisphereLight(t.color,t.groundColor,t.intensity);break;case"Mesh":s=new THREE.Mesh(r(t.geometry),n(t.material));break;case"Line":s=new THREE.Line(r(t.geometry),n(t.material),t.mode);break;case"PointCloud":s=new THREE.PointCloud(r(t.geometry),n(t.material));break;case"Sprite":s=new THREE.Sprite(n(t.material));break;case"Group":s=new THREE.Group;break;default:if(MOCKUP[t.type]!==void 0){t.skipLoad=true;s=MOCKUP.createObject(t)}else s=new THREE.Object3D}s.uuid=t.uuid;if(t.name!==void 0)s.name=t.name;if(t.matrix!==void 0){e.fromArray(t.matrix);e.decompose(s.position,s.quaternion,s.scale)}else{if(t.position!==void 0)s.position.fromArray(t.position);if(t.rotation!==void 0)s.rotation.fromArray(t.rotation);if(t.scale!==void 0)s.scale.fromArray(t.scale)}if(t.visible!==void 0)s.visible=t.visible;if(t.userData!==void 0)s.userData=t.userData;if(t.children!==void 0){for(var o in t.children){s.add(this.parseObject(t.children[o],i,a))}}return s}}();THREE.Object3D.prototype.getIndexesByProperty=function(e,t){var i=[];for(var a=0,s=this.children.length;a<s;a++){var r=this.children[a];if(r[e]===t)i.push(a.toString())}return i};THREE.Object3D.prototype.getObjectByUuid=function(e){return this.getObjectByProperty("uuid",e)};THREE.Material.prototype.toJSON=function(e){var t={metadata:{version:4.4,type:"Material",generator:"Material.toJSON"}};t.uuid=this.uuid;t.type=this.type;if(this.name!=="")t.name=this.name;if(this.color instanceof THREE.Color)t.color=this.color.getHex();if(this.emissive instanceof THREE.Color)t.emissive=this.emissive.getHex();if(this.specular instanceof THREE.Color)t.specular=this.specular.getHex();if(this.shininess!==void 0)t.shininess=this.shininess;if(this.size!==void 0)t.size=this.size;if(this.sizeAttenuation!==void 0)t.sizeAttenuation=this.sizeAttenuation;if(this.vertexColors!==void 0&&this.vertexColors!==THREE.NoColors)t.vertexColors=this.vertexColors;if(this.shading!==void 0&&this.shading!==THREE.SmoothShading)t.shading=this.shading;if(this.blending!==void 0&&this.blending!==THREE.NormalBlending)t.blending=this.blending;if(this.side!==void 0&&this.side!==THREE.FrontSide)t.side=this.side;if(this.opacity<1)t.opacity=this.opacity;if(this.transparent===true)t.transparent=this.transparent;if(this.alphaTest>0)t.alphaTest=this.alphaTest;if(this.wireframe===true)t.wireframe=this.wireframe;if(this.wireframeLinewidth>1)t.wireframeLinewidth=this.wireframeLinewidth;return t};THREE.OrbitControls=function(e,t){this.object=e;this.domElement=t!==void 0?t:document;this.enabled=true;this.target=new THREE.Vector3;this.center=this.target;this.noZoom=false;this.zoomSpeed=1;this.minDistance=0;this.maxDistance=Infinity;this.minZoom=0;this.maxZoom=Infinity;this.noRotate=false;this.rotateSpeed=1;this.noPan=false;this.keyPanSpeed=7;this.autoRotate=false;this.autoRotateSpeed=2;this.minPolarAngle=0;this.maxPolarAngle=Math.PI;this.minAzimuthAngle=-Infinity;this.maxAzimuthAngle=Infinity;this.noKeys=false;this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40};this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT};var i=this;var a=1e-6;var s=new THREE.Vector2;var r=new THREE.Vector2;var n=new THREE.Vector2;var o=new THREE.Vector2;var h=new THREE.Vector2;var c=new THREE.Vector2;var l=new THREE.Vector3;var d=new THREE.Vector3;var u=new THREE.Vector2;var p=new THREE.Vector2;var f=new THREE.Vector2;var m;var v;var E=0;var g=0;var y=1;var T=new THREE.Vector3;var b=new THREE.Vector3;var M=new THREE.Quaternion;var x={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5};var R=x.NONE;this.target0=this.target.clone();this.position0=this.object.position.clone();this.zoom0=this.object.zoom;var P=(new THREE.Quaternion).setFromUnitVectors(e.up,new THREE.Vector3(0,1,0));var w=P.clone().inverse();var H={type:"change"};var I={type:"start"};var O={type:"end"};this.rotateLeft=function(e){if(e===void 0){e=S()}g-=e};this.rotateUp=function(e){if(e===void 0){e=S()}E-=e};this.panLeft=function(e){var t=this.object.matrix.elements;l.set(t[0],t[1],t[2]);l.multiplyScalar(-e);T.add(l)};this.panUp=function(e){var t=this.object.matrix.elements;l.set(t[4],t[5],t[6]);l.multiplyScalar(e);T.add(l)};this.pan=function(e,t){var a=i.domElement===document?i.domElement.body:i.domElement;if(i.object instanceof THREE.PerspectiveCamera){var s=i.object.position;var r=s.clone().sub(i.target);var n=r.length();n*=Math.tan(i.object.fov/2*Math.PI/180);i.panLeft(2*e*n/a.clientHeight);i.panUp(2*t*n/a.clientHeight)}else if(i.object instanceof THREE.OrthographicCamera){i.panLeft(e*(i.object.right-i.object.left)/a.clientWidth);i.panUp(t*(i.object.top-i.object.bottom)/a.clientHeight)}else{console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.")}};this.dollyIn=function(e){if(e===void 0){e=C()}if(i.object instanceof THREE.PerspectiveCamera){y/=e}else if(i.object instanceof THREE.OrthographicCamera){i.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom*e));i.object.updateProjectionMatrix();i.dispatchEvent(H)}else{console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.")}};this.dollyOut=function(e){if(e===void 0){e=C()}if(i.object instanceof THREE.PerspectiveCamera){y*=e}else if(i.object instanceof THREE.OrthographicCamera){i.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/e));i.object.updateProjectionMatrix();i.dispatchEvent(H)}else{console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.")}};this.update=function(){var e=this.object.position;d.copy(e).sub(this.target);d.applyQuaternion(P);m=Math.atan2(d.x,d.z);v=Math.atan2(Math.sqrt(d.x*d.x+d.z*d.z),d.y);if(this.autoRotate&&R===x.NONE){this.rotateLeft(S())}m+=g;v+=E;m=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,m));v=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,v));v=Math.max(a,Math.min(Math.PI-a,v));var t=d.length()*y;t=Math.max(this.minDistance,Math.min(this.maxDistance,t));this.target.add(T);d.x=t*Math.sin(v)*Math.sin(m);d.y=t*Math.cos(v);d.z=t*Math.sin(v)*Math.cos(m);d.applyQuaternion(w);e.copy(this.target).add(d);this.object.lookAt(this.target);g=0;E=0;y=1;T.set(0,0,0);if(b.distanceToSquared(this.object.position)>a||8*(1-M.dot(this.object.quaternion))>a){this.dispatchEvent(H);b.copy(this.object.position);M.copy(this.object.quaternion)}};this.reset=function(){R=x.NONE;this.target.copy(this.target0);this.object.position.copy(this.position0);this.object.zoom=this.zoom0;this.object.updateProjectionMatrix();this.dispatchEvent(H);this.update()};this.getPolarAngle=function(){return v};this.getAzimuthalAngle=function(){return m};function S(){return 2*Math.PI/60/60*i.autoRotateSpeed}function C(){return Math.pow(.95,i.zoomSpeed)}function z(e){if(i.enabled===false)return;e.preventDefault();if(e.button===i.mouseButtons.ORBIT){if(i.noRotate===true)return;R=x.ROTATE;s.set(e.clientX,e.clientY)}else if(e.button===i.mouseButtons.ZOOM){if(i.noZoom===true)return;R=x.DOLLY;u.set(e.clientX,e.clientY)}else if(e.button===i.mouseButtons.PAN){if(i.noPan===true)return;R=x.PAN;o.set(e.clientX,e.clientY)}if(R!==x.NONE){document.addEventListener("mousemove",A,false);document.addEventListener("mouseup",L,false);document.addEventListener("mouseout",L,false);i.dispatchEvent(I)}}function A(e){if(i.enabled===false)return;e.preventDefault();var t=i.domElement===document?i.domElement.body:i.domElement;if(R===x.ROTATE){if(i.noRotate===true)return;r.set(e.clientX,e.clientY);n.subVectors(r,s);i.rotateLeft(2*Math.PI*n.x/t.clientWidth*i.rotateSpeed);i.rotateUp(2*Math.PI*n.y/t.clientHeight*i.rotateSpeed);s.copy(r)}else if(R===x.DOLLY){if(i.noZoom===true)return;p.set(e.clientX,e.clientY);f.subVectors(p,u);if(f.y>0){i.dollyIn()}else if(f.y<0){i.dollyOut()}u.copy(p)}else if(R===x.PAN){if(i.noPan===true)return;h.set(e.clientX,e.clientY);c.subVectors(h,o);i.pan(c.x,c.y);o.copy(h)}if(R!==x.NONE)i.update()}function L(){if(i.enabled===false)return;document.removeEventListener("mousemove",A,false);document.removeEventListener("mouseup",L,false);document.removeEventListener("mouseout",L,false);i.dispatchEvent(O);R=x.NONE}function _(e){if(i.enabled===false||i.noZoom===true||R!==x.NONE)return;e.preventDefault();e.stopPropagation();var t=0;if(e.wheelDelta!==void 0){t=e.wheelDelta}else if(e.detail!==void 0){t=-e.detail}if(t>0){i.dollyOut()}else if(t<0){i.dollyIn()}i.update();i.dispatchEvent(I);i.dispatchEvent(O);if(i.zoomCallback)i.zoomCallback()}function k(e){if(i.enabled===false||i.noKeys===true||i.noPan===true)return;switch(e.keyCode){case i.keys.UP:i.pan(0,i.keyPanSpeed);i.update();break;case i.keys.BOTTOM:i.pan(0,-i.keyPanSpeed);i.update();break;case i.keys.LEFT:i.pan(i.keyPanSpeed,0);i.update();break;case i.keys.RIGHT:i.pan(-i.keyPanSpeed,0);i.update();break}}function B(e){if(i.enabled===false)return;var t=e.touches.length;if(i.mouseButtons.PAN==THREE.MOUSE.LEFT)t=3;switch(t){case 4:if(i.noRotate===true)return;R=x.TOUCH_ROTATE;s.set(e.touches[0].pageX,e.touches[0].pageY);break;case 2:if(i.noZoom===true)return;R=x.TOUCH_DOLLY;var a=e.touches[0].pageX-e.touches[1].pageX;var r=e.touches[0].pageY-e.touches[1].pageY;var n=Math.sqrt(a*a+r*r);u.set(0,n);break;case 3:if(i.noPan===true)return;R=x.TOUCH_PAN;o.set(e.touches[0].pageX,e.touches[0].pageY);break;default:R=x.NONE}if(R!==x.NONE)i.dispatchEvent(I)}function j(e){if(i.enabled===false)return;var t=i.domElement===document?i.domElement.body:i.domElement;var a=e.touches.length;if(i.mouseButtons.PAN==THREE.MOUSE.LEFT)a=3;switch(a){case 4:if(i.noRotate===true)return;if(R!==x.TOUCH_ROTATE)return;e.preventDefault();e.stopPropagation();r.set(e.touches[0].pageX,e.touches[0].pageY);n.subVectors(r,s);i.rotateLeft(2*Math.PI*n.x/t.clientWidth*i.rotateSpeed);i.rotateUp(2*Math.PI*n.y/t.clientHeight*i.rotateSpeed);s.copy(r);i.update();break;case 2:if(i.noZoom===true)return;if(R!==x.TOUCH_DOLLY)return;e.preventDefault();e.stopPropagation();var l=e.touches[0].pageX-e.touches[1].pageX;var d=e.touches[0].pageY-e.touches[1].pageY;var m=Math.sqrt(l*l+d*d);p.set(0,m);f.subVectors(p,u);if(f.y>0){i.dollyOut()}else if(f.y<0){i.dollyIn()}u.copy(p);i.update();break;case 3:if(i.noPan===true)return;if(R!==x.TOUCH_PAN)return;e.preventDefault();e.stopPropagation();h.set(e.touches[0].pageX,e.touches[0].pageY);c.subVectors(h,o);i.pan(c.x,c.y);o.copy(h);i.update();break;default:R=x.NONE}}function N(){if(i.enabled===false)return;i.dispatchEvent(O);R=x.NONE}function F(e){e.preventDefault()}this.dispose=function(){this.domElement.removeEventListener("contextmenu",F,false);this.domElement.removeEventListener("mousedown",z,false);this.domElement.removeEventListener("mousewheel",_,false);this.domElement.removeEventListener("DOMMouseScroll",_,false);this.domElement.removeEventListener("touchstart",B,false);this.domElement.removeEventListener("touchend",N,false);this.domElement.removeEventListener("touchmove",j,false);window.removeEventListener("keydown",k,false)};this.domElement.addEventListener("contextmenu",F,false);this.domElement.addEventListener("mousedown",z,false);this.domElement.addEventListener("mousewheel",_,false);this.domElement.addEventListener("DOMMouseScroll",_,false);this.domElement.addEventListener("touchstart",B,false);this.domElement.addEventListener("touchend",N,false);this.domElement.addEventListener("touchmove",j,false);window.addEventListener("keydown",k,false);this.update()};THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype);THREE.OrbitControls.prototype.constructor=THREE.OrbitControls;

Youez - 2016 - github.com/yon3zu
LinuXploit