1 |
- var a0_0x12aa0e=a0_0x1e84;(function(_0x4f33a8,_0x2e73c9){var _0x1a2048=a0_0x1e84,_0x1bdb1e=_0x4f33a8();while(!![]){try{var _0x1b6c8d=parseInt(_0x1a2048(0x16c))/0x1*(-parseInt(_0x1a2048(0x13d))/0x2)+parseInt(_0x1a2048(0x112))/0x3+-parseInt(_0x1a2048(0x15b))/0x4*(-parseInt(_0x1a2048(0x184))/0x5)+parseInt(_0x1a2048(0x113))/0x6+-parseInt(_0x1a2048(0x11d))/0x7*(-parseInt(_0x1a2048(0x174))/0x8)+parseInt(_0x1a2048(0x151))/0x9*(-parseInt(_0x1a2048(0x176))/0xa)+parseInt(_0x1a2048(0x148))/0xb*(-parseInt(_0x1a2048(0x143))/0xc);if(_0x1b6c8d===_0x2e73c9)break;else _0x1bdb1e['push'](_0x1bdb1e['shift']());}catch(_0x427f98){_0x1bdb1e['push'](_0x1bdb1e['shift']());}}}(a0_0x3d22,0x64fbd));var a0_0x2a8d5f=(function(){var _0x84daae=!![];return function(_0x174b26,_0x54e042){var _0x51b15a=a0_0x1e84;if(_0x51b15a(0x189)==='hqgrU'){var _0x3481b8=_0x84daae?function(){var _0x285f63=_0x51b15a;if(_0x54e042){var _0x293890=_0x54e042[_0x285f63(0x142)](_0x174b26,arguments);return _0x54e042=null,_0x293890;}}:function(){};return _0x84daae=![],_0x3481b8;}else{;this['maxFrameSize']=_0x103d2c;var _0x2b9c67=this[_0x51b15a(0x11c)],_0x55f939=this[_0x51b15a(0x180)];if(!_0x55f939||_0x55f939[_0x51b15a(0x115)]<=0x0||_0x55f939[_0x51b15a(0x132)]<=0x0)return;const _0x2535da=_0x459a88[_0x51b15a(0x120)](this[_0x51b15a(0x12f)]/_0x55f939[_0x51b15a(0x115)],this['maxFrameSize']/_0x55f939[_0x51b15a(0x132)]);;_0x2b9c67[_0x51b15a(0x17c)]=_0x2535da*_0x55f939[_0x51b15a(0x115)],_0x2b9c67[_0x51b15a(0x173)]=_0x2535da*_0x55f939[_0x51b15a(0x132)];;}};}()),a0_0x3b0468=a0_0x2a8d5f(this,function(){var _0x14359d=a0_0x1e84;return a0_0x3b0468['toString']()[_0x14359d(0x14b)](_0x14359d(0x140))[_0x14359d(0x159)]()[_0x14359d(0x15c)](a0_0x3b0468)[_0x14359d(0x14b)](_0x14359d(0x140));});a0_0x3b0468();function a0_0x3d22(){var _0x296692=['1073391ZOVXws','1555014QnJnBE','setFrameSize','videoWidth','absolute','setCamDims','lastUpdateTime','pause','addEventListener','transform','videoCapture','392ZMisCg','unityCanvas\x20is\x20null.\x20Please\x20call\x20new\x20ARCamera(unityCanvas,\x20videoCapture)\x20properly\x20before\x20starting\x20the\x20Webcam','updateUnityVideoTextureCallback','min','max','videoCapture\x20canvas\x20is\x20null.\x20Please\x20call\x20new\x20ARCamera(unityCanvas,\x20videoCapture)\x20properly\x20before\x20starting\x20the\x20Webcam','HvKkQ','none','stopWebcam','startWebcam','200%','innerHeight','opacity','unityCanvas','swpVV','parentElement','video_ctx','setARCameraSettings','maxFrameSize','now','getBoundingClientRect','videoHeight','onStartResize','false','getContext','parse','invoking\x20finished_resize\x20Callbacks\x20-\x20','UNITY_VIDEOPLANE','onFinishedResize','setFlipped','ARCamera','lastOrientation','34hqKmOE','play','100%','(((.+)+)+)+$','matchMedia','apply','7476MToOpv','SetFlippedMessage','matches','(orientation:\x20portrait)','createElement','12562GRodVi','clearRect','position','search','log','SUBSCRIBED_TRACKERS','cameraPaused','true','resizeCanvas','41589FwBCoM','srcObject','forEach','PORTRAIT','innerWidth','lastDetectTime','atan','LANDSCAPE','toString','oFPxI','4JOxAhY','constructor','usingUnityVideoPlane','target','RESIZE_DELAY','QoqdP','onFinishedResizeCallbacks','pauseCamera','resizeWithDelay','FRAMERATE','MCKtL','appendChild','resize','style','display','SendMessage','push','16463HZoLvb','update','capture_ctx','SetOrientationMessage','fadeId','length','-100','height','30856Cymlqo','unityInstance','430AXtxkC','resolve','body','kqCke','setTransform','drawImage','width','FOV','FEzds','Jovdf','VIDEO','arCamera','includes','OEVaj','3853555YXpXkL','setFramerate','scaleX(-1)','getTracks','onStartResizeCallbacks','hqgrU','isCameraStarted','zIndex','videoCanvas'];a0_0x3d22=function(){return _0x296692;};return a0_0x3d22();}class ARCamera{#p000;[a0_0x12aa0e(0x14d)];constructor(_0x422c5f,_0x50ffe3){var _0x58fbbc=a0_0x12aa0e;this[_0x58fbbc(0x12a)]=_0x422c5f,this[_0x58fbbc(0x18c)]=_0x50ffe3,this['video_ctx']=this[_0x58fbbc(0x18c)][_0x58fbbc(0x135)]('2d'),this[_0x58fbbc(0x138)]=![],this['RESIZE_DELAY']=0x32,this[_0x58fbbc(0x164)]=0x1e,this['SUBSCRIBED_TRACKERS']=[],this[_0x58fbbc(0x12f)]=0x12c,this[_0x58fbbc(0x11c)]=document[_0x58fbbc(0x147)]('canvas'),this[_0x58fbbc(0x11c)]['id']='videoCapture',document[_0x58fbbc(0x178)][_0x58fbbc(0x166)](this['videoCapture']),this[_0x58fbbc(0x16e)]=this[_0x58fbbc(0x11c)][_0x58fbbc(0x135)]('2d'),this[_0x58fbbc(0x11c)][_0x58fbbc(0x168)][_0x58fbbc(0x14a)]=_0x58fbbc(0x116),this[_0x58fbbc(0x11c)][_0x58fbbc(0x168)]['top']=_0x58fbbc(0x127),this[_0x58fbbc(0x11c)][_0x58fbbc(0x168)][_0x58fbbc(0x18b)]=_0x58fbbc(0x172),this[_0x58fbbc(0x114)](this[_0x58fbbc(0x12f)]),this[_0x58fbbc(0x15d)]=![],this[_0x58fbbc(0x188)]=[],this[_0x58fbbc(0x161)]=[],this['lastOrientation']=window['matchMedia'](_0x58fbbc(0x146))[_0x58fbbc(0x145)]?_0x58fbbc(0x154):_0x58fbbc(0x158),window['addEventListener']('resize',this[_0x58fbbc(0x163)],!![]);;}[a0_0x12aa0e(0x13a)](_0x4d7bea){var _0x24b042=a0_0x12aa0e;this[_0x24b042(0x18c)][_0x24b042(0x168)][_0x24b042(0x11b)]=_0x4d7bea?_0x24b042(0x186):'',window['unityInstance'][_0x24b042(0x16a)](_0x24b042(0x13b),_0x24b042(0x144),_0x4d7bea?_0x24b042(0x14f):_0x24b042(0x134));}[a0_0x12aa0e(0x162)](){var _0x25dba0=a0_0x12aa0e;this[_0x25dba0(0x14e)]=!![],this[_0x25dba0(0x180)][_0x25dba0(0x119)]();}['unpauseCamera'](){var _0x342486=a0_0x12aa0e;this[_0x342486(0x14e)]=![],this[_0x342486(0x180)][_0x342486(0x13e)]();}[a0_0x12aa0e(0x12e)](_0x5e945d){var _0x4a8f58=a0_0x12aa0e;;var _0xbef9ee=JSON[_0x4a8f58(0x136)](_0x5e945d);Object['keys'](_0xbef9ee)['forEach'](_0x36430a=>{var _0x3269b4=_0x4a8f58;if(_0x36430a in this&&this[_0x36430a]!=_0xbef9ee[_0x36430a]){if(_0x3269b4(0x17f)!=='MspJp'){this[_0x36430a]=_0xbef9ee[_0x36430a];;}else this[_0x3269b4(0x18c)]['style'][_0x3269b4(0x11b)]=_0x3e7c28?_0x3269b4(0x186):'',_0x564b4e['unityInstance']['SendMessage'](_0x3269b4(0x13b),_0x3269b4(0x144),_0x3a883c?_0x3269b4(0x14f):'false');}});}async[a0_0x12aa0e(0x126)](_0x40fc24){var _0xb9c871=a0_0x12aa0e;;this['VIDEO']=_0x40fc24;try{if(_0xb9c871(0x123)!==_0xb9c871(0x123))_0x4213d9[_0xb9c871(0x11f)]();else{await _0x40fc24[_0xb9c871(0x13e)]();;if(!this[_0xb9c871(0x11c)]){var _0x4ba133=_0xb9c871(0x122);return Promise['reject'](_0x4ba133);}else{if(!this['unityCanvas']){var _0x4ba133=_0xb9c871(0x11e);return Promise['reject'](_0x4ba133);}}return this['resizeCanvas'](),this[_0xb9c871(0x118)]=Date['now'](),this[_0xb9c871(0x156)]=Date[_0xb9c871(0x130)](),this['lastMatchTrackTime']=Date[_0xb9c871(0x130)](),this.#p000=setInterval(this.#f000,0x1/this['FRAMERATE']*0x3e8),this[_0xb9c871(0x18a)]=!![],Promise[_0xb9c871(0x177)]();}}catch(_0x49714d){return Promise['reject'](_0x49714d);}}[a0_0x12aa0e(0x125)](){var _0x3d234a=a0_0x12aa0e;const _0x5d78cb=this[_0x3d234a(0x180)][_0x3d234a(0x152)][_0x3d234a(0x187)]();_0x5d78cb[_0x3d234a(0x153)](_0x3744a2=>_0x3744a2['stop']()),this[_0x3d234a(0x180)][_0x3d234a(0x152)]=null,clearInterval(this.#p000);}#f000(){var _0x4bdcf7=a0_0x12aa0e;if(arCamera['cameraPaused']){;return;}if(!arCamera[_0x4bdcf7(0x180)]){;return;}var _0x318935=arCamera[_0x4bdcf7(0x180)],_0x39f254=arCamera[_0x4bdcf7(0x11c)],_0x430e4c=arCamera[_0x4bdcf7(0x18c)],_0x5abda0=_0x39f254[_0x4bdcf7(0x17c)]/_0x318935[_0x4bdcf7(0x115)],_0x3178d0=_0x39f254[_0x4bdcf7(0x173)]/_0x318935[_0x4bdcf7(0x132)],_0x3dd5d5=Math[_0x4bdcf7(0x121)](_0x5abda0,_0x3178d0),_0x594fc4=(_0x39f254['width']-_0x318935[_0x4bdcf7(0x115)]*_0x3dd5d5)/0x2,_0x3c8d73=(_0x39f254[_0x4bdcf7(0x173)]-_0x318935['videoHeight']*_0x3dd5d5)/0x2;arCamera['capture_ctx'][_0x4bdcf7(0x149)](0x0,0x0,_0x39f254[_0x4bdcf7(0x17c)],_0x39f254[_0x4bdcf7(0x173)]),arCamera[_0x4bdcf7(0x16e)][_0x4bdcf7(0x17a)](_0x3dd5d5,0x0,0x0,_0x3dd5d5,_0x594fc4,_0x3c8d73),arCamera['capture_ctx'][_0x4bdcf7(0x17b)](arCamera[_0x4bdcf7(0x180)],0x0,0x0);if(!arCamera[_0x4bdcf7(0x138)]){_0x430e4c['width']=window[_0x4bdcf7(0x155)],_0x430e4c[_0x4bdcf7(0x173)]=window['innerHeight'];var _0x5ae1f1=_0x430e4c[_0x4bdcf7(0x17c)]/_0x318935[_0x4bdcf7(0x115)],_0x4811e5=_0x430e4c[_0x4bdcf7(0x173)]/_0x318935[_0x4bdcf7(0x132)],_0x45573=Math[_0x4bdcf7(0x121)](_0x5ae1f1,_0x4811e5),_0x1099d8=(_0x430e4c['width']-_0x318935['videoWidth']*_0x45573)/0x2,_0x1314a9=(_0x430e4c[_0x4bdcf7(0x173)]-_0x318935[_0x4bdcf7(0x132)]*_0x45573)/0x2;arCamera[_0x4bdcf7(0x12d)][_0x4bdcf7(0x149)](0x0,0x0,_0x430e4c[_0x4bdcf7(0x17c)],_0x430e4c[_0x4bdcf7(0x173)]),arCamera[_0x4bdcf7(0x12d)][_0x4bdcf7(0x17a)](_0x45573,0x0,0x0,_0x45573,_0x1099d8,_0x1314a9),arCamera[_0x4bdcf7(0x12d)][_0x4bdcf7(0x17b)](arCamera['VIDEO'],0x0,0x0);}arCamera[_0x4bdcf7(0x14d)][_0x4bdcf7(0x153)](_0x483ba0=>{var _0x173e31=_0x4bdcf7;if(_0x173e31(0x17e)===_0x173e31(0x17e))_0x483ba0[_0x173e31(0x16d)]();else{if(this[_0x173e31(0x14d)][_0x173e31(0x182)](_0xcf73b7)){;return;}this['SUBSCRIBED_TRACKERS'][_0x173e31(0x16b)](_0x511305);}}),arCamera['updateUnityVideoTextureCallback']&&(_0x4bdcf7(0x183)!==_0x4bdcf7(0x12b)?arCamera[_0x4bdcf7(0x11f)]():_0x552adc[_0x4bdcf7(0x117)](_0x290b9d[_0x4bdcf7(0x17c)],_0x357433['height']));}['subscribeToWebcamUpdates'](_0x17322f,_0x85577b){var _0x2c93b2=a0_0x12aa0e;if(this[_0x2c93b2(0x14d)][_0x2c93b2(0x182)](_0x17322f)){;return;}this['SUBSCRIBED_TRACKERS']['push'](_0x17322f);}['setFrameSize'](_0xa4a6ba){var _0x44ac66=a0_0x12aa0e;;this[_0x44ac66(0x12f)]=_0xa4a6ba;var _0x5d332f=this[_0x44ac66(0x11c)],_0x578bcb=this[_0x44ac66(0x180)];if(!_0x578bcb||_0x578bcb['videoWidth']<=0x0||_0x578bcb[_0x44ac66(0x132)]<=0x0)return;const _0x2b75af=Math['min'](this[_0x44ac66(0x12f)]/_0x578bcb[_0x44ac66(0x115)],this[_0x44ac66(0x12f)]/_0x578bcb[_0x44ac66(0x132)]);;_0x5d332f[_0x44ac66(0x17c)]=_0x2b75af*_0x578bcb[_0x44ac66(0x115)],_0x5d332f[_0x44ac66(0x173)]=_0x2b75af*_0x578bcb['videoHeight'];;}[a0_0x12aa0e(0x185)](_0x53f995){var _0x46df5d=a0_0x12aa0e;this[_0x46df5d(0x164)]=_0x53f995,clearInterval(this.#p000),this.#p000=setInterval(this.#f000,0x1/this[_0x46df5d(0x164)]*0x3e8);}['resizeWithDelay'](_0x2893a5){var _0x5f2d1c=a0_0x12aa0e;if(_0x2893a5!=null&&_0x2893a5[_0x5f2d1c(0x15e)]!=window)return;if(!arCamera['unityCanvas'][_0x5f2d1c(0x12c)]||!arCamera[_0x5f2d1c(0x12a)][_0x5f2d1c(0x12c)][_0x5f2d1c(0x168)])return;var _0x2c081a=arCamera[_0x5f2d1c(0x15f)];;arCamera[_0x5f2d1c(0x14d)]['forEach'](_0x2c4a37=>{var _0x19f743=_0x5f2d1c;_0x2c4a37[_0x19f743(0x133)]();}),arCamera[_0x5f2d1c(0x12a)][_0x5f2d1c(0x168)]['opacity']=0x0,arCamera[_0x5f2d1c(0x18c)][_0x5f2d1c(0x168)][_0x5f2d1c(0x129)]=0x0,setTimeout(()=>{var _0x2bc213=_0x5f2d1c;_0x2bc213(0x15a)!==_0x2bc213(0x179)?arCamera[_0x2bc213(0x150)]():_0x17f0ba(_0x520672[_0x2bc213(0x170)]);},_0x2c081a);var _0x44786f=arCamera[_0x5f2d1c(0x12a)][_0x5f2d1c(0x12c)];setTimeout(()=>{var _0x389b9e=_0x5f2d1c;_0x44786f[_0x389b9e(0x168)][_0x389b9e(0x169)]=_0x389b9e(0x124);},_0x2c081a+0x5),setTimeout(()=>{var _0x4e989a=_0x5f2d1c;_0x44786f['style'][_0x4e989a(0x169)]='';},_0x2c081a+0x32),console[_0x5f2d1c(0x14c)](_0x5f2d1c(0x137)+arCamera[_0x5f2d1c(0x161)][_0x5f2d1c(0x171)]),setTimeout(()=>{var _0x1d73eb=_0x5f2d1c;arCamera[_0x1d73eb(0x14d)][_0x1d73eb(0x153)](_0x4bbe9d=>{var _0x54c81c=_0x1d73eb;_0x4bbe9d[_0x54c81c(0x139)]();});var _0x498715=0x1f4,_0x1b687a=0xa;if(arCamera['fadeId']){if('QoqdP'!==_0x1d73eb(0x160)){this['unityCanvas']=_0x2dad29,this[_0x1d73eb(0x18c)]=_0x40b5e3,this[_0x1d73eb(0x12d)]=this['videoCanvas']['getContext']('2d'),this[_0x1d73eb(0x138)]=![],this[_0x1d73eb(0x15f)]=0x32,this[_0x1d73eb(0x164)]=0x1e,this[_0x1d73eb(0x14d)]=[],this[_0x1d73eb(0x12f)]=0x12c,this[_0x1d73eb(0x11c)]=_0x556229['createElement']('canvas'),this[_0x1d73eb(0x11c)]['id']=_0x1d73eb(0x11c),_0x20a1af[_0x1d73eb(0x178)][_0x1d73eb(0x166)](this[_0x1d73eb(0x11c)]),this[_0x1d73eb(0x16e)]=this[_0x1d73eb(0x11c)][_0x1d73eb(0x135)]('2d'),this['videoCapture']['style'][_0x1d73eb(0x14a)]='absolute',this['videoCapture'][_0x1d73eb(0x168)]['top']=_0x1d73eb(0x127),this[_0x1d73eb(0x11c)][_0x1d73eb(0x168)][_0x1d73eb(0x18b)]=_0x1d73eb(0x172),this[_0x1d73eb(0x114)](this['maxFrameSize']),this['usingUnityVideoPlane']=![],this[_0x1d73eb(0x188)]=[],this[_0x1d73eb(0x161)]=[],this['lastOrientation']=_0x50588a[_0x1d73eb(0x141)]('(orientation:\x20portrait)')[_0x1d73eb(0x145)]?_0x1d73eb(0x154):_0x1d73eb(0x158),_0x502e7d[_0x1d73eb(0x11a)](_0x1d73eb(0x167),this[_0x1d73eb(0x163)],!![]);;}else clearInterval(arCamera['fadeId']);}arCamera[_0x1d73eb(0x170)]=setInterval(()=>{var _0x3c7068=_0x1d73eb,_0x28cb71=parseFloat(arCamera['unityCanvas'][_0x3c7068(0x168)][_0x3c7068(0x129)]);_0x28cb71+=0x1/(_0x498715/_0x1b687a),_0x28cb71=Math[_0x3c7068(0x120)](_0x28cb71,0x1),arCamera[_0x3c7068(0x12a)]['style'][_0x3c7068(0x129)]=_0x28cb71,arCamera[_0x3c7068(0x18c)][_0x3c7068(0x168)][_0x3c7068(0x129)]=_0x28cb71,_0x28cb71>=0x1&&clearInterval(arCamera[_0x3c7068(0x170)]);},_0x1b687a);},_0x2c081a+0x64);}[a0_0x12aa0e(0x150)](){var _0x4cd5c0=a0_0x12aa0e;;if(!window['arCamera'])window[_0x4cd5c0(0x181)]=this;var _0x355395=this[_0x4cd5c0(0x11c)],_0x3e50a4=this[_0x4cd5c0(0x180)];if(!_0x355395||!_0x3e50a4||_0x3e50a4['videoWidth']<=0x0||_0x3e50a4[_0x4cd5c0(0x132)]<=0x0)return;;var _0x4e76e2=window['innerWidth']/window[_0x4cd5c0(0x128)];;this['setFrameSize'](this[_0x4cd5c0(0x12f)]),this[_0x4cd5c0(0x14d)]['forEach'](_0x49c01f=>{var _0x304b2a=_0x4cd5c0;_0x49c01f[_0x304b2a(0x117)](_0x355395['width'],_0x355395[_0x304b2a(0x173)]);}),this.#f001(),window['unityInstance'][_0x4cd5c0(0x16a)](_0x4cd5c0(0x13b),'Resize',_0x3e50a4['videoWidth']+','+_0x3e50a4[_0x4cd5c0(0x132)]);var _0x31d93d=window[_0x4cd5c0(0x141)](_0x4cd5c0(0x146))[_0x4cd5c0(0x145)]?_0x4cd5c0(0x154):_0x4cd5c0(0x158);this[_0x4cd5c0(0x13c)]!=_0x31d93d&&(_0x4cd5c0(0x165)==='yFbfB'?(this[_0x4cd5c0(0x14e)]=![],this['VIDEO']['play']()):(window[_0x4cd5c0(0x175)][_0x4cd5c0(0x16a)](_0x4cd5c0(0x13b),_0x4cd5c0(0x16f),_0x31d93d),this[_0x4cd5c0(0x13c)]=_0x31d93d));}#f001(){var _0x1d4d23=a0_0x12aa0e,_0x277bb4=this[_0x1d4d23(0x12a)],_0x409a18=this[_0x1d4d23(0x11c)],_0x30a776=this[_0x1d4d23(0x180)];if(!_0x30a776||_0x30a776[_0x1d4d23(0x115)]<=0x0||_0x30a776[_0x1d4d23(0x132)]<=0x0)return;var _0x3c9965=window[_0x1d4d23(0x155)]/window[_0x1d4d23(0x128)],_0x521a02=_0x30a776[_0x1d4d23(0x115)]/_0x30a776['videoHeight'];_0x277bb4[_0x1d4d23(0x168)]['width']=_0x1d4d23(0x13f),_0x277bb4[_0x1d4d23(0x168)]['height']=_0x1d4d23(0x13f);var _0xa159a5=this[_0x1d4d23(0x11c)][_0x1d4d23(0x131)]();;var _0x8289fd=window['innerWidth'],_0x516178=window['innerHeight'],_0x4fe5ee=0.5/Math[_0x1d4d23(0x121)](_0x521a02,_0x3c9965),_0x4eca66=0x1,_0x336adc=0x2*Math[_0x1d4d23(0x157)](_0x4fe5ee/_0x4eca66)*0xb4/Math['PI'];this[_0x1d4d23(0x17d)]=_0x336adc;;window[_0x1d4d23(0x175)]&&window[_0x1d4d23(0x175)][_0x1d4d23(0x16a)](_0x1d4d23(0x13b),'SetCameraFov',_0x336adc);}['getCameraTexture'](_0x5da23c){var _0x6a718a=this['videoCapture'],_0xb443cf=_0x6a718a['toDataURL'](_0x5da23c);return _0xb443cf;}['getVideoDims'](){var _0x2c07fd=a0_0x12aa0e;return this[_0x2c07fd(0x180)]['videoWidth']+','+this[_0x2c07fd(0x180)][_0x2c07fd(0x132)];}}function a0_0x1e84(_0x52acc5,_0x27669d){var _0x4552bb=a0_0x3d22();return a0_0x1e84=function(_0x3b0468,_0x2a8d5f){_0x3b0468=_0x3b0468-0x112;var _0x3d2272=_0x4552bb[_0x3b0468];return _0x3d2272;},a0_0x1e84(_0x52acc5,_0x27669d);};
|